woj-server/internal/global/config.go
Paul Pan 26a81652b3 feat: another big update
1. add consumer
2. add createVersion
3. add upload
4. fix runner
5. add rejudge

Co-authored-by: cxy004 <cxy004@qq.com>
Co-authored-by: wzt <w.zhongtao@qq.com>
2022-10-23 17:29:35 +08:00

50 lines
1.4 KiB
Go

package global
type ConfigWebServer struct {
Address string `yaml:"Address"`
Port int `yaml:"Port"`
JwtSigningKey string `yaml:"JwtSigningKey"`
JwtExpireHour int `yaml:"JwtExpireHour"`
}
type ConfigRedis struct {
Db int `yaml:"Db"`
QueueDb int `yaml:"QueueDb"`
Address string `yaml:"Address"`
Password string `yaml:"Password"`
}
type ConfigDatabase struct {
Host string `yaml:"Host"`
Port int `yaml:"Port"`
User string `yaml:"User"`
Password string `yaml:"Password"`
Database string `yaml:"Database"`
Prefix string `yaml:"Prefix"`
MaxOpenConns int `yaml:"MaxOpenConns"`
MaxIdleConns int `yaml:"MaxIdleConns"`
ConnMaxLifetime int `yaml:"ConnMaxLifetime"`
}
type ConfigStorage struct {
Endpoint string `yaml:"Endpoint"`
UseSSL bool `yaml:"UseSSL"`
AccessKey string `yaml:"AccessKey"`
SecretKey string `yaml:"SecretKey"`
Bucket string `yaml:"Bucket"`
}
type ConfigMetrics struct {
Namespace string `yaml:"Namespace"`
Subsystem string `yaml:"Subsystem"`
}
type Config struct {
WebServer ConfigWebServer `yaml:"WebServer"`
Redis ConfigRedis `yaml:"Redis"`
Database ConfigDatabase `yaml:"Database"`
Storage ConfigStorage `yaml:"Storage"`
Metrics ConfigMetrics `yaml:"Metrics"`
Development bool `yaml:"Development"`
}