Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector implements driver.Connector so that the driver can be used with sql.OpenDB.
func NewConnector ¶
func NewConnector(driver driver.Driver, generator CredentialsGenerator, dsn string) Connector
NewConnector creates a new Connector.
type Credentials ¶
Credentials stores database credentials.
type CredentialsGenerator ¶
type CredentialsGenerator interface {
Generate() (Credentials, error)
}
CredentialsGenerator generates new database credentials.
type Driver ¶
type Driver struct { Actual driver.Driver CredentialsGenerator CredentialsGenerator }
Driver wraps a real driver.Driver while maintaining the same interface and offering support for credentials generation upon opening a new connection.
Click to show internal directories.
Click to hide internal directories.