Documentation ¶
Index ¶
- func LoadEdnFromEnv(envVar string, config interface{}, fallback ...string) error
- func LoadEdnFromPath(path string, config interface{}) error
- func LoadFromEnv(envVar string, config interface{}, fallback ...string) error
- func LoadFromPath(path string, config interface{}) error
- type ConfigNotFound
- type DecodeError
- type InvalidPathProvided
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadEdnFromEnv ¶ added in v0.2.0
LoadEdnFromEnv in case of fallback options, returns the first one it can find. Case none of the fallback paths is valid, it'll return a 'ConfigNotFound' error.
func LoadEdnFromPath ¶ added in v0.2.0
LoadEdnFromPath takes a path, loads and decodes an EDN file into config struct with expected fields.
func LoadFromEnv ¶
LoadFromEnv in case of fallback options, returns the first one it can find. Case none of the fallback paths is valid, it'll return a 'ConfigNotFound' error.
func LoadFromPath ¶
LoadFromPath takes a path, loads and decodes a YAML into config struct with expected fields.
Types ¶
type ConfigNotFound ¶
type ConfigNotFound struct {
// contains filtered or unexported fields
}
func (*ConfigNotFound) Error ¶
func (e *ConfigNotFound) Error() string
type DecodeError ¶
type DecodeError struct {
// contains filtered or unexported fields
}
func (*DecodeError) Error ¶
func (e *DecodeError) Error() string
type InvalidPathProvided ¶
type InvalidPathProvided struct {
// contains filtered or unexported fields
}
func (*InvalidPathProvided) Error ¶
func (e *InvalidPathProvided) Error() string
Click to show internal directories.
Click to hide internal directories.