Documentation
¶
Index ¶
- Variables
- func AddConfigPath(in string)
- func AddSecureRemoteProvider(provider, endpoint, path, secretkeyring string) error
- func AllKeys() []string
- func AllSettings() map[string]interface{}
- func AllowEmptyEnv(allowEmptyEnv bool)
- func AutomaticEnv()
- func BindEnv(input ...string) error
- func BindFlagValue(key string, flag viper.FlagValue) error
- func BindFlagValues(flags viper.FlagValueSet) error
- func BindPFlag(key string, flag *pflag.Flag) error
- func BindPFlags(flags *pflag.FlagSet) error
- func Debug()
- func Get(key string) interface{}
- func GetBool(key string) bool
- func GetDuration(key string) time.Duration
- func GetFloat64(key string) float64
- func GetInt(key string) int
- func GetInt32(key string) int32
- func GetInt64(key string) int64
- func GetIntSlice(key string) []int
- func GetSizeInBytes(key string) uint
- func GetString(key string) string
- func GetStringMap(key string) map[string]interface{}
- func GetStringMapString(key string) map[string]string
- func GetStringMapStringSlice(key string) map[string][]string
- func GetStringSlice(key string) []string
- func GetTime(key string) time.Time
- func GetUint(key string) uint
- func GetUint32(key string) uint32
- func GetUint64(key string) uint64
- func GetViper() *viper.Viper
- func InConfig(key string) bool
- func IniLoadOptions(in ini.LoadOptions) viper.Option
- func InitConfig()
- func IsSet(key string) bool
- func MergeConfig(in io.Reader) error
- func MergeConfigMap(cfg map[string]interface{}) error
- func MergeInConfig() error
- func ReadConfig(in io.Reader) error
- func ReadRemoteConfig() error
- func RegisterAlias(alias string, key string)
- func SafeWriteConfig() error
- func SafeWriteConfigAs(filename string) error
- func Set(key string, value interface{})
- func SetConfigName(in string)
- func SetConfigPermissions(perm os.FileMode)
- func SetConfigType(in string)
- func SetDefault(key string, value interface{})
- func SetEnvKeyReplacer(r *strings.Replacer)
- func SetFs(fs afero.Fs)
- func SetTypeByDefaultValue(enable bool)
- func Sub(key string) *viper.Viper
- func Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error
- func UnmarshalExact(rawVal interface{}, opts ...viper.DecoderConfigOption) error
- func UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error
- func WatchConfig()
- func WatchRemoteConfig() error
- func WriteConfig() error
- func WriteConfigAs(filename string) error
- type CustomOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCustomOptions = &CustomOptions{
Path: "./conf/conf.yaml",
}
Functions ¶
func AddConfigPath ¶
func AddConfigPath(in string)
func AddSecureRemoteProvider ¶
func AllSettings ¶
func AllSettings() map[string]interface{}
func AllowEmptyEnv ¶
func AllowEmptyEnv(allowEmptyEnv bool)
func AutomaticEnv ¶
func AutomaticEnv()
func BindFlagValues ¶
func BindFlagValues(flags viper.FlagValueSet) error
func BindPFlags ¶
func GetDuration ¶
func GetFloat64 ¶
func GetIntSlice ¶
func GetSizeInBytes ¶
func GetStringMap ¶
func GetStringMapString ¶
func GetStringMapStringSlice ¶
func GetStringSlice ¶
func IniLoadOptions ¶
func InitConfig ¶
func InitConfig()
func MergeConfig ¶
func MergeConfigMap ¶
func MergeInConfig ¶
func MergeInConfig() error
func ReadConfig ¶
func ReadRemoteConfig ¶
func ReadRemoteConfig() error
func RegisterAlias ¶
func SafeWriteConfig ¶
func SafeWriteConfig() error
func SafeWriteConfigAs ¶
func SetConfigName ¶
func SetConfigName(in string)
func SetConfigPermissions ¶
func SetConfigType ¶
func SetConfigType(in string)
func SetDefault ¶
func SetDefault(key string, value interface{})
func SetEnvKeyReplacer ¶
func SetTypeByDefaultValue ¶
func SetTypeByDefaultValue(enable bool)
func Unmarshal ¶
func Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error
func UnmarshalExact ¶
func UnmarshalExact(rawVal interface{}, opts ...viper.DecoderConfigOption) error
func UnmarshalKey ¶
func UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error
func WatchConfig ¶
func WatchConfig()
func WatchRemoteConfig ¶
func WatchRemoteConfig() error
func WriteConfig ¶
func WriteConfig() error
func WriteConfigAs ¶
Types ¶
type CustomOptions ¶
type CustomOptions struct {
Path string
}
Click to show internal directories.
Click to hide internal directories.