postgres

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAuthToken added in v0.2.1

func BuildAuthToken(ctx context.Context, connectionConfig ConnectionConfig, iamConfig IAMConfig) (string, error)

func NewConnection added in v0.2.0

func NewConnection(ctx context.Context, connectionConfig *ConnectionConfig, iamConfig *IAMConfig) (*pgxpool.Pool, error)

NewConnection Creates a connection pool to the database defined in the ConnectionConfig. If an IAMConfig is given, then it is assumed to be using rds connect and the connection lifetime values will be overwritten.

func UuidStringAsPGUuid

func UuidStringAsPGUuid(userUuid string) (pgtype.UUID, error)

Types

type ConnectionConfig added in v0.2.0

type ConnectionConfig struct {
	Host     string
	Port     string
	User     string
	Database string
	Password string

	MaxConnections  *int
	MinConnections  *int
	MaxConnLifetime *string
	MaxConnIdleTime *string
}

type IAMConfig added in v0.2.0

type IAMConfig struct {
	Credentials aws.CredentialsProvider
	Region      string
}

Jump to

Keyboard shortcuts

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