Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Connection *sql.DB QueueConnection *pgx.ConnPool )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MaxOpenConns int `conf:"BCDA_DB_MAX_OPEN_CONNS" conf_default:"60"` MaxIdleConns int `conf:"BCDA_DB_MAX_IDLE_CONNS" conf_default:"40"` ConnMaxLifetimeMin int `conf:"BCDA_DB_CONN_MAX_LIFETIME_MIN" conf_default:"5"` ConnMaxIdleTime int `conf:"BCDA_DB_CONN_MAX_IDLE_TIME" conf_default:"30"` DatabaseURL string `conf:"DATABASE_URL"` QueueDatabaseURL string `conf:"QUEUE_DATABASE_URL"` HealthCheckSec int `conf:"DB_HEALTH_CHECK_INTERVAL" conf_default:"5"` }
func LoadConfig ¶
Loads database URLs from environment variables.
type DB ¶
DB is a wrapper around *sql.DB to allow us to implement our internal interfaces
func (*DB) ExecContext ¶
func (*DB) QueryContext ¶
type Executable ¶
type Result ¶
Result is an interface around https://golang.org/pkg/database/sql/#Result. It can be implemented by other database libraries (like pgx)
type Row ¶
type Row interface {
Scan(dest ...interface{}) error
}
Row is an interface around https://golang.org/pkg/database/sql/#Row. It can be implemented by other database libraries (like pgx)
type Rows ¶
Rows is an interface around https://golang.org/pkg/database/sql/#Rows. It can be implemented by other database libraries (like pgx)
type Tx ¶
Tx is a wrapper around *sql.DB to allow us to implement our internal interfaces
func (*Tx) ExecContext ¶
func (*Tx) QueryContext ¶
Click to show internal directories.
Click to hide internal directories.