setup

package
v1.0.806 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DUTY_DB_CREATE   = "DUTY_DB_CREATE"
	DUTY_DB_DATA_DIR = "DUTY_DB_DATA_DIR"
	DUTY_DB_URL      = "DUTY_DB_URL"
	TEST_DB_PORT     = "TEST_DB_PORT"
)

Env vars for embedded db

Variables

View Source
var DefaultContext context.Context
View Source
var PgUrl string
View Source
var WithExistingDatabase = "with_existing_database"
View Source
var WithoutDummyData = "without_dummy_data"
View Source
var WithoutRLS = "rls_disabled"

Functions

func AfterSuiteFn

func AfterSuiteFn()

func BeforeSuiteFn

func BeforeSuiteFn(args ...interface{}) context.Context

func DumpEventQueue added in v1.0.265

func DumpEventQueue(ctx context.Context)

func ExpectJobToPass added in v1.0.265

func ExpectJobToPass(j *job.Job)

func GetEmbeddedPGConfig added in v1.0.254

func GetEmbeddedPGConfig(database string, port int) (embeddedPG.Config, string)

func MustDB

func MustDB() *sql.DB

func NewDB added in v1.0.265

func NewDB(ctx context.Context, name string) (*context.Context, func(), error)

NewDB creates a new database from an existing context, and returns the new context and a function that be called to drop it

func RestartEmbeddedPG added in v1.0.785

func RestartEmbeddedPG() error

func RunEcho added in v1.0.265

func RunEcho(e *echo.Echo) (int, func())

func SetupDB added in v1.0.785

func SetupDB(dbName string, args ...interface{}) (context.Context, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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