database

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDatabaseConnectionPool

func CloseDatabaseConnectionPool()

CloseDatabaseConnectionPool closes the database connection pool

func GetDatabaseConnectionPool

func GetDatabaseConnectionPool(config DatabaseConfig) (*pgxpool.Pool, error)

GetDatabaseConnectionPool returns a thread safe connection pool singleton

func GetDatabaseContext

func GetDatabaseContext() context.Context

GetDatabaseContext returns a new context for database operations

Types

type DatabaseConfig

type DatabaseConfig struct {
	Host     string
	Port     string
	User     string
	Password string
	Database string
}

Jump to

Keyboard shortcuts

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