postgres

package
v4.6.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB() *sqlx.DB

DB is the main accesor to the global postgresql client singleton

func DbConnection

func DbConnection(credentials Credentials) (*sqlx.DB, error)

DbConnection : init DB access.

func ReplaceGlobals

func ReplaceGlobals(dbClient *sqlx.DB) func()

ReplaceGlobals replace the global postgresql client singleton with the provided one

Types

type Credentials

type Credentials struct {
	URL      string `json:"url,omitempty"`
	Port     string `json:"port,omitempty"`
	User     string `json:"user,omitempty"`
	Password string `json:"password,omitempty"`
	DbName   string `json:"dbname,omitempty"`
}

Credentials : Give All DB Information.

Jump to

Keyboard shortcuts

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