Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModeDev = "dev" ModeProd = "prod" ProvidorFile = "file" ProvidorStdOut = "stdout" RotateByDay = "day" RotateBySize = "size" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { Name string Mode string Host string Port int Log LogConfig Mysql MysqlConfig Redis RedisConfig }
AppConfig for application
type LogConfig ¶
type LogConfig struct { Name string Providor string LogPath string RotateMode string RotateLimit string Suffix string RotateEnable bool }
LogConfig for logger
type MysqlConfig ¶
type MysqlConfig struct { Instances []MysqlInstance InitMySQL bool Ping bool }
MysqlConfig for MySQL
type MysqlInstance ¶
type MysqlInstance struct { Name string `json:"name"` Host string `json:"host"` User string `json:"user"` Pwd string `json:"password"` Db string `json:"db"` Option string `json:"option"` Version string `json:"version"` Port int `json:"port"` ReadOnly bool `json:"read_only"` }
MysqlInstance represents a single instance of mysql server
func (MysqlInstance) String ¶
func (inst MysqlInstance) String() string
type RedisConfig ¶ added in v0.1.1
type RedisConfig struct { InitRedis bool Ping bool RedisInstance }
RedisConfig for redis
type RedisInstance ¶
type RedisInstance struct { Name string `json:"name"` Host string `json:"host"` Pwd string `json:"password"` Port int `json:"port"` Db int `json:"database"` }
RedisInstance represents a single instance of redis server
func (RedisInstance) Address ¶
func (inst RedisInstance) Address() string
Address returns the address of redis server
Click to show internal directories.
Click to hide internal directories.