Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProdEnv = "production" //线上环境 BetaEnv = "beta" //beta环境 DevEnv = "develop" //开发环境 LocalEnv = "local" //本地环境 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheConfig ¶
type CacheConfig struct {
Driver string //驱动类型,目前支持redis
}
type Config ¶
type Config struct { Debug bool `toml:"Debug"` LogHandler string `toml:"LogHandler"` LogDir string `toml:"LogDir"` LogLevel string `toml:"LogLevel"` Env string `toml:"Env"` Cache CacheConfig `toml:"cache"` Redis RedisConfig `toml:"Redis"` Mns MnsConfig `toml:"AliMns"` Db DbConfig `toml:"Db"` Api struct { Host string Port int } `toml:"Api"` }
type DbBaseConfig ¶
type DbConfig ¶
type DbConfig struct { Driver string //驱动类型,目前支持mysql、postgres、mssql、sqlite3 Master DbBaseConfig Slaves []DbBaseConfig Option DbOptionConfig }
type DbOptionConfig ¶
type Options ¶
type Options struct { ShowVersion bool Cmd string ConfFile string App string PidPath string Queue string }
------------------------启动命令配置
type RedisBaseConfig ¶
type RedisConfig ¶
type RedisConfig struct { Master RedisBaseConfig Slaves []RedisBaseConfig Option RedisOptionConfig }
Click to show internal directories.
Click to hide internal directories.