ing
This commit is contained in:
parent
60a842e195
commit
e413bd0bf6
36
config.go
36
config.go
|
@ -49,9 +49,45 @@ func (crae CircularReferenceAliasError) Error() string {
|
|||
}
|
||||
|
||||
type Configurator interface {
|
||||
OnConfigChange(run func(in fsnotify.Event))
|
||||
WatchConfig()
|
||||
SetConfigType(in string)
|
||||
SetConfigFile(in string)
|
||||
SetEnvPrefix(in string)
|
||||
SetConfigName(in string)
|
||||
AddConfigPath(in string) error
|
||||
ReadConfig(in io.Reader) error
|
||||
ReadInConfig() error
|
||||
AutomaticEnv()
|
||||
SetEnvKeyReplacer(r *strings.Replacer)
|
||||
RegisterAlias(alias string, key string) error
|
||||
SetDefault(key string, value interface{})
|
||||
Set(key string, value interface{})
|
||||
IsSet(key string) bool
|
||||
Get(key string) interface{}
|
||||
GetString(key string) string
|
||||
GetBool(key string) bool
|
||||
GetInt(key string) int
|
||||
GetInt64(key string) int64
|
||||
GetFloat64(key string) float64
|
||||
GetTime(key string) time.Time
|
||||
GetDuration(key string) time.Duration
|
||||
GetStringSlice(key string) []string
|
||||
GetStringMap(key string) map[string]interface{}
|
||||
GetStringMapString(key string) map[string]string
|
||||
GetStringMapStringSlice(key string) map[string][]string
|
||||
GetSizeInBytes(key string) uint
|
||||
Sub(key string) Configurator
|
||||
UnmarshalKey(key string, rawVal interface{}) error
|
||||
Unmarshal(rawVal interface{}) error
|
||||
UnmarshalExact(rawVal interface{}) error
|
||||
BindPFlags(flags *pflag.FlagSet) error
|
||||
BindPFlag(key string, flag *pflag.Flag) error
|
||||
BindFlagValues(flags FlagValueSet) (err error)
|
||||
BindFlagValue(key string, flag FlagValue) error
|
||||
BindEnv(input ...string) error
|
||||
AllSettings() map[string]interface{}
|
||||
AllKeys() []string
|
||||
}
|
||||
|
||||
type configurator struct {
|
||||
|
|
Loading…
Reference in New Issue
Block a user