viper

package
v5.0.0-...-14e0c58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL