Documentation ¶
Index ¶
- func Get(key string) any
- func GetBool(key string) bool
- func GetByte(key string) []byte
- func GetDuration(key string) time.Duration
- func GetFloat64(key string) float64
- func GetInt(key string) int
- func GetInt64(key string) int64
- func GetIntSlice(key string) []int
- func GetMaps(key string) []map[string]any
- func GetString(key string) string
- func GetStringMap(key string) map[string]any
- func GetStringMapStringSlice(key string) map[string][]string
- func GetStringSlice(key string) []string
- func GetTime(key string) time.Time
- func SetKey(key string, value any)
- type ConfigStr
- func (c *ConfigStr) AddPath(in string) *ConfigStr
- func (c *ConfigStr) AddRemoteProvider(provider, endpoint, path string) error
- func (c *ConfigStr) AddSecureRemoteProvider(provider, endpoint, path, secretKeyRing string) error
- func (c *ConfigStr) Etcd3(hosts []string, path, username, pwd string) (err error)
- func (c *ConfigStr) Register() (err error)
- func (c *ConfigStr) SetFile(in string) *ConfigStr
- func (c *ConfigStr) SetType(in string) *ConfigStr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStringMapStringSlice ¶ added in v1.5.2
GetStringMapStringSlice 获取
Types ¶
type ConfigStr ¶ added in v1.5.2
type ConfigStr struct { Viper *viper.Viper UserName string Password string // contains filtered or unexported fields }
var Config *ConfigStr
func (*ConfigStr) AddRemoteProvider ¶ added in v1.5.2
AddRemoteProvider 添加远程连接
func (*ConfigStr) AddSecureRemoteProvider ¶ added in v1.5.2
AddSecureRemoteProvider 添加远程连接
Click to show internal directories.
Click to hide internal directories.