Fix Services & Update the middleware && others
This commit is contained in:
@@ -29,7 +29,9 @@ type DatabaseConfig struct {
|
||||
|
||||
// ServerConfig 存储HTTP服务器配置
|
||||
type ServerConfig struct {
|
||||
Port string `mapstructure:"port"`
|
||||
Port string `mapstructure:"port"`
|
||||
Host string `yaml:"host"`
|
||||
CORSOrigins []string `yaml:"cors_origins"`
|
||||
}
|
||||
|
||||
// LogConfig 存储日志配置
|
||||
@@ -38,6 +40,12 @@ type LogConfig struct {
|
||||
Format string `mapstructure:"format" json:"format"`
|
||||
EnableFile bool `mapstructure:"enable_file" json:"enable_file"`
|
||||
FilePath string `mapstructure:"file_path" json:"file_path"`
|
||||
|
||||
// 日志轮转配置(可选)
|
||||
MaxSize int `yaml:"max_size"` // MB,默认 100
|
||||
MaxBackups int `yaml:"max_backups"` // 默认 7
|
||||
MaxAge int `yaml:"max_age"` // 天,默认 30
|
||||
Compress bool `yaml:"compress"` // 默认 true
|
||||
}
|
||||
|
||||
type RedisConfig struct {
|
||||
|
||||
Reference in New Issue
Block a user