Documentation ¶
Index ¶
- Variables
- func Connect() (conn *pgx.Conn, err error)
- func GetEntityAll(entity string) (result chan []byte, err error)
- func GetEntityByID(entity, id string) (row []byte, err error)
- func GetEntityMany(entity, field, id string) (result chan []byte, err error)
- func Insert(entity string, insertable Insertable) (err error)
- func StartPool(size int) func() *pgx.Conn
- type Insertable
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 GetEntityAll ¶
func GetEntityByID ¶
func GetEntityMany ¶
func Insert ¶
func Insert(entity string, insertable Insertable) (err error)
Types ¶
type Insertable ¶
type Insertable map[string]json.RawMessage
Click to show internal directories.
Click to hide internal directories.