forked from ebhomengo/niki
30 lines
489 B
Go
30 lines
489 B
Go
package paymentapp
|
|
|
|
import (
|
|
"context"
|
|
|
|
paymenthttp "git.gocasts.ir/ebhomengo/niki/domain/payment/delivery/http"
|
|
"git.gocasts.ir/ebhomengo/niki/pkg/database"
|
|
)
|
|
|
|
type App struct {
|
|
server *paymenthttp.Server
|
|
}
|
|
|
|
func Setup(ctx context.Context, cfg Config, conn *database.Database) (*App, error) {
|
|
|
|
//TODO Setup
|
|
|
|
return &App{
|
|
server: nil,
|
|
}, nil
|
|
}
|
|
|
|
func (a *App) Start() error {
|
|
return a.server.Serve()
|
|
}
|
|
|
|
func (a *App) Stop(ctx context.Context) error {
|
|
return a.server.Stop(ctx)
|
|
}
|