Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Viper ¶
type Viper interface { AddConfigPath(in string) AllKeys() []string AllSettings() map[string]interface{} AutomaticEnv() BindEnv(input ...string) error BindFlagValue(key string, flag viper.FlagValue) error BindFlagValues(flags viper.FlagValueSet) error BindPFlag(key string, flag *pflag.Flag) error ConfigFileUsed() string Debug() Get(key string) interface{} GetBool(key string) bool GetDuration(key string) time.Duration GetFloat64(key string) float64 GetInt(key string) int GetInt64(key string) int64 GetIntSlice(key string) []int GetSizeInBytes(key string) uint GetString(key string) string GetStringMap(key string) map[string]interface{} GetStringMapString(key string) map[string]string GetStringMapStringSlice(key string) map[string][]string GetStringSlice(key string) []string GetTime(key string) time.Time GetUint(key string) uint InConfig(key string) bool IsSet(key string) bool MergeConfig(in io.Reader) error MergeConfigMap(cfg map[string]interface{}) error MergeInConfig() error OnConfigChange(run func(e fsnotify.Event)) ReadConfig(in io.Reader) error ReadInConfig() error RegisterAlias(alias string, key string) SafeWriteConfig() error SafeWriteConfigAs(filename string) error Set(key string, value interface{}) SetConfigFile(in string) SetConfigName(in string) SetConfigType(in string) SetDefault(key string, value interface{}) SetEnvKeyReplacer(r *strings.Replacer) SetEnvPrefix(in string) // TODO - add sub // Sub(key string) Viper Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error UnmarshalExact(rawVal interface{}, opts ...viper.DecoderConfigOption) error UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error WatchConfig() WriteConfig() error WriteConfigAs(filename string) error // Remote provider methods AddRemoteProvider(provider, endpoint, path string) error ReadRemoteConfig() error WatchRemoteConfig() error WatchRemoteConfigOnChannel() error }
Click to show internal directories.
Click to hide internal directories.