Files
micro_layout/internal/storage/config.go
T
2025-12-05 17:23:29 +08:00

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"`
}