Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Getter ¶
type Getter interface { Get(key string) interface{} GetString(key string) string GetBool(key string) bool GetInt(key string) int IsSet(key string) bool UnmarshalKey(key string, target interface{}) error }
Getter allows to get configuration options inside pluggable components.
func NewViperConfigGetter ¶
func NewViperConfigGetter(v *viper.Viper) Getter
NewViperConfigGetter is a wrapper over viper to return ConfigGetter interface from it.
type Setter ¶
type Setter interface { SetDefault(key string, value interface{}) BindEnv(key string) BindFlag(key string, flagName string) StringFlag(name, shorthand string, value string, usage string) BoolFlag(name, shorthand string, value bool, usage string) IntFlag(name, shorthand string, value int, usage string) }
Setter allows to setup configuration options from pluggable components.
func NewViperConfigSetter ¶
NewViperConfigSetter is a wrapper over viper to return ConfigSetter interface from it.
Click to show internal directories.
Click to hide internal directories.