49 lines
1.2 KiB
Go
49 lines
1.2 KiB
Go
package global
|
|
|
|
type ServerConfig struct {
|
|
Listen string `yaml:"listen"`
|
|
Port int `yaml:"port"`
|
|
Name string `yaml:"name"`
|
|
Env string `yaml:"env"`
|
|
UrlPrefix string `yaml:"urlPrefix"`
|
|
LogPath string `yaml:"logPath"`
|
|
MySQL MySQLConfig `yaml:"mysql"`
|
|
Redis RedisConfig `yaml:"redis"`
|
|
Jwt JwtConfig `yaml:"jwt"`
|
|
Email EmailConfig `yaml:"email"`
|
|
Bos BosConfig `yaml:"bos"`
|
|
}
|
|
|
|
type MySQLConfig struct {
|
|
Host string `yaml:"host"`
|
|
Port int `yaml:"port"`
|
|
Username string `yaml:"username"`
|
|
Password string `yaml:"password"`
|
|
Database string `yaml:"database"`
|
|
}
|
|
|
|
type RedisConfig struct {
|
|
Host string `yaml:"host"`
|
|
Port int `yaml:"port"`
|
|
Password string `yaml:"password"`
|
|
}
|
|
|
|
type JwtConfig struct {
|
|
Secret string `yaml:"secret"`
|
|
RenewExpireDays uint `yaml:"renewExpireDays"`
|
|
RenewAheadDays uint `yaml:"renewAheadDays"`
|
|
}
|
|
|
|
type EmailConfig struct {
|
|
Host string `yaml:"host"`
|
|
Port int `yaml:"port"`
|
|
Account string `yaml:"account"`
|
|
Password string `yaml:"password"`
|
|
}
|
|
|
|
type BosConfig struct {
|
|
AccessKey string `yaml:"accessKey"`
|
|
SecretKey string `yaml:"secretKey"`
|
|
Domain string `yaml:"domain"`
|
|
}
|