Documentation ¶
Index ¶
- Variables
- type Adapter
- type Config
- func (c *Config) AddWatcher(watcher ...Watcher)
- func (c *Config) AllKeys() []string
- func (c *Config) AllSettings() map[string]interface{}
- func (c *Config) Get(key string, def ...interface{}) interface{}
- func (c *Config) GetBool(key string, def ...interface{}) bool
- func (c *Config) GetDuration(key string, def ...interface{}) time.Duration
- func (c *Config) GetFloat64(key string, def ...interface{}) float64
- func (c *Config) GetInt(key string, def ...interface{}) int
- func (c *Config) GetInt32(key string, def ...interface{}) int32
- func (c *Config) GetInt64(key string, def ...interface{}) int64
- func (c *Config) GetIntSlice(key string, def ...interface{}) []int
- func (c *Config) GetSizeInBytes(key string, def ...interface{}) uint
- func (c *Config) GetString(key string, def ...interface{}) string
- func (c *Config) GetStringMap(key string, def ...interface{}) map[string]interface{}
- func (c *Config) GetStringMapString(key string, def ...interface{}) map[string]string
- func (c *Config) GetStringMapStringSlice(key string, def ...interface{}) map[string][]string
- func (c *Config) GetStringSlice(key string, def ...interface{}) []string
- func (c *Config) GetTime(key string, def ...interface{}) time.Time
- func (c *Config) GetUint(key string, def ...interface{}) uint
- func (c *Config) GetUint32(key string, def ...interface{}) uint32
- func (c *Config) GetUint64(key string, def ...interface{}) uint64
- func (c *Config) IsSet(key string) bool
- func (c *Config) MergeConfig(in io.Reader) error
- func (c *Config) MergeConfigMap(cfg map[string]interface{}) error
- func (c *Config) SafeWriteConfig() error
- func (c *Config) SafeWriteConfigAs(filename string) error
- func (c *Config) Set(key string, value interface{})
- func (c *Config) SetDefault(key string, value interface{})
- func (c *Config) Sub(key string) *Config
- func (c *Config) Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error
- func (c *Config) UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error
- func (c *Config) Viper() *viper.Viper
- func (c *Config) Wait()
- func (c *Config) Watch()
- func (c *Config) WriteConfig() error
- func (c *Config) WriteConfigAs(filename string) error
- type Content
- type File
- type Remote
- type Watcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultFileName = "config" DefaultSearchPath = []string{".", "config"} )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) AllSettings ¶
func (*Config) GetDuration ¶
func (*Config) GetFloat64 ¶
func (*Config) GetIntSlice ¶
func (*Config) GetSizeInBytes ¶
func (*Config) GetStringMap ¶
func (*Config) GetStringMapString ¶
func (*Config) GetStringMapStringSlice ¶
func (*Config) GetStringSlice ¶
func (*Config) MergeConfigMap ¶
func (*Config) SafeWriteConfig ¶
func (*Config) SafeWriteConfigAs ¶
func (*Config) SetDefault ¶
func (*Config) Unmarshal ¶
func (c *Config) Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error
func (*Config) UnmarshalKey ¶
func (c *Config) UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error
func (*Config) WriteConfig ¶
func (*Config) WriteConfigAs ¶
Click to show internal directories.
Click to hide internal directories.