sql

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

README

postgres

Delete this folder if you don't need it. Or remember to hook it up if you're using it.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DBConnectionString string        `envconfig:"DB_CONNECTION_STRING" required:"true"`
	MaxDBConnections   int32         `envconfig:"DB_MAX_CONNECTIONS" default:"10"`
	PingInterval       time.Duration `envconfig:"DB_PING_INTERVAL" default:"3s"`
	PingTimeout        time.Duration `envconfig:"DB_PING_TIMEOUT" default:"15s"`
}

type Postgres

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

func NewPostgres

func NewPostgres(ctx context.Context, logger *slog.Logger, conf Config) (*Postgres, error)

func (*Postgres) Close

func (pg *Postgres) Close()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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