Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.Errorf("resource not found")
)
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { MySQLURL string `env:"MYSQL_URL"` MySQLHost string `env:"MYSQL_HOST"` MySQLPort string `env:"MYSQL_PORT"` MySQLUsername string `env:"MYSQL_USERNAME"` MySQLPassword string `env:"MYSQL_PASSWORD"` MySQLDatabase string `env:"MYSQL_DATABASE"` MySQLCharset string `env:"MYSQL_CHARSET" default:"utf8mb4"` MySQLMaxIdleConns int `env:"MYSQL_MAXIDLECONNS"` MySQLMaxOpenConns int `env:"MYSQL_MAXOPENCONNS"` MySQLMaxLifeTime int64 `env:"MYSQL_MAXLIFETIME"` // 单位秒 (s) Debug bool `env:"DEBUG"` }
func LoadDefaultConf ¶
Click to show internal directories.
Click to hide internal directories.