Documentation
¶
Index ¶
- Variables
- func Lookup(source map[string]interface{}, key []string) interface{}
- func MergeMapWithPath(source map[string]interface{}, sub map[string]interface{}, path []string) error
- func ReadConfig(in io.Reader, ct ConfigType, c map[string]interface{}) error
- type Config
- type ConfigParseError
- type ConfigType
- type Fields
- type Source
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NoVariablesInitialised = errors.New("no variables initialised") NotAStructPtr = errors.New("expects pointer to a struct") )
Functions ¶
func MergeMapWithPath ¶
func ReadConfig ¶
func ReadConfig(in io.Reader, ct ConfigType, c map[string]interface{}) error
Types ¶
type Config ¶
type ConfigParseError ¶
type ConfigParseError struct {
// contains filtered or unexported fields
}
func (ConfigParseError) Error ¶
func (pe ConfigParseError) Error() string
type Fields ¶
type Fields interface {
Bool(key string) bool
Get(key string) interface{}
Float(key string) float64
Int(key string) int
IsSet(key string) bool
Slice(key, delimiter string) []interface{}
String(key string) string
StringMap(key string) map[string]interface{}
Sub(key string) Fields
UInt(key string) uint
Unmarshal(v interface{}, prefix string) error
}
type Source ¶
type Source interface {
Get(key string) interface{}
Bool(key string) (bool, error)
Float(key string) (float64, error)
Int(key string) (int, error)
UInt(key string) (uint, error)
Slice(key, delimiter string) ([]interface{}, error)
String(key string) (string, error)
StringMap(key string) map[string]interface{}
IsSet(key string) bool
}
Click to show internal directories.
Click to hide internal directories.