Documentation
¶
Index ¶
- type App
- func (app *App) ApplyOverridesExternalClientConn(overrides ...OverrideExternalClient) *App
- func (app *App) InitClients() *App
- func (app *App) InitControllers() *App
- func (app *App) InitExternalClientsConnIfNotSet() *App
- func (app *App) InitGracefulShutdown(signals ...os.Signal) *App
- func (app *App) InitPgxConnection() *App
- func (app *App) InitServer(port string) *App
- func (app *App) Run()
- type OverrideExternalClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Cfg *config.App ExternalClients *externalClients // contains filtered or unexported fields }
App service
func NewApp ¶
func NewApp(port string, overrides ...OverrideExternalClient) *App
NewApp creates a new App with all dependencies
func (*App) ApplyOverridesExternalClientConn ¶
func (app *App) ApplyOverridesExternalClientConn(overrides ...OverrideExternalClient) *App
ApplyOverridesExternalClientConn overrides to be able to test the application in isolation from other systems
func (*App) InitClients ¶
InitClients initializes external services if they was not overridden for integration tests
func (*App) InitControllers ¶
InitControllers initializes REST handlers
func (*App) InitExternalClientsConnIfNotSet ¶
InitExternalClientsConnIfNotSet initializes external services if they was not overridden for integration tests
func (*App) InitGracefulShutdown ¶
InitGracefulShutdown initializes the graceful shutdown for the application
func (*App) InitPgxConnection ¶
InitPgxConnection initializes the pgx driver to connect to postgres
func (*App) InitServer ¶
InitServer initializes the web server to provide access via REST
type OverrideExternalClient ¶
OverrideExternalClient functions to replace an external clients with mocks for integration tests
func WithTelegramAPI ¶
func WithTelegramAPI(ctor func(token string) types.TelegramBotAPI) OverrideExternalClient
WithTelegramAPI creates service with specific telegram API client
Directories
¶
Path | Synopsis |
---|---|
api
|
|
clients
|
|
pkg
|
|
graceful/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
multi_closer/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
types/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |