Documentation ¶
Index ¶
- func Get(key string) interface{}
- func GetBool(key string) bool
- func GetDuration(key string) time.Duration
- func GetFloat64(key string) float64
- func GetInt(key string) int
- func GetInt32(key string) int32
- func GetInt64(key string) int64
- func GetSizeInBytes(key string) uint
- func GetString(key string) string
- func GetStringMap(key string) map[string]interface{}
- func GetStringMapString(key string) map[string]string
- func GetStringMapStringSlice(key string) map[string][]string
- func GetStringSlice(key string) []string
- func GetTime(key string) time.Time
- func GetUint(key string) uint
- func GetUint32(key string) uint32
- func GetUint64(key string) uint64
- func Set(key string, value interface{})
- func Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error
- func UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error
- type Config
- type MemConfig
- func (mc *MemConfig) Get(key string) interface{}
- func (mc *MemConfig) GetBool(key string) bool
- func (mc *MemConfig) GetDuration(key string) time.Duration
- func (mc *MemConfig) GetFloat64(key string) float64
- func (mc *MemConfig) GetInt(key string) int
- func (mc *MemConfig) GetInt32(key string) int32
- func (mc *MemConfig) GetInt64(key string) int64
- func (mc *MemConfig) GetSizeInBytes(key string) uint
- func (mc *MemConfig) GetString(key string) string
- func (mc *MemConfig) GetStringMap(key string) map[string]interface{}
- func (mc *MemConfig) GetStringMapString(key string) map[string]string
- func (mc *MemConfig) GetStringMapStringSlice(key string) map[string][]string
- func (mc *MemConfig) GetStringSlice(key string) []string
- func (mc *MemConfig) GetTime(key string) time.Time
- func (mc *MemConfig) GetUint(key string) uint
- func (mc *MemConfig) GetUint32(key string) uint32
- func (mc *MemConfig) GetUint64(key string) uint64
- func (mc *MemConfig) Set(key string, value interface{})
- func (mc *MemConfig) Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error
- func (mc *MemConfig) UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error
- type NullConfig
- func (nc *NullConfig) Get(key string) interface{}
- func (nc *NullConfig) GetBool(key string) bool
- func (nc *NullConfig) GetDuration(key string) time.Duration
- func (nc *NullConfig) GetFloat64(key string) float64
- func (nc *NullConfig) GetInt(key string) int
- func (nc *NullConfig) GetInt32(key string) int32
- func (nc *NullConfig) GetInt64(key string) int64
- func (nc *NullConfig) GetSizeInBytes(key string) uint
- func (nc *NullConfig) GetString(key string) string
- func (nc *NullConfig) GetStringMap(key string) map[string]interface{}
- func (nc *NullConfig) GetStringMapString(key string) map[string]string
- func (nc *NullConfig) GetStringMapStringSlice(key string) map[string][]string
- func (nc *NullConfig) GetStringSlice(key string) []string
- func (nc *NullConfig) GetTime(key string) time.Time
- func (nc *NullConfig) GetUint(key string) uint
- func (nc *NullConfig) GetUint32(key string) uint32
- func (nc *NullConfig) GetUint64(key string) uint64
- func (nc *NullConfig) Set(key string, value interface{})
- func (nc *NullConfig) Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error
- func (nc *NullConfig) UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error
- type Option
- type ViperConfOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDuration ¶
func GetFloat64 ¶
func GetSizeInBytes ¶
func GetStringMap ¶
func GetStringMapString ¶
func GetStringMapStringSlice ¶
func GetStringSlice ¶
func Unmarshal ¶
func Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error
func UnmarshalKey ¶
func UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error
Types ¶
type Config ¶
type Config interface { Get(key string) interface{} GetString(key string) string GetBool(key string) bool GetInt(key string) int GetInt32(key string) int32 GetInt64(key string) int64 GetUint(key string) uint GetUint32(key string) uint32 GetUint64(key string) uint64 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 UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error Set(key string, value interface{}) }
func NewViperConfig ¶
type MemConfig ¶
type MemConfig struct {
// contains filtered or unexported fields
}
func NewMemConfig ¶
func NewMemConfig() *MemConfig
func (*MemConfig) GetFloat64 ¶
func (*MemConfig) GetSizeInBytes ¶
Not implemented.
func (*MemConfig) GetStringMap ¶
func (*MemConfig) GetStringMapString ¶
func (*MemConfig) GetStringMapStringSlice ¶
func (*MemConfig) GetStringSlice ¶
func (*MemConfig) Unmarshal ¶
func (mc *MemConfig) Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error
func (*MemConfig) UnmarshalKey ¶
func (mc *MemConfig) UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error
type NullConfig ¶
type NullConfig struct{}
func NewNullConfig ¶
func NewNullConfig() *NullConfig
func (*NullConfig) Get ¶
func (nc *NullConfig) Get(key string) interface{}
func (*NullConfig) GetBool ¶
func (nc *NullConfig) GetBool(key string) bool
func (*NullConfig) GetDuration ¶
func (nc *NullConfig) GetDuration(key string) time.Duration
func (*NullConfig) GetFloat64 ¶
func (nc *NullConfig) GetFloat64(key string) float64
func (*NullConfig) GetInt ¶
func (nc *NullConfig) GetInt(key string) int
func (*NullConfig) GetInt32 ¶
func (nc *NullConfig) GetInt32(key string) int32
func (*NullConfig) GetInt64 ¶
func (nc *NullConfig) GetInt64(key string) int64
func (*NullConfig) GetSizeInBytes ¶
func (nc *NullConfig) GetSizeInBytes(key string) uint
Not implemented.
func (*NullConfig) GetString ¶
func (nc *NullConfig) GetString(key string) string
func (*NullConfig) GetStringMap ¶
func (nc *NullConfig) GetStringMap(key string) map[string]interface{}
func (*NullConfig) GetStringMapString ¶
func (nc *NullConfig) GetStringMapString(key string) map[string]string
func (*NullConfig) GetStringMapStringSlice ¶
func (nc *NullConfig) GetStringMapStringSlice(key string) map[string][]string
func (*NullConfig) GetStringSlice ¶
func (nc *NullConfig) GetStringSlice(key string) []string
func (*NullConfig) GetUint ¶
func (nc *NullConfig) GetUint(key string) uint
func (*NullConfig) GetUint32 ¶
func (nc *NullConfig) GetUint32(key string) uint32
func (*NullConfig) GetUint64 ¶
func (nc *NullConfig) GetUint64(key string) uint64
func (*NullConfig) Set ¶
func (nc *NullConfig) Set(key string, value interface{})
func (*NullConfig) Unmarshal ¶
func (nc *NullConfig) Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error
func (*NullConfig) UnmarshalKey ¶
func (nc *NullConfig) UnmarshalKey(key string, rawVal interface{}, opts ...viper.DecoderConfigOption) error
type ViperConfOptions ¶
type ViperConfOptions struct{}
func (ViperConfOptions) WithConfFile ¶
func (ViperConfOptions) WithConfFile(configFile []string) Option
func (ViperConfOptions) WithConfigType ¶
func (ViperConfOptions) WithConfigType(configType string) Option
Click to show internal directories.
Click to hide internal directories.