Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
func Connect(host string, port int, user string, password string, dbname string) (*pgxpool.Pool, error)
Obtain a connection pool to a PostgreSQL database.
If a connection pool already exists it is used. Otherwise, a new pool is created.
Args:
- host (string): Address of the RDBMS hosting the Postgres cluster.
- port (int): Port of the desired Postgres instance.
- user (string): User connecting to the database.
- password (string): User's password.
- dbname (string): The name of the database you wish to connect to.
Returns:
- (*pgxpool.Pool, error): A connection pool if no errors were encountered. Otherwise an error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.