Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBConfig ¶
type DBConfig struct {
Host string `json:"host" yaml:"host" env:"DEFAULT_MYSQL_HOST"`
Port uint32 `json:"port" yaml:"port" env:"DEFAULT_MYSQL_PORT"`
User string `json:"user" yaml:"user" env:"DEFAULT_MYSQL_USER"`
Pass string `json:"pass" yaml:"pass" env:"DEFAULT_MYSQL_PASS"`
DBName string `json:"db_name" yaml:"dbName" env:"DEFAULT_MYSQL_DB_NAME"`
ConnMaxIdleTime uint32 `json:"conn_max_idle_time" yaml:"connMaxIdleTime" env:"DEFAULT_MYSQL_CONN_MAX_IDLE_TIME"`
ConnMaxLifetime uint32 `json:"conn_max_lifetime" yaml:"connMaxLifetime" env:"DEFAULT_MYSQL_CONN_MAX_LIFETIME"`
MaxIdleConns uint32 `json:"max_idle_conns" yaml:"maxIdleConns" env:"DEFAULT_MYSQL_MAX_IDLE_CONNS"`
MaxOpenConns uint32 `json:"max_open_conns" yaml:"maxOpenConns" env:"DEFAULT_MYSQL_MAX_OPEN_CONNS"`
TracerProvider trace.TracerProvider `json:"-"`
MeterProvider metric.MeterProvider `json:"-"`
}
type DBConfigOption ¶
type DBConfigOption func(c *DBConfig)
Click to show internal directories.
Click to hide internal directories.