Documentation ¶
Index ¶
Constants ¶
const ( DefaultPostgresPort string = "5432/tcp" DefaultPostgresUser string = "postgres" DefaultPostgresPassword string = "postgres" DefaultPostgresDatabase string = "postgres" )
Default postgres connection details
const DefaultContainerExpiresAfterSeconds uint = 1800
DefaultContainerExpiresAfterSeconds tells docker the hard limit in seconds when the container should be purged
const PostgresImageName string = "postgres"
PostgresImageName is the image name of the postgres docker image
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AfterInitActionFunc ¶
AfterInitActionFunc is a function type which will be executed after container initialization
type WrapperInstance ¶
type WrapperInstance struct { Hostname string Port int DockerHost string // deprecated HostPort int // deprecated Pool *dockertest.Pool Resource *dockertest.Resource }
WrapperInstance holds all the information of the running container
func InitContainer ¶
func InitContainer(params WrapperParams) (instance *WrapperInstance, err error)
InitContainer starts a new container with the given parameters
func InitPostgresContainer ¶
func InitPostgresContainer(tag string) (*WrapperInstance, error)
InitPostgresContainer starts a postgres container with the given tag and the default credentials
func (WrapperInstance) PurgeContainer ¶
func (w WrapperInstance) PurgeContainer() error
PurgeContainer purges the running container
type WrapperParams ¶
type WrapperParams struct { ImageName string ImageTag string EnvVariables []string ContainerPort string AfterInitActionFunc AfterInitActionFunc }
WrapperParams contains all parameters needed to start a new custom container