postgresconnection

package
v0.0.0-...-e4486b3 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(conn *pgx.Conn) error

Close closes the connection to the Postgres database.

func NewConnection

func NewConnection(config *Config) (*pgx.Conn, error)

NewConnection returns a new connection instance to connect to the Postgres database.

Types

type Config

type Config struct {
	Host     string
	Port     int
	Username string
	Password string
	Database string
}

Config represents the configuration for connecting to the Postgres database.

Jump to

Keyboard shortcuts

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