db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DatabaseDatabase = os.Getenv("pgdb")
View Source
var DatabaseHost = os.Getenv("pghost")
View Source
var DatabasePassword = os.Getenv("pgpassword")
View Source
var DatabasePort = env.GetInt("pgport")
View Source
var DatabaseUser = os.Getenv("pguser")
View Source
var NextPoolCon func() *pgx.Conn

Functions

func Connect

func Connect() (conn *pgx.Conn, err error)

func GetEntityAll

func GetEntityAll(entity string) (result chan []byte, err error)

func GetEntityByID

func GetEntityByID(entity, id string) (row []byte, err error)

func GetEntityMany

func GetEntityMany(entity, field, id string) (result chan []byte, err error)

func Insert

func Insert(entity string, insertable Insertable) (err error)

func StartPool

func StartPool(size int) func() *pgx.Conn

Types

type Insertable

type Insertable map[string]json.RawMessage

Jump to

Keyboard shortcuts

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