Documentation
¶
Index ¶
- Variables
- type CacheInterface
- type CommonInterface
- type Config
- func (c *Config) Get(key string) any
- func (c *Config) GetBool(key string) bool
- func (c *Config) GetDuration(key string) time.Duration
- func (c *Config) GetFloat64(key string) float64
- func (c *Config) GetInt(key string) int
- func (c *Config) GetInt32(key string) int32
- func (c *Config) GetInt64(key string) int64
- func (c *Config) GetString(key string) string
- func (c *Config) GetStringMap(key string) map[string]any
- func (c *Config) GetStringSlice(key string) []string
- func (c *Config) GetUint64(key string) uint64
- type Interface
- type Options
- type Viper
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfEnv string
Functions ¶
This section is empty.
Types ¶
type CacheInterface ¶
type CacheInterface interface { CommonInterface FuzzyDelete(keyPre string) }
CacheInterface cache interface
type CommonInterface ¶
type CommonInterface interface { Get(key string) any Set(key string, value any) bool Has(key string) bool }
CommonInterface ...
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) GetFloat64 ¶
func (*Config) GetStringSlice ¶
type Interface ¶
type Interface interface { Get(key string) any GetString(key string) string GetBool(key string) bool GetInt(key string) int GetInt32(key string) int32 GetInt64(key string) int64 GetFloat64(key string) float64 GetDuration(key string) time.Duration GetStringSlice(key string) []string GetStringMap(key string) map[string]any }
Interface cache interface
type Options ¶
type Options struct { FileName string // file name BasePath string // base path Ctype string // type of config file CachePrefix string // cache prefix Cache CacheInterface // Configure the register to customize the register, such as using redis You only need to implement the CacheInterface interface }
Options 配置选项
Click to show internal directories.
Click to hide internal directories.