sqlrunner

package
v0.0.0-...-2942e7d Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQLRunner

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

MySQLRunner is responsible for creating and tearing down a test database in a local MySQL instance. This runner assumes mysql is already running locally, and does not start or stop the mysql service. mysql must be set up on localhost as described in the CONTRIBUTING.md doc in diego-release.

func NewMySQLRunner

func NewMySQLRunner(sqlDBName string) *MySQLRunner

func (*MySQLRunner) ConnectionString

func (m *MySQLRunner) ConnectionString() string

func (*MySQLRunner) DB

func (m *MySQLRunner) DB() *sql.DB

func (*MySQLRunner) DBName

func (p *MySQLRunner) DBName() string

func (*MySQLRunner) DriverName

func (m *MySQLRunner) DriverName() string

func (*MySQLRunner) Password

func (p *MySQLRunner) Password() string

func (*MySQLRunner) Port

func (p *MySQLRunner) Port() int

func (*MySQLRunner) Reset

func (m *MySQLRunner) Reset()

func (*MySQLRunner) ResetTables

func (m *MySQLRunner) ResetTables(tables []string)

func (*MySQLRunner) Run

func (m *MySQLRunner) Run(signals <-chan os.Signal, ready chan<- struct{}) error

func (*MySQLRunner) Username

func (p *MySQLRunner) Username() string

type PostgresRunner

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

PostgresRunner is responsible for creating and tearing down a test database in a local Postgres instance. This runner assumes mysql is already running locally, and does not start or stop the mysql service. mysql must be set up on localhost as described in the CONTRIBUTING.md doc in diego-release.

func NewPostgresRunner

func NewPostgresRunner(sqlDBName string) *PostgresRunner

func (*PostgresRunner) ConnectionString

func (p *PostgresRunner) ConnectionString() string

func (*PostgresRunner) DB

func (p *PostgresRunner) DB() *sql.DB

func (*PostgresRunner) DBName

func (p *PostgresRunner) DBName() string

func (*PostgresRunner) DriverName

func (p *PostgresRunner) DriverName() string

func (*PostgresRunner) Password

func (p *PostgresRunner) Password() string

func (*PostgresRunner) Port

func (p *PostgresRunner) Port() int

func (*PostgresRunner) Reset

func (p *PostgresRunner) Reset()

func (*PostgresRunner) ResetTables

func (p *PostgresRunner) ResetTables(tables []string)

func (*PostgresRunner) Run

func (p *PostgresRunner) Run(signals <-chan os.Signal, ready chan<- struct{}) error

func (*PostgresRunner) Username

func (p *PostgresRunner) Username() string

type SQLRunner

type SQLRunner interface {
	ifrit.Runner
	ConnectionString() string
	Reset()
	ResetTables(tables []string)
	DriverName() string
	Port() int
	DBName() string
	Username() string
	Password() string
	DB() *sql.DB
}

Jump to

Keyboard shortcuts

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