Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDBConnectionURI ¶
Types ¶
type DBConfig ¶
type DBConfig struct { Host string `json:"DB_HOST" envconfig:"DB_HOST" default:"localhost"` Port int `json:"DB_PORT" envconfig:"DB_PORT" default:"3306"` Name string `json:"DB_NAME" envconfig:"DB_NAME" required:"true"` User string `json:"DB_USER" envconfig:"DB_USER" required:"true"` Password string `json:"DB_PASSWORD" envconfig:"DB_PASSWORD" default:""` ConnTimeoutMS int `json:"DB_CONN_TIMEOUT" envconfig:"DB_CONN_TIMEOUT" default:"5000"` TablePrefix string `json:"DB_TABLE_PREFIX" envconfig:"DB_TABLE_PREFIX" default:""` MaxOpenConns int `json:"DB_MAX_OPEN_CONNS" envconfig:"DB_MAX_OPEN_CONNS" default:"10"` MaxIdleConns int `json:"DB_MAX_IDLE_CONNS" envconfig:"DB_MAX_IDLE_CONNS" default:"5"` ConnMaxLifetimeMins int `json:"DB_CONN_MAX_LIFETIME_MINS" envconfig:"DB_CONN_MAX_LIFETIME_MINS" default:"5"` GormDebugMode bool `json:"DB_GORM_DEBUG_MODE" envconfig:"DB_GORM_DEBUG_MODE" default:"false"` Location string `json:"DB_TIME_LOCATION" envconfig:"DB_TIME_LOCATION" default:"Europe/Moscow"` }
Click to show internal directories.
Click to hide internal directories.