db_setup

package
v0.0.0-...-1d59f67 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QuoteIdentifier

func QuoteIdentifier(s string) string

Types

type DBManager

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

func NewDatabaseManager

func NewDatabaseManager(opts ...DBOption) *DBManager

GetDatabaseManager: get a singleton instance of the test db manager.

func (*DBManager) Cleanup

func (dbm *DBManager) Cleanup()

func (*DBManager) CreateTestDatabase

func (dbm *DBManager) CreateTestDatabase() string

type DBOption

type DBOption func(dbm *DBManager)

func WithConnectionString

func WithConnectionString(connString string) DBOption

func WithCustomTmplName

func WithCustomTmplName(tmplName string) DBOption

func WithMigrationDir

func WithMigrationDir(migrationDir string) DBOption

Jump to

Keyboard shortcuts

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