Versions in this module Expand all Collapse all v1 v1.1.0 Mar 14, 2024 v1.0.0 Jan 11, 2024 Changes in this version + func FetchLogLevel(level string) logger.LogLevel + type CtxOrmLogger struct + func NewCtxOrmLogger(level logger.LogLevel, withValues bool) *CtxOrmLogger + func (l *CtxOrmLogger) Error(ctx context.Context, msg string, opts ...interface{}) + func (l *CtxOrmLogger) Info(ctx context.Context, msg string, opts ...interface{}) + func (l *CtxOrmLogger) LogMode(level logger.LogLevel) logger.Interface + func (l *CtxOrmLogger) ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{}) + func (l *CtxOrmLogger) Trace(ctx context.Context, begin time.Time, f func() (string, int64), err error) + func (l *CtxOrmLogger) Warn(ctx context.Context, msg string, opts ...interface{}) + type DefaultOrmFactory struct + func (f *DefaultOrmFactory) Create(options ...OrmOption) (*gorm.DB, error) + type Driver int + const Mysql + const Postgres + const SqlServer + const Sqlite + const Unknown + func FetchDriver(driver string) Driver + func (d Driver) String() string + type Options struct + Config gorm.Config + Driver Driver + Dsn string + func DefaultOrmOptions() Options + type OrmFactory interface + Create func(options ...OrmOption) (*gorm.DB, error) + func NewDefaultOrmFactory() OrmFactory + type OrmOption func(o *Options) + func WithConfig(c gorm.Config) OrmOption + func WithDriver(d Driver) OrmOption + func WithDsn(d string) OrmOption