2023-07-15 16:19:49 +08:00
|
|
|
package model
|
2022-09-07 23:34:37 +08:00
|
|
|
|
|
|
|
type ConfigWebServer struct {
|
2022-09-17 10:10:53 +08:00
|
|
|
Address string `yaml:"Address"`
|
|
|
|
Port int `yaml:"Port"`
|
|
|
|
JwtSigningKey string `yaml:"JwtSigningKey"`
|
|
|
|
JwtExpireHour int `yaml:"JwtExpireHour"`
|
2022-09-07 23:34:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type ConfigRedis struct {
|
|
|
|
Db int `yaml:"Db"`
|
2022-10-13 16:32:44 +08:00
|
|
|
QueueDb int `yaml:"QueueDb"`
|
2022-09-07 23:34:37 +08:00
|
|
|
Address string `yaml:"Address"`
|
2023-12-18 23:43:27 +08:00
|
|
|
Port int `yaml:"Port"`
|
2022-09-07 23:34:37 +08:00
|
|
|
Password string `yaml:"Password"`
|
|
|
|
}
|
|
|
|
|
2022-09-08 22:00:25 +08:00
|
|
|
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"`
|
2023-12-22 15:23:24 +08:00
|
|
|
TimeZone string `yaml:"TimeZone"`
|
2022-09-08 22:00:25 +08:00
|
|
|
}
|
|
|
|
|
2022-10-23 17:29:35 +08:00
|
|
|
type ConfigStorage struct {
|
|
|
|
Endpoint string `yaml:"Endpoint"`
|
|
|
|
UseSSL bool `yaml:"UseSSL"`
|
|
|
|
AccessKey string `yaml:"AccessKey"`
|
|
|
|
SecretKey string `yaml:"SecretKey"`
|
|
|
|
Bucket string `yaml:"Bucket"`
|
|
|
|
}
|
|
|
|
|
2022-09-07 23:34:37 +08:00
|
|
|
type ConfigMetrics struct {
|
|
|
|
Namespace string `yaml:"Namespace"`
|
|
|
|
Subsystem string `yaml:"Subsystem"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Config struct {
|
|
|
|
WebServer ConfigWebServer `yaml:"WebServer"`
|
|
|
|
Redis ConfigRedis `yaml:"Redis"`
|
2022-09-08 22:00:25 +08:00
|
|
|
Database ConfigDatabase `yaml:"Database"`
|
2022-10-23 17:29:35 +08:00
|
|
|
Storage ConfigStorage `yaml:"Storage"`
|
2022-09-07 23:34:37 +08:00
|
|
|
Metrics ConfigMetrics `yaml:"Metrics"`
|
|
|
|
Development bool `yaml:"Development"`
|
|
|
|
}
|