postgres

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBCredential

type DBCredential struct {
	Username string
	Password string
}

DBCredential holds credentials for a database user in postgres

type DockerPostgresOptions

type DockerPostgresOptions struct {
	Ref                 string
	Port                int
	ReuseExisting       bool
	SuperUserCredential *DBCredential
	ContainerName       string
}

type DockerPostgresService

type DockerPostgresService struct {
	ds.ContainerService
	// contains filtered or unexported fields
}

func NewDockerPostgresService

func NewDockerPostgresService(s *ds.Session, opts DockerPostgresOptions) (*DockerPostgresService, error)

func (*DockerPostgresService) Address

func (dps *DockerPostgresService) Address() nat.PortBinding

func (*DockerPostgresService) ConnectionString

func (dps *DockerPostgresService) ConnectionString(cred *DBCredential) string

func (*DockerPostgresService) SuperUserCredential

func (dps *DockerPostgresService) SuperUserCredential() DBCredential

type PostgresService

type PostgresService interface {
	ShutDown() error
	ConnectionString(cred *DBCredential) string
	SuperUserCredential() DBCredential
	Address() nat.PortBinding
}

Jump to

Keyboard shortcuts

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