Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Driver is the database driver.
Driver string `json:"driver"`
// DSN is the data source name.
DSN string `json:"dsn"`
// MaxOpenConns is the maximum number of open connections to the database.
MaxOpenConns int `json:"maxOpenConns,omitzero"`
// MaxIdleConns is the maximum number of connections in the idle connection pool.
MaxIdleConns int `json:"maxIdleConns,omitzero"`
// ConnMaxLifetime is the maximum amount of time a connection may be reused.
ConnMaxLifetime jsoncfg.Duration `json:"connMaxLifetime,omitzero"`
// ConnMaxIdleTime is the maximum amount of time a connection may be idle.
ConnMaxIdleTime jsoncfg.Duration `json:"connMaxIdleTime,omitzero"`
// Debug enables verbose logging.
Debug bool `json:"debug,omitzero"`
// NoAutoMigrate disables auto-migration.
NoAutoMigrate bool `json:"noAutoMigrate,omitzero"`
}
Config is the configuration for the database.
Click to show internal directories.
Click to hide internal directories.