Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Driver string `koanf:"driver"` // Optional, Example: mysql, postgres. Default: mysql
DSN string `koanf:"dsn"` // Required, Example: root:123456@tcp(127.0.0.1:3306)/test?charset=utf8&parseTime=True&loc=Local
ConnMaxIdleTime time.Duration `koanf:"ConnMaxIdleTime"` // Optional, Default: 1 hour
ConnMaxLifetime time.Duration `koanf:"ConnMaxIdleTime"` // Optional, Default: 24 hours
MaxIdleConns int `koanf:"MaxIdleConns"` // Optional, Default: 10
MaxOpenConns int `koanf:"MaxOpenConns"` // Optional, Default: 100
}
Click to show internal directories.
Click to hide internal directories.