Documentation ¶
Index ¶
- func App(modules []dingo.Module, options ...ApplicationOption)
- type Application
- type ApplicationOption
- func ChildAreas(areas ...*config.Area) ApplicationOption
- func ConfigDir(configdir string) ApplicationOption
- func DefaultContext(name string) ApplicationOption
- func SetEagerSingletons(enabled bool) ApplicationOption
- func WithArgs(args ...string) ApplicationOption
- func WithCustomLogger(logger dingo.Module) ApplicationOption
- func WithRoutes(routesModule web.RoutesModule) ApplicationOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func App ¶
func App(modules []dingo.Module, options ...ApplicationOption)
App is the default app-runner for flamingo
Types ¶
type Application ¶ added in v3.1.6
type Application struct {
// contains filtered or unexported fields
}
Application contains a main flamingo application
func NewApplication ¶ added in v3.1.6
func NewApplication(modules []dingo.Module, options ...ApplicationOption) (*Application, error)
NewApplication loads a new application for running the Flamingo application with the given modules, loaded configs etc
func (*Application) ConfigArea ¶ added in v3.1.6
func (app *Application) ConfigArea() *config.Area
ConfigArea returns the initialized configuration area
func (*Application) Run ¶ added in v3.1.6
func (app *Application) Run() error
Run runs the Root Cmd and triggers the standard event
type ApplicationOption ¶ added in v3.1.6
type ApplicationOption func(config *Application)
ApplicationOption configures an Application
func ChildAreas ¶
func ChildAreas(areas ...*config.Area) ApplicationOption
ChildAreas allows to define additional config areas for roots
func ConfigDir ¶
func ConfigDir(configdir string) ApplicationOption
ConfigDir configuration ApplicationOption
func DefaultContext ¶ added in v3.1.0
func DefaultContext(name string) ApplicationOption
DefaultContext for flamingo to start with
func SetEagerSingletons ¶ added in v3.1.0
func SetEagerSingletons(enabled bool) ApplicationOption
SetEagerSingletons controls if eager singletons will be created
func WithArgs ¶ added in v3.1.6
func WithArgs(args ...string) ApplicationOption
WithArgs sets the initial arguments different than os.Args[1:]
func WithCustomLogger ¶ added in v3.6.0
func WithCustomLogger(logger dingo.Module) ApplicationOption
WithCustomLogger allows to use custom logger modules for flamingo app, if nothing available default will be used
func WithRoutes ¶ added in v3.2.0
func WithRoutes(routesModule web.RoutesModule) ApplicationOption
WithRoutes configures a given RoutesModule for usage in the flamingo app
Directories ¶
Path | Synopsis |
---|---|
core
|
|
healthcheck
Package healthcheck provides a healthcheck endpoint under the default route /status/healthcheck Usage: Register your own Status via Dingo: injector.BindMap(new(healthcheck.Status), "yourServiceName").To(yourServiceNameApi.Status{})
|
Package healthcheck provides a healthcheck endpoint under the default route /status/healthcheck Usage: Register your own Status via Dingo: injector.BindMap(new(healthcheck.Status), "yourServiceName").To(yourServiceNameApi.Status{}) |
examples
|
|
Package framework provides the most necessary basics, such as
|
Package framework provides the most necessary basics, such as |
config
Package config provides supporting code for multi-tenant setups
|
Package config provides supporting code for multi-tenant setups |
testutil
Package testutil contains helper functions for PACT testing Deprecated: PACT support will be dropped from Flamingo in v4
|
Package testutil contains helper functions for PACT testing Deprecated: PACT support will be dropped from Flamingo in v4 |