Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Host string `validate:"required" envconfig:"DB_HOST" default:"localhost"` Port int `validate:"required" envconfig:"DB_PORT" default:"3306"` User string `validate:"required" envconfig:"DB_USER"` Password string `validate:"required" envconfig:"DB_PASSWORD"` Name string `validate:"required" envconfig:"DB_NAME"` MaxOpenConns int `validate:"required" envconfig:"DB_MAX_OPEN_CONNS" default:"25"` MaxIdleConns int `validate:"required" envconfig:"DB_MAX_IDLE_CONNS" default:"5"` ConnMaxLifetme time.Duration `validate:"required" envconfig:"DB_CONN_MAX_LIFETIME" default:"5m"` }
Config represents the complete database configuration
Click to show internal directories.
Click to hide internal directories.