Documentation
¶
Index ¶
- func NewPostgresClient(cfg config.PostgresConfigs) (*gorm.DB, error)
- type Database
- type Logger
- func (l *Logger) Error(ctx context.Context, msg string, data ...interface{})
- func (l *Logger) Info(ctx context.Context, msg string, data ...interface{})
- func (l *Logger) LogMode(level gormlogger.LogLevel) gormlogger.Interface
- func (l *Logger) Trace(ctx context.Context, begin time.Time, ...)
- func (l *Logger) Warn(ctx context.Context, msg string, data ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostgresClient ¶
func NewPostgresClient(cfg config.PostgresConfigs) (*gorm.DB, error)
NewPostgresClient creates a new connection to postgres
Types ¶
type Database ¶
Database is a wrapper type for the gorm DB pointer
func NewDatabase ¶
NewDatabase return a Database instance
Click to show internal directories.
Click to hide internal directories.