Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountRoutes ¶
CountRoutes returns the total number of routes, and the total number of known middlewares.
func PrintRoutes ¶
PrintRoutes will print the number of routes and middlewares, and the routing table.
Types ¶
type DatabaseOption ¶
DatabaseOption configures database connection pooling settings.
func (*DatabaseOption) Apply ¶
func (o *DatabaseOption) Apply(client *sqlx.DB)
Apply applies the database option settings to a database connection.
type DatabaseProvider ¶
type DatabaseProvider struct {
// contains filtered or unexported fields
}
DatabaseProvider holds a list of named sql connection credentials.
func NewDatabaseProvider ¶
NewDatabaseProvider will allocate a valid `*DatabaseProvider` and return it.
func (*DatabaseProvider) Connect ¶
Connect issues a PingContext to verify a live connection before returning. The context is used to propagate tracing detail so ping is grouped correctly.
func (*DatabaseProvider) Open ¶
Open is the same as sql.Open. It creates a client from a named connection.
func (*DatabaseProvider) Register ¶
func (r *DatabaseProvider) Register(name string, config string)
Register will add a new named credential into the provider. The function is not concurrency safe, database credentials can't be changed during the lifetime of the provider.