Documentation ¶
Index ¶
- type Cfg
- type Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) IsShowSQL() bool
- func (l *Logger) Level() xorm.LogLevel
- func (l *Logger) SetLevel(level xorm.LogLevel)
- func (l *Logger) ShowSQL(show ...bool)
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
- type Mysql
- type MysqlCfg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cfg ¶
type Cfg interface { //get read mysql GetReadMysql() *MysqlCfg //GetWriteMysql get write mysql GetWriteMysql() *MysqlCfg }
cfg
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
logger is a logger interface
type Mysql ¶
type Mysql struct {
// contains filtered or unexported fields
}
mysql
func (*Mysql) GetReadEngine ¶
return read Mysql engine
func (*Mysql) GetWriteEngine ¶
return write Mysql engine
type MysqlCfg ¶
type MysqlCfg struct { //db ip DbIP string `ini:"DbIp"` //db pwd DbPWd string `ini:"DbPwd"` //db user DbUser string `ini:"DbUser"` //database Database string `ini:"Database"` //SetMaxIdleConns set the max idle connections on pool, default is 2 MaxIdleConns int `ini:"MaxIdleConns"` //SetMaxOpenConns is only available for go 1.2+ MaxOpenConns int `ini:"MaxOpenConns"` //SetConnMaxLifetime sets the maximum amount of time a connection may be reused. ConnMaxLifetime int `ini:"ConnMaxLifetime"` //log switch OpenLog bool `ini:"OpenLog"` }
mysql config
Click to show internal directories.
Click to hide internal directories.