Documentation
¶
Index ¶
- Variables
- func FxModule() fx.Option
- func New(cfg *configs.Database, slogLogger *slog.Logger, clock time.Clock) (db *gorm.DB, err error)
- type Logger
- func (l Logger) Error(ctx context.Context, msg string, args ...any)
- func (l Logger) Info(ctx context.Context, msg string, args ...any)
- func (l Logger) LogMode(lvl gorml.LogLevel) gorml.Interface
- func (l Logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l Logger) Warn(ctx context.Context, msg string, args ...any)
- type Transaction
- type TransactionManager
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedDriver is returned when specified database driver does not exists. ErrUnsupportedDriver = errors.New("unsupported database driver") )
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is used to replace the default Gorm logger.
type TransactionManager ¶
type TransactionManager interface {
New() Transaction
}
func NewTransactionManager ¶
func NewTransactionManager(db *gorm.DB) TransactionManager
Click to show internal directories.
Click to hide internal directories.