Documentation ¶
Index ¶
- func Get(key string, def ...interface{}) interface{}
- func GetBool(key string, def ...bool) bool
- func GetConfigPath() string
- func GetConfigType() string
- func GetDefaultName() string
- func GetDuration(key string, def ...interface{}) time.Duration
- func GetInt(key string, def ...int) int
- func GetInt16(key string, def ...int16) int16
- func GetInt32(key string, def ...int32) int32
- func GetInt64(key string, def ...int64) int64
- func GetInt8(key string, def ...int8) int8
- func GetIntSlice(key string, def ...interface{}) []int
- func GetSizeInBytes(key string, def ...uint) uint
- func GetString(key string, def ...string) string
- func GetStringMap(key string, def ...map[string]interface{}) map[string]interface{}
- func GetStringMapString(key string, def ...map[string]string) map[string]string
- func GetStringMapStringSlice(key string, def ...map[string][]string) map[string][]string
- func GetStringSlice(key string, def ...string) []string
- func GetTime(key string, def ...interface{}) time.Time
- func GetUint(key string, def ...uint) uint
- func GetUint16(key string, def ...uint16) uint16
- func GetUint32(key string, def ...uint32) uint32
- func GetUint64(key string, def ...uint64) uint64
- func GetUint8(key string, def ...uint8) uint8
- func IsSet(key string) bool
- func SetConfigPath(p string)
- func SetConfigType(t string)
- func SetDefaultName(name string)
- type Config
- func (c *Config) All() map[string]interface{}
- func (c *Config) Get(key string, def ...interface{}) interface{}
- func (c *Config) GetBool(key string, def ...bool) bool
- func (c *Config) GetDuration(key string, def ...interface{}) time.Duration
- func (c *Config) GetInt(key string, def ...int) int
- func (c *Config) GetInt16(key string, def ...int16) int16
- func (c *Config) GetInt32(key string, def ...int32) int32
- func (c *Config) GetInt64(key string, def ...int64) int64
- func (c *Config) GetInt8(key string, def ...int8) int8
- func (c *Config) GetIntSlice(key string, def ...interface{}) []int
- func (c *Config) GetSizeInBytes(key string, def ...uint) uint
- func (c *Config) GetString(key string, def ...string) string
- func (c *Config) GetStringMap(key string, def ...map[string]interface{}) map[string]interface{}
- func (c *Config) GetStringMapString(key string, def ...map[string]string) map[string]string
- func (c *Config) GetStringMapStringSlice(key string, def ...map[string][]string) map[string][]string
- func (c *Config) GetStringSlice(key string, def ...string) []string
- func (c *Config) GetTime(key string, def ...interface{}) time.Time
- func (c *Config) GetUint(key string, def ...uint) uint
- func (c *Config) GetUint16(key string, def ...uint16) uint16
- func (c *Config) GetUint32(key string, def ...uint32) uint32
- func (c *Config) GetUint64(key string, def ...uint64) uint64
- func (c *Config) GetUint8(key string, def ...uint8) uint8
- func (c *Config) IsSet(key string) bool
- func (c *Config) Keys() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(key string, def ...interface{}) interface{}
Get can retrieve any value given the key to use.
func GetConfigPath ¶
func GetConfigPath() string
func GetConfigType ¶
func GetConfigType() string
func GetDefaultName ¶
func GetDefaultName() string
func GetDuration ¶
func GetIntSlice ¶
func GetSizeInBytes ¶
func GetStringMap ¶
func GetStringMapString ¶
func GetStringMapStringSlice ¶
func GetStringSlice ¶
func SetConfigPath ¶
func SetConfigPath(p string)
func SetConfigType ¶
func SetConfigType(t string)
func SetDefaultName ¶
func SetDefaultName(name string)
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) GetDuration ¶
func (*Config) GetIntSlice ¶
func (*Config) GetStringMap ¶
func (*Config) GetStringMapString ¶
func (*Config) GetStringMapStringSlice ¶
Click to show internal directories.
Click to hide internal directories.