Documentation ¶
Index ¶
- Variables
- func AllKeys() []string
- func AllSettings() map[string]interface{}
- func Get(k string) interface{}
- func GetBool(k 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 Init()
- func IsSet(key string) bool
- func RegisterChangeEvent(f func(e fsnotify.Event))
Constants ¶
This section is empty.
Variables ¶
var CfgFile string
CfgFile 配置文件路径,允许在初始化前,由外部包赋值
Functions ¶
func AllKeys ¶
func AllKeys() []string
AllKeys returns all keys holding a value, regardless of where they are set. Nested keys are returned with a v.keyDelim (= ".") separator
func AllSettings ¶
func AllSettings() map[string]interface{}
AllSettings merges all settings and returns them as a map[string]interface{}.
func GetDuration ¶
GetDuration returns the value associated with the key as a duration.
func GetFloat64 ¶
GetFloat64 returns the value associated with the key as a float64.
func GetSizeInBytes ¶
GetSizeInBytes returns the size of the value associated with the given key in bytes.
func GetStringMap ¶
GetStringMap returns the value associated with the key as a map of interfaces.
func GetStringMapString ¶
GetStringMapString returns the value associated with the key as a map of strings.
func GetStringMapStringSlice ¶
GetStringMapStringSlice returns the value associated with the key as a map to a slice of strings.
func GetStringSlice ¶
GetStringSlice returns the value associated with the key as a slice of strings.
func IsSet ¶
IsSet checks to see if the key has been set in any of the data locations. IsSet is case-insensitive for a key.
func RegisterChangeEvent ¶
RegisterChangeEvent 注册配置变更事件
Types ¶
This section is empty.