Documentation ¶
Overview ¶
Package mysql is the mysql instance builder.
Index ¶
Constants ¶
View Source
const ( Silent glogger.LogLevel = iota + 1 Error Warn Info )
Define gorm log levels.
Variables ¶
This section is empty.
Functions ¶
func NewMysqlIns ¶ added in v0.1.7
NewMysqlIns creates a gorm db instance.
Types ¶
type MysqlOptions ¶
type MysqlOptions struct { Addr string Username string Password string Database string MaxIdleConns int `mapstructure:"max-idle-conns"` MaxOpenConns int `mapstructure:"max-open-conns"` MaxConnLifeTime time.Duration `mapstructure:"max-connection-life-time"` SlowThreshold time.Duration `mapstructure:"slow-threshold"` LogLevel int `mapstructure:"log-level"` }
MysqlOptions defines options for building a mysql instance.
Click to show internal directories.
Click to hide internal directories.