Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultMigrationPath = "migrations" DefaultMaxOpenConnections = 10 DefaultMaxIdleConnections = 0 DefaultMaxConnectionLifetime = 600 * time.Second EnvironmentVariable = "DATABASE_ADDRESS" DriverName = "mysql" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func NewFromEnvironment ¶
NewFromEnvironment creates a new MySQL connection pool by fetching the connection URI from an environment variable.
type Option ¶
type Option func(*Options)
func MaxConnectionLifetime ¶
func MaxIdleConnections ¶
func MaxOpenConnections ¶
func MigrationPath ¶
Click to show internal directories.
Click to hide internal directories.