Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfiguratorList = make(map[string]Configurator)
ConfiguratorList contains reference to all config adapters to be fetched for usage.
Functions ¶
func RegisterConfigurator ¶
func RegisterConfigurator(name string, configType Configurator)
RegisterConfigurator enables new (de)-serializing adapters to plug-in their reference.
Types ¶
type ConfigJSON ¶
type ConfigJSON struct{}
ConfigJSON send "json" to GetConfig to get it.
func (ConfigJSON) ConfigFromFile ¶
func (configJSON ConfigJSON) ConfigFromFile(configPath string, config interface{})
ConfigFromFile populates the passed &map with config values from given file.
func (ConfigJSON) Unmarshal ¶
func (configJSON ConfigJSON) Unmarshal(configData string, config interface{})
Unmarshal populates the passed &map with config values from given string.
type Configurator ¶
type Configurator interface { Unmarshal(configData string, config interface{}) ConfigFromFile(configPath string, config interface{}) }
Configurator enables provide config adapters for serializer.
func GetConfigurator ¶
func GetConfigurator(name string) Configurator
GetConfigurator lets client of this library fetch required adapter.
type FlatConfig ¶
FlatConfig can be used seamlessly between varied projects to share flatmap details around configuration.
Click to show internal directories.
Click to hide internal directories.