viper

package
v0.0.0-...-10541b1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConfigPath

func AddConfigPath(in string)

func AllKeys

func AllKeys() []string

func AllSettings

func AllSettings() map[string]any

func AutomaticEnv

func AutomaticEnv()

func BindEnv

func BindEnv(input ...string) error

func BindFlagValue

func BindFlagValue(key string, flag viper.FlagValue) error

func BindFlagValues

func BindFlagValues(flags viper.FlagValueSet) error

func BindPFlag

func BindPFlag(key string, flag *pflag.Flag) error

func BindPFlags

func BindPFlags(flags *pflag.FlagSet) error

func ConfigFileUsed

func ConfigFileUsed() string

func Debug

func Debug()

func Get

func Get(key string) any

func GetBool

func GetBool(key string) bool

func GetDuration

func GetDuration(key string) time.Duration

func GetFloat64

func GetFloat64(key string) float64

func GetInt

func GetInt(key string) int

func GetInt32

func GetInt32(key string) int32

func GetInt64

func GetInt64(key string) int64

func GetIntSlice

func GetIntSlice(key string) []int

func GetSizeInBytes

func GetSizeInBytes(key string) uint

func GetString

func GetString(key string) string

func GetStringMap

func GetStringMap(key string) map[string]any

func GetStringMapString

func GetStringMapString(key string) map[string]string

func GetStringMapStringSlice

func GetStringMapStringSlice(key string) map[string][]string

func GetStringSlice

func GetStringSlice(key string) []string

func GetTime

func GetTime(key string) time.Time

func GetUint

func GetUint(key string) uint

func GetUint16

func GetUint16(key string) uint16

func GetUint32

func GetUint32(key string) uint32

func GetUint64

func GetUint64(key string) uint64

func GetViper

func GetViper() *viper.Viper

func InConfig

func InConfig(key string) bool

func IsSet

func IsSet(key string) bool

func MergeInConfig

func MergeInConfig() error

func MustBindEnv

func MustBindEnv(input ...string)

func ReadInConfig

func ReadInConfig() error

func RegisterAlias

func RegisterAlias(alias, key string)

func Set

func Set(key string, value any)

func SetConfigFile

func SetConfigFile(in string)

func SetConfigName

func SetConfigName(in string)

func SetConfigPermissions

func SetConfigPermissions(perm os.FileMode)

func SetConfigType

func SetConfigType(in string)

func SetDefault

func SetDefault(key string, value any)

func SetEnvKeyReplacer

func SetEnvKeyReplacer(r *strings.Replacer)

func SetEnvPrefix

func SetEnvPrefix(in string)

func Sub

func Sub(key string) *viper.Viper

func Unmarshal

func Unmarshal(rawVal any, opts ...viper.DecoderConfigOption) error

func UnmarshalExact

func UnmarshalExact(rawVal any, opts ...viper.DecoderConfigOption) error

func UnmarshalKey

func UnmarshalKey(key string, rawVal any, opts ...viper.DecoderConfigOption) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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