Documentation ¶
Overview ¶
Package config provides supporting code for multi-tenant setups
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfigFile ¶
LoadConfigFile loads a config
Types ¶
type Area ¶
type Area struct { Name string Parent *Area Childs []*Area Modules []dingo.Module Injector *dingo.Injector Routes []Route Configuration Map LoadedConfig Map }
Area defines a configuration area for multi-site setups it is initialized by project main package and partly loaded by config files
func MergeFrom ¶
MergeFrom merges two Contexts into a new one We do not merge config, as we use the DI to handle it
func (*Area) Flat ¶
Flat returns a map of name->*Area of contexts, were all values have been inherited (yet overriden) of the parent context tree.
func (*Area) GetFlatContexts ¶
GetFlatContexts returns a map of context-relative-name->*Area, which has been flatted to inherit all parent's tree settings such as DI & co, and filtered to only list tree nodes specified by Contexts of area.
func (*Area) GetInitializedInjector ¶
GetInitializedInjector returns initialized container based on the configuration we derive our injector from our parent
func (*Area) HasConfigKey ¶
HasConfigKey checks recursive if the config has a given key
type DefaultConfigModule ¶
type DefaultConfigModule interface {
DefaultConfig() Map
}
DefaultConfigModule is used to get a module's default configuration
type Module ¶
type Module struct {
Map
}
Module defines a dingo module which automatically binds available config
type OverrideConfigModule ¶
OverrideConfigModule allows to override config dynamically
type Route ¶
Route defines the yaml structure for a route, consisting of a path and a controller, as well as optional args
type TemplateFunc ¶
type TemplateFunc struct {
// contains filtered or unexported fields
}
TemplateFunc allows to retrieve config variables
func (*TemplateFunc) Func ¶
func (c *TemplateFunc) Func() interface{}
Func returns the template function