Documentation
¶
Index ¶
- Variables
- func AddProvider(provider Provider)
- func Bool(key string, defaultValue ...bool) (bool, error)
- func Duration(key string, defaultValue ...time.Duration) (time.Duration, error)
- func Float32(key string, defaultValue ...float32) (float32, error)
- func Float64(key string, defaultValue ...float64) (float64, error)
- func Float64Slice(key string, defaultValue ...[]float64) ([]float64, error)
- func Int(key string, defaultValue ...int) (int, error)
- func Int32(key string, defaultValue ...int32) (int32, error)
- func Int64(key string, defaultValue ...int64) (int64, error)
- func IntSlice(key string, defaultValue ...[]int) ([]int, error)
- func OnChangedEvent(event ChangedEvent)
- func RemoveAllPrividers()
- func Scan(key string, value interface{}) error
- func String(key string, defaultValue ...string) (string, error)
- func StringMap(key string, defaultValue ...map[string]interface{}) (map[string]interface{}, error)
- func StringMapString(key string, defaultValue ...map[string]string) (map[string]string, error)
- func StringSlice(key string, defaultValue ...[]string) ([]string, error)
- type ChangedEvent
- type Configuration
- type Provider
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFileNotFound = errors.New("config: config file was not found") ErrKeyNotFound = errors.New("config: key was not found") ErrProviderNotFound = errors.New("config: no provider is added to config. Provider need to be added first") ErrConfigTypeNotSupport = errors.New("config: type is not support") )
Functions ¶
func AddProvider ¶
func AddProvider(provider Provider)
func Float64Slice ¶
Float64Slice returns the value associated with the key as a slice of float.
func OnChangedEvent ¶
func OnChangedEvent(event ChangedEvent)
func RemoveAllPrividers ¶
func RemoveAllPrividers()
func StringMapString ¶
StringMapString returns a map[string]string type value which has the key.
Types ¶
type ChangedEvent ¶
type ChangedEvent func() error
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.