db

package
v0.0.0-...-e2e9b64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TxReadOnly

func TxReadOnly() pgx.TxOptions

func TxWrite

func TxWrite() pgx.TxOptions

Types

type Config

type Config struct {
	URL string `env:"URL"`
}

func (Config) Validate

func (c Config) Validate() error

type Repository

type Repository interface {
	Close()
	Now() pgtype.Timestamp
	Ping(ctx context.Context) error
	Wrap(ctx context.Context, opts pgx.TxOptions, f func(querier db.Querier) error) error
}

func NewRepository

func NewRepository(cfg Config, clock utils.Clock) (Repository, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL