Documentation ¶
Index ¶
- func GetTransactionFunc(db *gorm.DB) (TransactionFunc, Dialect, error)
- func IsDuplicateError(err error) bool
- func Migrations() *migrations.Migrations
- func NewDatabase(parent context.Context, logger *zap.SugaredLogger, host string, user string, ...) (*gorm.DB, string, error)
- func NewLogger(sugar *zap.SugaredLogger) *zapLogger
- func NewTestDatabase() (*gorm.DB, error)
- func Silent(db *gorm.DB) *gorm.DB
- type Dialect
- type TransactionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTransactionFunc ¶
func GetTransactionFunc(db *gorm.DB) (TransactionFunc, Dialect, error)
func IsDuplicateError ¶
func Migrations ¶
func Migrations() *migrations.Migrations
Migrations gormigrate is a wrapper for gorm's migration functions that adds schema versioning and rollback capabilities. For help writing migration steps, see the gorm documentation on migrations: https://gorm.io/docs/migration.html
func NewDatabase ¶
func NewLogger ¶
func NewLogger(sugar *zap.SugaredLogger) *zapLogger
func NewTestDatabase ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.