Documentation ¶
Index ¶
- type DBoption
- type GormConfig
- func (cfg *GormConfig) AfterInitialize(v *gorm.DB) error
- func (cfg *GormConfig) Apply(v *gorm.Config) error
- func (cfg *GormConfig) Error(ctx context.Context, msg string, data ...interface{})
- func (cfg *GormConfig) Info(ctx context.Context, msg string, data ...interface{})
- func (cfg *GormConfig) LogMode(lv gormlogger.LogLevel) gormlogger.Interface
- func (l *GormConfig) Trace(ctx context.Context, begin time.Time, ...)
- func (cfg *GormConfig) Warn(ctx context.Context, msg string, data ...interface{})
- type MysqlAccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBoption ¶
type DBoption func(md *MysqlAccess)
DBoption MysqlAccess的设置器
func SetMysqlAccessByConfig ¶
func SetMysqlAccessByConfig(cfg *global.MysqlConfig) DBoption
SetMysqlAccessByConfig 设置数据库的连接字符串
type GormConfig ¶
func (*GormConfig) AfterInitialize ¶
func (cfg *GormConfig) AfterInitialize(v *gorm.DB) error
func (*GormConfig) Error ¶
func (cfg *GormConfig) Error(ctx context.Context, msg string, data ...interface{})
func (*GormConfig) Info ¶
func (cfg *GormConfig) Info(ctx context.Context, msg string, data ...interface{})
func (*GormConfig) LogMode ¶
func (cfg *GormConfig) LogMode(lv gormlogger.LogLevel) gormlogger.Interface
type MysqlAccess ¶
type MysqlAccess struct { gorm.DB Config global.MysqlConfig }
MysqlAccess Mysql连接科器
Click to show internal directories.
Click to hide internal directories.