Documentation
¶
Index ¶
- Variables
- func DeleteRecordAll(_ testing.TB, db *gorm.DB, tableWhereClauses []string) error
- func IsKeyConflictErr(err error) bool
- func IsRecordNotFoundErr(err error) bool
- func MigrateDB(db *gorm.DB) error
- func NewDatabase(cfg *config.DBConfig, lg *zap.SugaredLogger) (*gorm.DB, error)
- func NewTestDatabase(tb testing.TB, migration bool) *gorm.DB
- type Logger
- func (l *Logger) Error(ctx context.Context, s string, i ...interface{})
- func (l *Logger) Info(ctx context.Context, s string, i ...interface{})
- func (l *Logger) LogMode(level glogger.LogLevel) glogger.Interface
- func (l *Logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *Logger) Warn(ctx context.Context, s string, i ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("record not found") ErrKeyConflict = errors.New("key conflict") )
Functions ¶
func DeleteRecordAll ¶
func IsKeyConflictErr ¶
func IsRecordNotFoundErr ¶
func NewDatabase ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.