Documentation ¶
Index ¶
- Variables
- func InitCliContext(ctx *cli.Context, callbacks ...func()) error
- func InitDBMusic()
- func InitDBWarTank()
- func InitDBWarTankCN()
- func InitRedisDefault()
- func LoadConfigFile(e *Environment, callbacks ...func()) error
- type AppConfig
- type Environment
- type File
- type RedisConfig
- type RoundRobinPolicy
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Config *AppConfig DBMusic *gorm.DB DBWarTank *gorm.DB DBWarTankCN *gorm.DB RedisDefault *redis.Client )
View Source
var ( EnvFlag = &cli.StringFlag{ Name: "env", Aliases: []string{"e"}, Usage: "设置程序使用的环境,根据config文件配置决定", Value: "lan", } )
Functions ¶
func InitCliContext ¶ added in v1.1.8
func InitCliContext(ctx *cli.Context, callbacks ...func()) error
func InitDBMusic ¶ added in v1.1.8
func InitDBMusic()
func InitDBWarTank ¶ added in v1.3.0
func InitDBWarTank()
func InitDBWarTankCN ¶ added in v1.1.8
func InitDBWarTankCN()
func InitRedisDefault ¶ added in v1.1.8
func InitRedisDefault()
func LoadConfigFile ¶ added in v1.1.8
func LoadConfigFile(e *Environment, callbacks ...func()) error
Types ¶
type AppConfig ¶
type Environment ¶ added in v1.1.8
type Environment struct {
Env string `yaml:"env"`
}
func (*Environment) String ¶ added in v1.1.8
func (e *Environment) String() string
type RedisConfig ¶ added in v1.1.8
type RedisConfig struct { Addr string `yaml:"addr"` Password string `yaml:"password"` DB int `yaml:"db"` }
func (*RedisConfig) String ¶ added in v1.1.8
func (r *RedisConfig) String() string
type RoundRobinPolicy ¶
type RoundRobinPolicy struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.