Files
nCovTrack-Backend/global/config.go
2022-04-13 19:48:10 +08:00

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"`
}