configloader

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2019 License: NCSA Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL