containers

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionParams

type ConnectionParams struct {
	DBName string
	DBUser string
	DBPass string
	DBHost string
	DBPort string
	DBFile string
}

type MySQLContainer

type MySQLContainer struct {
	ID         string
	Connection ConnectionParams
	Cleanup    func() error
	// contains filtered or unexported fields
}

func StartMySQLContainer

func StartMySQLContainer(ctx context.Context, t *testing.T, dbName, dbUser, dbPassword, dbPort string) (*MySQLContainer, error)

func (*MySQLContainer) Close

func (mysql *MySQLContainer) Close() error

func (*MySQLContainer) GetConnection

func (mysql *MySQLContainer) GetConnection() ConnectionParams

type PostgreSQLContainer

type PostgreSQLContainer struct {
	ID         string
	Connection ConnectionParams
	Cleanup    func() error
	// contains filtered or unexported fields
}

func StartPostgreSQLContainer

func StartPostgreSQLContainer(ctx context.Context, t *testing.T, dbName, dbUser, dbPassword, dbPort string) (*PostgreSQLContainer, error)

func (*PostgreSQLContainer) Close

func (postgres *PostgreSQLContainer) Close() error

func (*PostgreSQLContainer) GetConnection

func (postgres *PostgreSQLContainer) GetConnection() ConnectionParams

type SQLiteContainer

type SQLiteContainer struct {
	ID         string
	Connection ConnectionParams
	Cleanup    func() error
	// contains filtered or unexported fields
}

func StartSQLiteContainer

func StartSQLiteContainer(ctx context.Context, t *testing.T, filename string) (*SQLiteContainer, error)

func (*SQLiteContainer) Close

func (sqlite *SQLiteContainer) Close() error

func (*SQLiteContainer) GetConnection

func (sqlite *SQLiteContainer) GetConnection() ConnectionParams

Jump to

Keyboard shortcuts

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