Documentation ¶
Index ¶
- Variables
- func InitDB() (err error)
- func New(config gormLog.Config) gormLog.Interface
- func NewReadSession() (db *gorm.DB)
- func NewReadSessionWithOptions(options *gorm.Session) (db *gorm.DB)
- func NewWriteSession() (db *gorm.DB)
- func NewWriteSessionWithOptions(options *gorm.Session) (db *gorm.DB)
- type BaseOptions
- type CustomOptions
- type GormLog
- func (l GormLog) Error(ctx context.Context, msg string, data ...interface{})
- func (l GormLog) Info(ctx context.Context, msg string, data ...interface{})
- func (l *GormLog) LogMode(level gormLog.LogLevel) gormLog.Interface
- func (l GormLog) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l GormLog) Warn(ctx context.Context, msg string, data ...interface{})
- type Log
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Read *gorm.DB Write *gorm.DB )
View Source
var ( DefaultCustomOptions = &CustomOptions{ GormConfig: &gorm.Config{}, } )
Functions ¶
func NewReadSession ¶
func NewWriteSession ¶
Types ¶
type BaseOptions ¶
type CustomOptions ¶
Click to show internal directories.
Click to hide internal directories.