tcpostgres

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithInitialDatabase

func WithInitialDatabase(user string, password string, dbName string) func(tcReq *testcontainers.ContainerRequest, pgReq *PostgresRequest)

Types

type PostgresContainer

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

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

func (*PostgresContainer) Database

func (pgc *PostgresContainer) Database() string

func (*PostgresContainer) Hostname

func (pgc *PostgresContainer) Hostname(ctx context.Context) (string, error)

func (*PostgresContainer) Password

func (pgc *PostgresContainer) Password() string

func (*PostgresContainer) Port

func (pgc *PostgresContainer) Port(ctx context.Context) (int, error)

func (*PostgresContainer) Terminate

func (pgc *PostgresContainer) Terminate(ctx context.Context) error

func (*PostgresContainer) Username

func (pgc *PostgresContainer) Username() string

type PostgresContainerOption

type PostgresContainerOption func(tcReq *testcontainers.ContainerRequest, pgReq *PostgresRequest)

type PostgresRequest

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

Jump to

Keyboard shortcuts

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