Documentation
¶
Index ¶
- func CreateApplication[TServer, TContainer any](creater AppCreater[TServer, TContainer], configName ...string) (TServer, TContainer)
- func CreateApplicationFunc[TServer, TContainer any](creater AppCreaterFunc[TServer, TContainer]) (TServer, TContainer)
- func FindConfig(workingDir string, configName ...string) (string, error)
- func FindFile(workingDir string, fileName string) (string, error)
- func NewAppTestLogger(t *testing.T, level zerolog.Level) (zerolog.Logger, *zltest.Tester)
- type AppCreater
- type AppCreaterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateApplication ¶
func CreateApplication[TServer, TContainer any](creater AppCreater[TServer, TContainer], configName ...string) (TServer, TContainer)
Creates a new instance of application for testing purposes
func CreateApplicationFunc ¶
func CreateApplicationFunc[TServer, TContainer any](creater AppCreaterFunc[TServer, TContainer]) (TServer, TContainer)
TODO: Check if it's needed to document this
func FindConfig ¶
Returns directory of config files and error if file doesent exist
Types ¶
type AppCreater ¶
type AppCreater[TServer, TContainer any] interface { Create(context.Context, *viper.Viper) (TServer, TContainer) }
interface AppCreater Retunrs Server and Container for testing purposes
Click to show internal directories.
Click to hide internal directories.