db

package
v0.0.0-...-3ef2293 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WireSet = wire.NewSet(
	InitializeDB,
)

Functions

This section is empty.

Types

type Database

type Database struct {
	Pool *pgxpool.Pool
}

func InitializeDB

func InitializeDB(cfg configs.DatabaseConfig) (*Database, func(), error)

func (*Database) Close

func (db *Database) Close()

Close closes the database connections.

func (*Database) MigrateDown

func (db *Database) MigrateDown() error

MigrateDown rolls back the latest migration.

func (*Database) MigrateUp

func (db *Database) MigrateUp() error

MigrateUp applies all pending migrations.

Jump to

Keyboard shortcuts

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