feat: 配置分离
This commit is contained in:
15
internal/models/setting_info.go
Normal file
15
internal/models/setting_info.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
// SystemSettingInfo 表示系统配置的详细信息(用于API返回)
|
||||
type SystemSettingInfo struct {
|
||||
Key string `json:"key"`
|
||||
Value interface{} `json:"value"`
|
||||
Type string `json:"type"` // "int", "bool", "string"
|
||||
DefaultValue interface{} `json:"default_value"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"` // "timeout", "performance", "logging", etc.
|
||||
Required bool `json:"required"`
|
||||
MinValue *int `json:"min_value,omitempty"`
|
||||
MaxValue *int `json:"max_value,omitempty"`
|
||||
ValidOptions []string `json:"valid_options,omitempty"`
|
||||
}
|
@@ -63,4 +63,4 @@ type DashboardStats struct {
|
||||
SuccessRequests int64 `json:"success_requests"`
|
||||
SuccessRate float64 `json:"success_rate"`
|
||||
GroupStats []GroupRequestStat `json:"group_stats"`
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user