Documentation ¶
Index ¶
Constants ¶
View Source
const EnvViperConfigFile = "KV_VIPER_FILE"
Variables ¶
View Source
var ErrNoBackends = errors.New("no backends configured")
Functions ¶
func MustGetStringMap ¶
Types ¶
type Getter ¶
type Getter interface { // GetStringMap expected to return nil if key does not exist GetStringMap(key string) (map[string]interface{}, error) }
func MergeGetters ¶
func MustFromEnv ¶
func MustFromEnv() Getter
func NewViperFile ¶
type GetterFunc ¶ added in v1.11.0
The GetterFunc type is an adapter to allow the use of ordinary functions as Getter. If f is a function with the appropriate signature, GetterFunc(f) is a Getter that calls f.
func (GetterFunc) GetStringMap ¶ added in v1.11.0
func (f GetterFunc) GetStringMap(key string) (map[string]interface{}, error)
GetStringMap calls f(key).
Click to show internal directories.
Click to hide internal directories.