Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDecodeFailed = errors.New("The value for the given key could not be decoded")
View Source
var ErrLoadFailed = errors.New("Unable to load config")
View Source
var ErrNotSet = errors.New("The value for the given key was not set")
Functions ¶
This section is empty.
Types ¶
type ConfigLoader ¶
type ConfigLoader struct {
// contains filtered or unexported fields
}
Used to load a key value configuration
func Load ¶
func Load(config_path string) (*ConfigLoader, error)
Loads the configuration at the given path into a ConfigLoader struct Supported uri schemes are: s3, file, https
func (*ConfigLoader) Get ¶
func (loader *ConfigLoader) Get(key string) (string, error)
Returns the value associated with a given key as a string Environment variables will override configuration
func (*ConfigLoader) ParseInto ¶
func (loader *ConfigLoader) ParseInto(key string, out interface{}) error
Parses the value the given key into the given interface{} Environment variables will override configutation
Click to show internal directories.
Click to hide internal directories.