Documentation
¶
Index ¶
- func WithInitialDatabase(user string, password string, dbName string) func(tcReq *testcontainers.ContainerRequest, pgReq *PostgresRequest)
- type PostgresContainer
- func (pgc *PostgresContainer) Database() string
- func (pgc *PostgresContainer) Hostname(ctx context.Context) (string, error)
- func (pgc *PostgresContainer) Password() string
- func (pgc *PostgresContainer) Port(ctx context.Context) (int, error)
- func (pgc *PostgresContainer) Terminate(ctx context.Context) error
- func (pgc *PostgresContainer) Username() string
- type PostgresContainerOption
- type PostgresRequest
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
}
Click to show internal directories.
Click to hide internal directories.