22 lines
508 B
Go
22 lines
508 B
Go
package storage
|
|
|
|
type Config struct {
|
|
Mysql ConfigMysql `json:"mysql"`
|
|
Redis ConfigRedis `json:"redis"`
|
|
}
|
|
|
|
type ConfigMysql struct {
|
|
DB string `json:"db"`
|
|
Debug bool `json:"debug"`
|
|
ShowSQL bool `json:"show_sql"`
|
|
MaxOpenConn int `json:"max_open_conn"`
|
|
MaxIdleConn int `json:"max_idle_conn"`
|
|
ConnMaxLifetime int `json:"conn_max_life_time"`
|
|
}
|
|
|
|
type ConfigRedis struct {
|
|
Addr string `json:"addr"`
|
|
Auth string `json:"auth"`
|
|
DB int `json:"db"`
|
|
}
|