db

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunMigrations

func RunMigrations(databaseURL string) error

RunMigrations runs all pending database migrations using goose.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB wraps a pgxpool.Pool.

func New

func New(ctx context.Context, databaseURL string) *DB

New creates a new DB, connecting to the given database URL.

func (*DB) Close

func (d *DB) Close()

Close closes the connection pool.

func (*DB) Pool

func (d *DB) Pool() *pgxpool.Pool

Pool returns the underlying pool.

Directories

Path Synopsis
Package dbtest provisions a database for integration tests.
Package dbtest provisions a database for integration tests.

Jump to

Keyboard shortcuts

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