Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitDatabase ¶
InitDatabase ... initializes the database connection.
Types ¶
type LoggerQueryHook ¶
type LoggerQueryHook struct {
// contains filtered or unexported fields
}
LoggerQueryHook implements logger that correspond to `bun.QueryHook` interface.
func NewLoggerQueryHook ¶
func NewLoggerQueryHook(logger *zap.Logger) *LoggerQueryHook
NewLoggerQueryHook initializes a new `LoggerQueryHook`.
func (*LoggerQueryHook) AfterQuery ¶
func (h *LoggerQueryHook) AfterQuery(ctx context.Context, event *bun.QueryEvent)
AfterQuery provides a hook to correspond to `bun.QueryHook` interface.
func (*LoggerQueryHook) BeforeQuery ¶
func (h *LoggerQueryHook) BeforeQuery(ctx context.Context, event *bun.QueryEvent) context.Context
BeforeQuery provides a hook to correspond to `bun.QueryHook` interface.
Click to show internal directories.
Click to hide internal directories.