Documentation ¶
Overview ¶
Package configloader provides YAML-based configuration files, with automatic environment variable overriding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigLoader ¶
type ConfigLoader interface { //Loads a YAML formatted configuration from path into data. Load(data interface{}, path string) error // SetValue sets a value at path key, as long as it can convert value to // the correct type for that key. Otherwise it returns an error. SetValue(target interface{}, key, value string) error // SetValidValue is similar to SetValue except is also returns an error // if the resulting target is not valid. (If target does not implement // Validator then it is assumed to be valid.) SetValidValue(target interface{}, key, value string) error // GetValue returns the value of key in target, or nil and a non-nil // error if that key is not found. GetValue(target interface{}, key string) (interface{}, error) }
ConfigLoader loads configuration.
type DefaultFiller ¶
type DefaultFiller interface {
FillDefaults() error
}
DefaultFiller can fill defaults for a config
Click to show internal directories.
Click to hide internal directories.