Versions in this module Expand all Collapse all v0 v0.1.0 Aug 23, 2026 Changes in this version + const DefaultClaimsPrefix + func ApplyIdentity(ctx context.Context, tx Querier, id Identity) error + func Connect(ctx context.Context, cfg PoolConfig) (*pgxpool.Pool, error) + func IsSerializationFailure(err error) bool + func ParseIsolation(s string) pgx.TxIsoLevel + func QuoteIdent(s string) string + func RunTx(ctx context.Context, db TxBeginner, opts TxOptions, id Identity, ...) error + func SanitizeMessage(pgErr *pgconn.PgError, strict bool) string + func ValidClaimKey(s string) bool + func ValidRole(s string) bool + type Class int + const Conflict + const Internal + const OK + const Permission + const Resource + const Timeout + const UserInput + func (c Class) String() string + type Classified struct + Class Class + Message string + PG *pgconn.PgError + SQLState string + func Classify(err error, detail Detail) Classified + type Detail int + const Dev + const Prod + const Strict + func ParseDetail(s string) Detail + type Identity struct + Claims map[string]any + ClaimsPrefix string + Role string + type PoolConfig struct + ConnectTimeout time.Duration + MaxConns int32 + StatementTimeout time.Duration + URL string + type Querier interface + Exec func(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error) + Query func(ctx context.Context, sql string, args ...any) (pgx.Rows, error) + QueryRow func(ctx context.Context, sql string, args ...any) pgx.Row + type TxBeginner interface + BeginTx func(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error) + type TxOptions struct + Isolation pgx.TxIsoLevel + Log *slog.Logger + MaxRetries int + RLS bool