Documentation ¶
Index ¶
- func ApplyConfig(config Config)
- func OnConfig(conf func(Config))
- type Config
- type Configurable
- type MapConfig
- func (cfg MapConfig) Get(key string) interface{}
- func (cfg MapConfig) GetBool(key string) bool
- func (cfg MapConfig) GetFloat64(key string) float64
- func (cfg MapConfig) GetInt(key string) int
- func (cfg MapConfig) GetString(key string) string
- func (cfg MapConfig) GetStringMap(key string) map[string]interface{}
- func (cfg MapConfig) GetStringMapString(key string) map[string]string
- func (cfg MapConfig) GetStringSlice(key string) []string
- func (cfg MapConfig) GetTime(key string) time.Time
- func (cfg MapConfig) IsSet(key string) bool
- func (cfg MapConfig) Set(key string, value interface{})
- func (cfg MapConfig) SetDefault(key string, value interface{})
- func (cfg MapConfig) SetRequired(key string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyConfig ¶
func ApplyConfig(config Config)
Types ¶
type Config ¶
type Config interface { Get(key string) interface{} GetBool(key string) bool GetFloat64(key string) float64 GetInt(key string) int GetString(key string) string GetStringMap(key string) map[string]interface{} GetStringMapString(key string) map[string]string GetStringSlice(key string) []string GetTime(key string) time.Time IsSet(key string) bool Set(key string, value interface{}) }
type Configurable ¶
type Configurable func(Config)
type MapConfig ¶
type MapConfig struct {
// contains filtered or unexported fields
}
func NewMapConfig ¶
func ReadMapConfigFromFile ¶
func (MapConfig) GetFloat64 ¶
func (MapConfig) GetStringMap ¶
func (MapConfig) GetStringMapString ¶
func (MapConfig) GetStringSlice ¶
func (MapConfig) SetDefault ¶
func (MapConfig) SetRequired ¶
Click to show internal directories.
Click to hide internal directories.