Help us shape the future of Go! Take the 2026 Go Developer Survey

containerpostgres

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPostgresImage = "docker.io/postgres:14.19-alpine"

Functions

This section is empty.

Types

type Container

type Container struct {
	*dbutils.DatabaseTest
	// contains filtered or unexported fields
}

func NewWithCtx added in v0.5.1

func NewWithCtx(ctx context.Context, opts ...testcontainers.ContainerCustomizer) (*Container, error)

func (*Container) Address

func (p *Container) Address() string

func (*Container) CreateSnapshot added in v0.4.0

func (p *Container) CreateSnapshot(ctx context.Context) error

func (*Container) DSN

func (p *Container) DSN() string

func (*Container) RestoreSnapshot added in v0.4.0

func (p *Container) RestoreSnapshot(ctx context.Context) error

func (*Container) Sql added in v0.4.2

func (p *Container) Sql() *sql.DB

func (*Container) Stop

func (p *Container) Stop(t *testing.T)

func (*Container) StopWithCtx added in v0.5.1

func (p *Container) StopWithCtx(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL