Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseConnection ¶
func CloseConnection(ctx context.Context, container testcontainers.Container)
func SetupMysql ¶
func SetupMysql(tester *MysqlContainer) (context.Context, testcontainers.Container)
Types ¶
type MysqlContainer ¶
type MysqlContainer struct {
Username string `validate:"required" yaml:"username" json:"username"`
Database string `validate:"required" yaml:"database" json:"database"`
Password string `validate:"required" yaml:"password" json:"password"`
}
func (MysqlContainer) OpenConnection ¶
func (tester MysqlContainer) OpenConnection(ctx context.Context, container testcontainers.Container) (*sql.DB, error)
Click to show internal directories.
Click to hide internal directories.