Versions in this module Expand all Collapse all v1 v1.0.2 Oct 28, 2026 v1.0.1 Oct 27, 2026 Changes in this version + func GetUserID(ctx context.Context) (uuid.UUID, bool) + func IsSuperadmin(ctx context.Context) bool + func WithSuperadmin(ctx context.Context) context.Context + func WithUser(ctx context.Context, userID uuid.UUID) context.Context + type DB struct + func New(ctx context.Context, cfg config.DatabaseConfig) (*DB, error) + func NewWithConfig(ctx context.Context, poolConfig *pgxpool.Config) (*DB, error) + func (db *DB) Close() + func (db *DB) ExecWithTimeout(ctx context.Context, timeout time.Duration, sql string, args ...any) error + func (db *DB) GetConn(ctx context.Context) (*pgxpool.Conn, error) + func (db *DB) Ping(ctx context.Context) error + func (db *DB) Pool() *pgxpool.Pool + func (db *DB) WithTx(ctx context.Context, fn func(tx pgx.Tx) error) error