postgres

package
v0.0.0-...-6743532 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StartLogging bool

	MasterContainer = "database.master"
	SlaveContainer  = "database.slaves"
)

Functions

func Conn

func Conn(writable bool) (dbConn *pg.DB, err error)

Get postgres connection

func ConnByContainer

func ConnByContainer(container string) (*pg.DB, error)

Get postgres connection by container

func CreateMaster

func CreateMaster() (err error)

create new master connection

func CreateSlave

func CreateSlave() (err error)

create new slave connections

Types

This section is empty.

Jump to

Keyboard shortcuts

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