package
0.1.0
Repository: https://github.com/src-d/framework.git
Documentation: pkg.go.dev

# Functions

Default returns a database connection established using the default configuration.
Get returns a database connection with the configuration resultant of applying the given configfuncs to the config.
Must will panic if the given error is not nil and, otherwise, will return the database connection.
WithName returns a ConfigFunc that will change the database name of the received database config to the one given.

# Constants

Allow enables the SSL only if the server insists on it.
Disable disables the SSL.
Prefer enables the SSL but only if the server supports it.
Require ensures SSL is used but does not check the network is secure.
VerifyCA ensures SSL is used and the connection is established with a trusted server.
VerifyFull ensures SSL is used and the connection is established with the specified server.

# Variables

DefaultConfig is the default database configuration, whose values come from environment variables with default values if the environment variables are not provided to the value used in a testing setup.
ErrNoConfig is returned when there is an attempt of getting a databsse connection with no configuration.

# Structs

DatabaseConfig describes the configuration of the database parameters used to establish a connection with it.

# Type aliases

ConfigFunc is a function that will receive a database configuration and return a new one with some parameters changed.
SSLMode provides different levels of protection against attacks.