postgres

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

Container metadata to load a container for postgres database

func NewContainer

func NewContainer(p Params) *Container

NewContainer creates a new instance of Container

func (*Container) AfterStart

func (c *Container) AfterStart(ctx context.Context, r *dockertest.Resource) error

AfterStart will check the connection and execute migrations

func (*Container) Options

func (c *Container) Options() (*dockertest.RunOptions, error)

Options to start a postgres container accordingly to the params

func (*Container) Url

func (c *Container) Url() url.URL

type Params

type Params struct {
	Port     int
	User     string
	Password string
	Database string
}

Params needed to start a postgres container

Jump to

Keyboard shortcuts

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