utils

package
v0.0.0-...-a4686c1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HaveColumns

func HaveColumns(
	ctx context.Context,
	schema string,
	table string,
	columns []postgresv1alpha1.PostgresColumn,
) types.GomegaMatcher

HaveColumns checks if the PostgreSQL database connected through actual has columns in the given schema and table matching the specification.

func RequestLogger

func RequestLogger(ctx context.Context, baseLogger logr.Logger) logr.Logger

WithRequestLogger returns request-scoped logger from the given context.

func SetupPostgresConnection

func SetupPostgresConnection(
	ctx context.Context,
	r client.Reader,
	recorder record.EventRecorder,
	ref postgresv1alpha1.PostgresRef,
	obj metav1.ObjectMeta,
) (*pgx.Conn, error)

func WithRequestLogger

func WithRequestLogger(
	ctx context.Context,
	req ctrl.Request,
	resourceKind string,
	baseLogger logr.Logger,
) context.Context

WithRequestLogger returns a context that has a request-scoped logger attached to it.

Types

type ErrFailedConnectPostgres

type ErrFailedConnectPostgres struct {
	Err error
}

func (*ErrFailedConnectPostgres) Error

func (e *ErrFailedConnectPostgres) Error() string

type ErrGetSecret

type ErrGetSecret struct {
	Err error
}

func (*ErrGetSecret) Error

func (e *ErrGetSecret) Error() string

Jump to

Keyboard shortcuts

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