postgres

package
v0.21.5 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MinPostgresVersion = version.Must(version.NewVersion("11.0"))

Functions

func ValidatePostgresConnection added in v0.21.2

func ValidatePostgresConnection(ctx context.Context, pool *pgxpool.Pool) error

ValidatePostgresConnection validates that we can actually connect to the postgres database.

func ValidatePostgresVersion

func ValidatePostgresVersion(ctx context.Context, pool *pgxpool.Pool, want *version.Version) error

ValidatePostgresVersion checks that PostgreSQL instance version available through pool is not lower than wanted version. In this case it returns nil. Otherwise returns error describing current and desired version or any other error encountered during the check.

Types

type Executor

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

func New

func New(logger hclog.Logger, dsn string) Executor

func (Executor) Finalize

func (e Executor) Finalize(_ context.Context, err error) error

func (Executor) Prepare added in v0.21.1

func (e Executor) Prepare(_ context.Context) error

func (Executor) Setup

func (e Executor) Setup(ctx context.Context) (string, error)

func (Executor) Validate

func (e Executor) Validate(ctx context.Context) (bool, error)

Jump to

Keyboard shortcuts

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