Versions in this module Expand all Collapse all v0 v0.0.3 Feb 25, 2026 v0.0.2 Oct 5, 2024 Changes in this version + var RemoteConfig remoteConfigFactory + var SupportedExts = []string + var SupportedRemoteProviders = []string + func AddConfigPath(in string) + func AddRemoteProvider(provider, endpoint, path string) error + func AddSecureRemoteProvider(provider, endpoint, path, secretkeyring string) error + func AllKeys() []string + func AllSettings() map[string]any + func AllowEmptyEnv(allowEmptyEnv bool) + func AutomaticEnv() + func BindEnv(input ...string) error + func BindFlagValue(key string, flag FlagValue) error + func BindFlagValues(flags FlagValueSet) error + func BindPFlag(key string, flag *flag.Flag) error + func BindPFlags(flags *flag.FlagSet) error + func ConfigFileUsed() string + func Debug() + func DebugTo(w io.Writer) + func Get(key string, def ...any) *to.Value + func GetEnvPrefix() string + func InConfig(key string) bool + func IsSet(key string) bool + func MergeConfig(in io.Reader) error + func MergeConfigMap(cfg map[string]any) error + func MergeInConfig() error + func MustBindEnv(input ...string) + func OnConfigChange(run func(in fsnotify.Event)) + func ReadConfig(in io.Reader) error + func ReadInConfig() error + func ReadRemoteConfig() error + func RegisterAlias(alias, key string) + func Reset() + func SafeWriteConfig() error + func SafeWriteConfigAs(filename string) error + func Set(key string, value any) + func SetConfigFile(in string) + func SetConfigName(in string) + func SetConfigPermissions(perm os.FileMode) + func SetConfigType(in string) + func SetDefault(key string, value any) + func SetEnvKeyReplacer(r *strings.Replacer) + func SetEnvPrefix(in string) + func SetFs(fs afero.Fs) + func SetOptions(opts ...Option) + func SetTypeByDefaultValue(enable bool) + func Unmarshal(rawVal any, opts ...DecoderConfigOption) error + func UnmarshalExact(rawVal any, opts ...DecoderConfigOption) error + func UnmarshalKey(key string, rawVal any, opts ...DecoderConfigOption) error + func WatchConfig() + func WatchRemoteConfig() error + func WriteConfig() error + func WriteConfigAs(filename string) error + func WriteConfigTo(w io.Writer) error + type Codec interface + type CodecRegistry interface + type ConfigFileAlreadyExistsError string + func (faee ConfigFileAlreadyExistsError) Error() string + type ConfigFileNotFoundError struct + func (fnfe ConfigFileNotFoundError) Error() string + type ConfigMarshalError struct + func (e ConfigMarshalError) Error() string + type ConfigParseError struct + func (pe ConfigParseError) Error() string + func (pe ConfigParseError) Unwrap() error + type Decoder interface + Decode func(b []byte, v map[string]any) error + type DecoderConfigOption func(*mapstructure.DecoderConfig) + func DecodeHook(hook mapstructure.DecodeHookFunc) DecoderConfigOption + type DecoderRegistry interface + Decoder func(format string) (Decoder, error) + type DefaultCodecRegistry struct + func NewCodecRegistry() *DefaultCodecRegistry + func (r *DefaultCodecRegistry) Decoder(format string) (Decoder, error) + func (r *DefaultCodecRegistry) Encoder(format string) (Encoder, error) + func (r *DefaultCodecRegistry) RegisterCodec(format string, codec Codec) error + type Encoder interface + Encode func(v map[string]any) ([]byte, error) + type EncoderRegistry interface + Encoder func(format string) (Encoder, error) + type Finder interface + Find func(fsys afero.Fs) ([]string, error) + func Finders(finders ...Finder) Finder + type FlagValue interface + HasChanged func() bool + Name func() string + ValueString func() string + ValueType func() string + type FlagValueSet interface + VisitAll func(fn func(FlagValue)) + type Option interface + func EnvKeyReplacer(r StringReplacer) Option + func ExperimentalBindStruct() Option + func ExperimentalFinder() Option + func KeyDelimiter(d string) Option + func WithCodecRegistry(r CodecRegistry) Option + func WithDecodeHook(h mapstructure.DecodeHookFunc) Option + func WithDecoderRegistry(r DecoderRegistry) Option + func WithEncoderRegistry(r EncoderRegistry) Option + func WithFinder(f Finder) Option + func WithLogger(l *slog.Logger) Option + type RemoteConfigError string + func (rce RemoteConfigError) Error() string + type RemoteProvider interface + Endpoint func() string + Path func() string + Provider func() string + SecretKeyring func() string + type RemoteResponse struct + Error error + Value []byte + type StringReplacer interface + Replace func(s string) string + type UnsupportedConfigError string + func (str UnsupportedConfigError) Error() string + type UnsupportedRemoteProviderError string + func (str UnsupportedRemoteProviderError) Error() string + type Viper struct + func GetViper() *Viper + func New() *Viper + func NewWithOptions(opts ...Option) *Viper + func Sub(key string) *Viper + func (v *Viper) AddConfigPath(in string) + func (v *Viper) AddRemoteProvider(provider, endpoint, path string) error + func (v *Viper) AddSecureRemoteProvider(provider, endpoint, path, secretkeyring string) error + func (v *Viper) AllKeys() []string + func (v *Viper) AllSettings() map[string]any + func (v *Viper) AllowEmptyEnv(allowEmptyEnv bool) + func (v *Viper) AutomaticEnv() + func (v *Viper) BindEnv(input ...string) error + func (v *Viper) BindFlagValue(key string, flag FlagValue) error + func (v *Viper) BindFlagValues(flags FlagValueSet) (err error) + func (v *Viper) BindPFlag(key string, flag *flag.Flag) error + func (v *Viper) BindPFlags(flags *flag.FlagSet) error + func (v *Viper) ConfigFileUsed() string + func (v *Viper) Debug() + func (v *Viper) DebugTo(w io.Writer) + func (v *Viper) Get(key string, def ...any) (vl *to.Value) + func (v *Viper) GetEnvPrefix() string + func (v *Viper) InConfig(key string) bool + func (v *Viper) IsSet(key string) bool + func (v *Viper) MergeConfig(in io.Reader) error + func (v *Viper) MergeConfigMap(cfg map[string]any) error + func (v *Viper) MergeInConfig() error + func (v *Viper) Must(key string, def ...any) string + func (v *Viper) MustBindEnv(input ...string) + func (v *Viper) OnConfigChange(run func(in fsnotify.Event)) + func (v *Viper) ReadConfig(in io.Reader) error + func (v *Viper) ReadInConfig() error + func (v *Viper) ReadRemoteConfig() error + func (v *Viper) RegisterAlias(alias, key string) + func (v *Viper) SafeWriteConfig() error + func (v *Viper) SafeWriteConfigAs(filename string) error + func (v *Viper) Set(key string, value any) + func (v *Viper) SetConfigFile(in string) + func (v *Viper) SetConfigName(in string) + func (v *Viper) SetConfigPermissions(perm os.FileMode) + func (v *Viper) SetConfigType(in string) + func (v *Viper) SetDefault(key string, value any) + func (v *Viper) SetEnvKeyReplacer(r *strings.Replacer) + func (v *Viper) SetEnvPrefix(in string) + func (v *Viper) SetFs(fs afero.Fs) + func (v *Viper) SetTypeByDefaultValue(enable bool) + func (v *Viper) Sub(key string) *Viper + func (v *Viper) Unmarshal(rawVal any, opts ...DecoderConfigOption) error + func (v *Viper) UnmarshalExact(rawVal any, opts ...DecoderConfigOption) error + func (v *Viper) UnmarshalKey(key string, rawVal any, opts ...DecoderConfigOption) error + func (v *Viper) WatchConfig() + func (v *Viper) WatchRemoteConfig() error + func (v *Viper) WatchRemoteConfigOnChannel() error + func (v *Viper) WriteConfig() error + func (v *Viper) WriteConfigAs(filename string) error + func (v *Viper) WriteConfigTo(w io.Writer) error