Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultImage is the default PostgreSQL image. DefaultImage = "postgres:16-alpine" // DefaultDatabase is the default PostgreSQL database name. DefaultDatabase = "testdb" // DefaultUser is the default PostgreSQL user. DefaultUser = "postgres" // DefaultPassword is the default PostgreSQL password. DefaultPassword = "password1" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Instance ¶
type Instance struct {
Container *dockermanage.Container
Database string
User string
Password string
}
Instance represents a running PostgreSQL container.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures a PostgreSQL container instance.
func WithHostPort ¶
WithHostPort sets a fixed host port. If unset, Docker auto-assigns one.
func WithLabels ¶
WithLabels merges labels into container labels.
func WithPassword ¶
WithPassword sets the database user password.
Click to show internal directories.
Click to hide internal directories.