db_postgres

package
v0.0.0-...-2dc4e31 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalDb *sql.DB

Functions

func ClearDatabaseTables

func ClearDatabaseTables()

func DownTestContainerPostgres

func DownTestContainerPostgres(pgContainer *postgres.PostgresContainer) error

func GetDb

func GetDb() *sql.DB

func ReturnTestContainerConnectionString

func ReturnTestContainerConnectionString(pgContainer *postgres.PostgresContainer) (*string, error)

func RunMigrations

func RunMigrations(connectionString string, migrationUrl string)

func UpTestContainerPostgres

func UpTestContainerPostgres() (*postgres.PostgresContainer, error)

Types

type Postgres

type Postgres struct {
	ConnectionString string
	MigrationUrl     string
}

func (*Postgres) Connect

func (p *Postgres) Connect()

func (*Postgres) Disconnect

func (p *Postgres) Disconnect()

Jump to

Keyboard shortcuts

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