Documentation ¶
Index ¶
- Constants
- func Configure(structure interface{}, pipelineChains []infra.FuncType, prefix string, ...) (result interface{}, err error)
- type Chain
- type DefaultConfig
- type EnvironmentConfig
- type HoconConfig
- type IConfigure
- type IMiddleware
- type IniConfig
- type JSONConfig
- type Pipeline
- type TomlConfig
- type VaultConfig
- type YamlConfig
Constants ¶
const ( /*SmartConfiguring - flag which inform library need for start analyzing all tags in derived structure for setting function types of configuring structure */ SmartConfiguring = true /*DirtyConfiguring - flag*/ DirtyConfiguring = false // EmptyAdditionalPrefix - empty of node prefix name EmptyAdditionalPrefix = "" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain - this is structure contain information for executing function by ordering
type DefaultConfig ¶
type DefaultConfig struct { }
DefaultConfig - one of most configuring source functions that should preparing fields in structures of data by default values setuped by special tag name
func (DefaultConfig) GetBaseType ¶
func (config DefaultConfig) GetBaseType(context *structContext) infra.GoStructorValue
GetBaseType - get base type from default values.
func (DefaultConfig) GetComplexType ¶
func (config DefaultConfig) GetComplexType(context *structContext) infra.GoStructorValue
GetComplexType - get slices, maps, arrays or anything else hard types
type EnvironmentConfig ¶
type EnvironmentConfig struct { }
EnvironmentConfig - configuring structures from environment
func (EnvironmentConfig) GetBaseType ¶
func (config EnvironmentConfig) GetBaseType(context *structContext) infra.GoStructorValue
GetBaseType - getting base type values
func (EnvironmentConfig) GetComplexType ¶
func (config EnvironmentConfig) GetComplexType(context *structContext) infra.GoStructorValue
GetComplexType - getting complex types like slices from environment variable
type HoconConfig ¶
type HoconConfig struct {
// contains filtered or unexported fields
}
HoconConfig - configuring source from hocon
func (*HoconConfig) GetBaseType ¶
func (config *HoconConfig) GetBaseType(context *structContext) infra.GoStructorValue
GetBaseType - get base types like string, int, float32
func (HoconConfig) GetComplexType ¶
func (config HoconConfig) GetComplexType(context *structContext) infra.GoStructorValue
GetComplexType - get complex types like slices, maps, arrays,
type IConfigure ¶
type IConfigure interface { GetComplexType(*structContext) infra.GoStructorValue GetBaseType(*structContext) infra.GoStructorValue }
IConfigure - configurer interface for chain pipeline configuration
type IMiddleware ¶
type IMiddleware interface {
ActionConfigure(*structContext) error
}
IMiddleware - interface which need implement for executing yourselft writed middlewares
type IniConfig ¶ added in v0.6.2
type IniConfig struct { }
IniConfig - source toml for configuring
func (IniConfig) GetBaseType ¶ added in v0.6.2
func (yaml IniConfig) GetBaseType(context *structContext) infra.GoStructorValue
GetBaseType - getting from yaml string, int, float32 ...
func (IniConfig) GetComplexType ¶ added in v0.6.2
func (yaml IniConfig) GetComplexType(context *structContext) infra.GoStructorValue
GetComplexType - getting from yaml slices, maps, arrays...
type JSONConfig ¶ added in v0.4.1
type JSONConfig struct {
// contains filtered or unexported fields
}
JSONConfig - source json configuring
func (JSONConfig) GetBaseType ¶ added in v0.4.1
func (config JSONConfig) GetBaseType(context *structContext) infra.GoStructorValue
GetBaseType - gettin base type like string, int, float32...
func (JSONConfig) GetComplexType ¶ added in v0.4.1
func (config JSONConfig) GetComplexType(context *structContext) infra.GoStructorValue
GetComplexType - get complex types like arrays, slices, maps from json source
type TomlConfig ¶ added in v0.6.2
type TomlConfig struct { }
TomlConfig - source toml for configuring
func (TomlConfig) GetBaseType ¶ added in v0.6.2
func (yaml TomlConfig) GetBaseType(context *structContext) infra.GoStructorValue
GetBaseType - getting from yaml string, int, float32 ...
func (TomlConfig) GetComplexType ¶ added in v0.6.2
func (yaml TomlConfig) GetComplexType(context *structContext) infra.GoStructorValue
GetComplexType - getting from yaml slices, maps, arrays...
type VaultConfig ¶ added in v0.5.1
type VaultConfig struct { Config *properties.VaultConfiguration // contains filtered or unexported fields }
VaultConfig - source vault configuring
func (VaultConfig) GetBaseType ¶ added in v0.5.1
func (config VaultConfig) GetBaseType(context *structContext) infra.GoStructorValue
func (VaultConfig) GetComplexType ¶ added in v0.5.1
func (config VaultConfig) GetComplexType(context *structContext) infra.GoStructorValue
type YamlConfig ¶
type YamlConfig struct {
// contains filtered or unexported fields
}
YamlConfig - source yaml for configuring
func (YamlConfig) GetBaseType ¶
func (yaml YamlConfig) GetBaseType(context *structContext) infra.GoStructorValue
GetBaseType - getting from yaml string, int, float32 ...
func (YamlConfig) GetComplexType ¶
func (yaml YamlConfig) GetComplexType(context *structContext) infra.GoStructorValue
GetComplexType - getting from yaml slices, maps, arrays...