testing

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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)

func CreateApplicationFunc

func CreateApplicationFunc[TServer, TContainer any](creater AppCreaterFunc[TServer, TContainer]) (TServer, TContainer)

func FindConfig

func FindConfig(workingDir string, configName ...string) (string, error)

func FindFile

func FindFile(workingDir string, fileName string) (string, error)

func NewAppTestLogger

func NewAppTestLogger(t *testing.T, level zerolog.Level) (zerolog.Logger, *zltest.Tester)

Types

type AppCreater

type AppCreater[TServer, TContainer any] interface {
	Create(context.Context, *viper.Viper) (TServer, TContainer)
}

type AppCreaterFunc

type AppCreaterFunc[TServer, TContainer any] func(context.Context, *viper.Viper) (TServer, TContainer)

func (AppCreaterFunc[TServer, TContainer]) Create

func (h AppCreaterFunc[TServer, TContainer]) Create(ctx context.Context, config *viper.Viper) (TServer, TContainer)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL