Versions in this module Expand all Collapse all v1 v1.0.0 Jun 15, 2023 Changes in this version + var ErrDBNotFound = errors.New("the db singletons not found or not initialization") + func AutoInitGormWithConfig() + func GetGormSingleton(name string) (gdb *gorm.DB, err error) + func GetGormSingletonByModel(gormmodel GormModel) (gdb *gorm.DB, err error) + func InitGorm(dbname string, cfg GormConfig) error + type GormConfig struct + ConnPoolConfig GormConnPoolConfig + GormConfig *gorm.Config + MysqlConfig *mysql.Config + type GormConnPoolConfig struct + MaxIdleConns int + MaxOpenConns int + type GormLog struct + Config GormLogConfig + Logger *fileLogger.FileLogger + func NewGormLogger(config GormLogConfig) *GormLog + func (gl *GormLog) Error(ctx context.Context, format string, args ...interface{}) + func (gl *GormLog) Info(ctx context.Context, format string, args ...interface{}) + func (gl *GormLog) LogMode(lv glog.LogLevel) glog.Interface + func (gl *GormLog) Prefix() string + func (gl *GormLog) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) + func (gl *GormLog) Warn(ctx context.Context, format string, args ...interface{}) + func (gl *GormLog) WithPrefix(prefix string) glog.Interface + type GormLogConfig struct + IgnoreRecordNotFoundError bool + Level glog.LogLevel + LogName string + LogPath string + Prefix string + SlowThreshold time.Duration + type GormModel interface + DbName func() string