Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidAttr = errors.New("Invalid DatabaseOption attribute")
)
Functions ¶
This section is empty.
Types ¶
type PostgresOptions ¶
type PostgresOptions struct { ContainerEnv map[string]string ContainerImage string ContainerLabels map[string]string ContainerName string ContainerNetworks map[string][]string ContainerNetworkLabels map[string]map[string]string ContainerPort string Driver string DSN string HostPort string }
func NewPostgresDatabase ¶
func NewPostgresDatabase(t *testing.T) (*PostgresOptions, func())
NewPostgresDatabase starts a new postgres database based on default values
func NewPostgresOptions ¶
func NewPostgresOptions() *PostgresOptions
NewPostgresOptions returns a new PostgresOptions structs with default values
func StartPostgres ¶
func StartPostgres(t *testing.T, pgOptions *PostgresOptions) (*PostgresOptions, func())
StartPostgres starts a postgres container image based on the PostgresOption struct
func (*PostgresOptions) Validate ¶
func (dbOptions *PostgresOptions) Validate() error
Validate the DatabaseOption struct, if all required atrributes are valid
Click to show internal directories.
Click to hide internal directories.