Documentation
¶
Index ¶
- func AssertPanic(t *testing.T, f func())
- func DatabaseProvider(config *DatabaseConfiguration) *gorm.DB
- type Application
- type AtomicBool
- type CorsConfiguration
- type DatabaseConfiguration
- type DatabaseStarter
- type LogConfiguration
- type LogLevel
- type Logger
- type RoutedController
- type Router
- type RouterFactory
- type RuntimeContext
- type TestAfterStart
- type TestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertPanic ¶ added in v0.4.0
func DatabaseProvider ¶
func DatabaseProvider(config *DatabaseConfiguration) *gorm.DB
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶ added in v0.4.0
func NewApplication( databaseConfiguration *DatabaseConfiguration, corsConfiguration *CorsConfiguration, logConfiguration *LogConfiguration, routerFactory RouterFactory, ) *Application
func (*Application) Configure ¶ added in v0.4.0
func (app *Application) Configure()
func (*Application) IsRunning ¶ added in v0.4.0
func (app *Application) IsRunning() bool
func (*Application) Start ¶
func (app *Application) Start() error
func (*Application) Stop ¶ added in v0.4.0
func (app *Application) Stop()
type AtomicBool ¶ added in v0.4.0
type AtomicBool int32
type CorsConfiguration ¶ added in v0.3.0
type CorsConfiguration struct {
AllowOrigins []string
}
type DatabaseConfiguration ¶
type DatabaseConfiguration struct { DSN string Connect connect Models []interface{} }
type DatabaseStarter ¶
type DatabaseStarter struct { Configuration *DatabaseConfiguration // contains filtered or unexported fields }
func (*DatabaseStarter) Start ¶
func (ds *DatabaseStarter) Start() *gorm.DB
type LogConfiguration ¶ added in v0.3.0
type LogConfiguration struct {
GlobalLevel LogLevel
}
type LogLevel ¶ added in v0.3.0
const ( DebugLevel LogLevel = LogLevel(zerolog.DebugLevel) InfoLevel LogLevel = LogLevel(zerolog.InfoLevel) WarnLevel LogLevel = LogLevel(zerolog.WarnLevel) ErrorLevel LogLevel = LogLevel(zerolog.ErrorLevel) FatalLevel LogLevel = LogLevel(zerolog.FatalLevel) PanicLevel LogLevel = LogLevel(zerolog.PanicLevel) NoLevel LogLevel = LogLevel(zerolog.NoLevel) Disabled LogLevel = LogLevel(zerolog.Disabled) TraceLevel LogLevel = LogLevel(zerolog.TraceLevel) )
type RoutedController ¶
type RouterFactory ¶ added in v0.4.0
type RouterFactory func(runtime *RuntimeContext) *Router
type RuntimeContext ¶ added in v0.4.0
type RuntimeContext struct {
// contains filtered or unexported fields
}
type TestAfterStart ¶ added in v0.4.0
type TestContext ¶
type TestContext struct {
// contains filtered or unexported fields
}
func NewTestContext ¶
func NewTestContext(database *DatabaseConfiguration, routerFactory RouterFactory) *TestContext
func (*TestContext) CreateEntity ¶
func (ctx *TestContext) CreateEntity(value interface{}) error
func (*TestContext) Perform ¶
func (ctx *TestContext) Perform(req *http.Request) *httptest.ResponseRecorder
func (*TestContext) RunTest ¶ added in v0.4.0
func (ctx *TestContext) RunTest(t *testing.T, postStartCall TestAfterStart)
Click to show internal directories.
Click to hide internal directories.