Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMalformedConnectionString = errors.New( "malformed database connection parameters provided", ) ErrUnableToConnect = errors.New("unable to open connection to database") )
Functions ¶
func DBConnect ¶
DBConnect establishes a connection to the database using the driver and connection information. Only "postgres" is supported as the driver.
The following errors may be returned:
- ErrMalformedConnectionString: The provided connection parameters are not in a valid format.
- ErrUnableToConnect: Unable to make a connection to the database with the provided connection parameters.
func DBConnectionString ¶
func DBConnectionString(cfg *configloader.ConnectionConfig) string
DBConnectionString generates a properly formatted connection string that can be used to establish a database connection. Note that it always creates a connection string with sslmode disabled.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.