Documentation ¶
Overview ¶
Package dbconfig defines the parameters and methods needed for the PostgreSQL and SQLite tests.
Index ¶
Constants ¶
View Source
const ( PGTestsHost = "localhost" // "/run/postgresql" for UNIX socket PGTestsPort = "5432" // "" for UNIX socket PGTestsUser = "postgres" // "ecrdata" for full database rather than test data repo PGTestsPass = "" PGTestsDBName = "ecrdata_mainnet_test" )
Test DB server and database config.
Variables ¶
This section is empty.
Functions ¶
func CustomScanner ¶
func CustomScanner(m Migrations) error
CustomScanner enables a given *.sql file dump to be scanned and loaded into the respective query runner using the Runner method.
Types ¶
type Migrations ¶
type Migrations interface { // Path returns the filepath to the *.sql dump file. Path() string // Runner executes the scanned individual queries one after another. Runner(query string) error }
Migrations enables a custom migration runner to be used to load data from a given *.sql file dump into the migrations runner method.
Click to show internal directories.
Click to hide internal directories.