Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MysqlDB mysql MysqlDB dBType = iota // PgDB postgresql PgDB )
Variables ¶
Functions ¶
Types ¶
type Config ¶
type Config struct {
User string
Password string
Host string
Port int
DB string
MaxIdleConns int `mapstructure:"max_idle_conns"`
MaxOpenConns int `mapstructure:"max_open_conns"`
MaxLifeTime int `mapstructure:"max_life_time"`
Logger *zap.Logger
Level string
SlowThreshold int `mapstructure:"slow_threshold"`
SQLLenThreshold int `mapstructure:"sql_len_threshold"`
}
Config db config
Source Files
¶
- db.go
- logger.go
Click to show internal directories.
Click to hide internal directories.