Documentation ¶
Overview ¶
Package db contains logic for connecting to the database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Conn *sql.DB
Conn is a shared connection used by all database queries.
View Source
var DefaultConnection = &DatabaseURLConnector{}
DefaultConnection connects to a Postgres database using the DATABASE_URL environment variable.
Functions ¶
Types ¶
type Connector ¶
Connector establishes a connection to a Postgres database, with the given number of connections, and stores the connection in conn.
type DatabaseURLConnector ¶
type DatabaseURLConnector struct {
// contains filtered or unexported fields
}
DatabaseURLConnector connects to the database using the DATABASE_URL environment variable.
Click to show internal directories.
Click to hide internal directories.