tcpostgres

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearAllTables

func ClearAllTables(pool *pgxpool.Pool)

func ClearAnalysisTable

func ClearAnalysisTable(pool *pgxpool.Pool)

func ClearCarTable

func ClearCarTable(pool *pgxpool.Pool)

func ClearDriverTable

func ClearDriverTable(pool *pgxpool.Pool)

func ClearEventTable

func ClearEventTable(pool *pgxpool.Pool)

func ClearSpeedmapTable

func ClearSpeedmapTable(pool *pgxpool.Pool)

func ClearTrackTable

func ClearTrackTable(pool *pgxpool.Pool)

func ClearWampDataTable

func ClearWampDataTable(pool *pgxpool.Pool)

func SetupTestDb

func SetupTestDb() *pgxpool.Pool

create a pg connection pool for the iracelog testdatabase

Types

type PostgresContainer

type PostgresContainer struct {
	testcontainers.Container
}

PostgresContainer represents the postgres container type used in the module

func SetupPostgres

func SetupPostgres(ctx context.Context, opts ...PostgresContainerOption) (
	*PostgresContainer, error,
)

setupPostgres creates an instance of the postgres container type

type PostgresContainerOption

type PostgresContainerOption func(req *testcontainers.ContainerRequest)

func WithInitialDatabase

func WithInitialDatabase(user, password, dbName string) PostgresContainerOption

func WithName

func WithName(containerName string) PostgresContainerOption

func WithPort

func WithPort(port string) PostgresContainerOption

func WithWaitStrategy

func WithWaitStrategy(strategies ...wait.Strategy) PostgresContainerOption

Jump to

Keyboard shortcuts

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