Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectWithOptions ¶
ConnectWithOptions connect to host based on Options{}
Types ¶
type Credentials ¶
Credentials contains DSN and Driver
type Options ¶
type Options struct { Credentials Credentials // Connector is an optional parameter to produce our // own *sql.DB, which is then wrapped in *sqlx.DB Connector func(context.Context, Credentials) (*sql.DB, error) Retries int RetryDelay time.Duration ConnectTimeout time.Duration }
Options include database connection options
func (*Options) Bind ¶
Bind binds the options variable flags with `db` prefix for the default database connection
func (*Options) BindWithPrefix ¶
Bind binds the options variable flags with a custom prefix for multiple database connections
Click to show internal directories.
Click to hide internal directories.