Documentation ¶
Index ¶
- func DatabaseInit(config *MysqlConfig)
- func GetEngine(configFile string) *xorm.Engine
- func OrmLevel(level string) core.LogLevel
- func XormEngineInit(config *MysqlConfig) *xorm.Engine
- type Database
- type MysqlConfig
- type OrmLogger
- func (s *OrmLogger) Debug(v ...interface{})
- func (s *OrmLogger) Debugf(format string, v ...interface{})
- func (s *OrmLogger) Error(v ...interface{})
- func (s *OrmLogger) Errorf(format string, v ...interface{})
- func (s *OrmLogger) Info(v ...interface{})
- func (s *OrmLogger) Infof(format string, v ...interface{})
- func (s *OrmLogger) IsShowSQL() bool
- func (s *OrmLogger) Level() core.LogLevel
- func (s *OrmLogger) SetLevel(l core.LogLevel)
- func (s *OrmLogger) ShowSQL(show ...bool)
- func (s *OrmLogger) Warn(v ...interface{})
- func (s *OrmLogger) Warnf(format string, v ...interface{})
- type Session
- type Xorm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatabaseInit ¶
func DatabaseInit(config *MysqlConfig)
func XormEngineInit ¶
func XormEngineInit(config *MysqlConfig) *xorm.Engine
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func GetDefaultDatabse ¶
func GetDefaultDatabse() *Database
func NewDatabase ¶
func NewDatabase(db *xorm.Engine, config *MysqlConfig, retryC int) *Database
type MysqlConfig ¶
type MysqlConfig struct { Drivename string `yaml:"drivename"` Database string `yaml:"database"` Ip string `yaml:"ip"` Port string `yaml:"port"` User string `yaml:"user"` Password string `yaml:"password"` LogLevel string `yaml:"loglevel"` Showsql bool `yaml:"showsql"` Maxidle int `yaml:"maxidle"` Maxopen int `yaml:"maxopen"` }
type OrmLogger ¶
type OrmLogger struct {
// contains filtered or unexported fields
}
xorm 日志实体
type Xorm ¶
type Xorm struct {
Config *MysqlConfig `yaml:"xorm"`
}
Click to show internal directories.
Click to hide internal directories.