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

postgres

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

func WithDatabase

func WithDatabase(database string) Option

func WithImage

func WithImage(image string) Option

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Postgres

func (*Postgres) CreateDatabase

func (p *Postgres) CreateDatabase(ctx context.Context, name string) (string, error)

CreateDatabase adds a database beside the one the container created.

func (*Postgres) Isolate added in v0.6.0

func (p *Postgres) Isolate(ctx context.Context) (map[string]any, func(context.Context) error, error)

func (*Postgres) Settings

func (p *Postgres) Settings() map[string]any

func (*Postgres) Start

func (p *Postgres) Start(ctx context.Context, injector do.Injector) error

func (*Postgres) Stop

func (p *Postgres) Stop(ctx context.Context) error

func (*Postgres) URL

func (p *Postgres) URL() string

Jump to

Keyboard shortcuts

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