apptest

package
v0.0.0-...-23299de Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDSN

func GetDSN(port string, dbName string) string

Types

type PGConn

type PGConn struct {
	DB       *sqlx.DB
	DSN      string
	TimeZone *time.Location
	// contains filtered or unexported fields
}

func StartTestPostgres

func StartTestPostgres(t *testing.T) (*PGConn, error)

StartTestPostgres starts a postgres container and returns a sqlx connection to it.

func (*PGConn) NewConnection

func (pg *PGConn) NewConnection(t *testing.T, db string) *PGConn

NewConnection returns a new connection to the database.

Jump to

Keyboard shortcuts

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