package dto // 运行配置中心(后台「系统设置 → 运行配置」)的请求/响应结构。 // 机密项只回显掩码 + 指纹,永不回传明文。 // Logan.Li // RuntimeItemView 单个配置项视图 // Logan.Li type RuntimeItemView struct { Key string `json:"key"` Label string `json:"label"` Group string `json:"group"` Description string `json:"description"` Kind string `json:"kind"` // string / bool / list / secret Value string `json:"value"` // 非机密项的当前生效值 Masked string `json:"masked"` // 展示用值(机密项为掩码) Source string `json:"source"` // page / env / default / missing Default string `json:"default"` // 注册表默认值 Editable bool `json:"editable"` // 是否可页面编辑 RequiresRestart bool `json:"requires_restart"` // 是否需重启生效 Danger bool `json:"danger"` // 高风险开关 ReadOnlyReason string `json:"read_only_reason"` Placeholder string `json:"placeholder"` Configured bool `json:"configured"` // 当前是否有生效值 Fingerprint string `json:"fingerprint"` // 机密项指纹(SHA256 前 4 字节 hex) UpdatedAt string `json:"updated_at"` UpdatedBy string `json:"updated_by"` } // RuntimeGroupView 分组视图 // Logan.Li type RuntimeGroupView struct { Name string `json:"name"` Items []RuntimeItemView `json:"items"` } // RuntimeConfigUpdate 批量保存(空字符串表示清除页面值、回退环境变量/默认) // Logan.Li type RuntimeConfigUpdate struct { Values map[string]string `json:"values"` } // RuntimeResetRequest 恢复默认(删除页面值,回退环境变量/默认) // Logan.Li type RuntimeResetRequest struct { Keys []string `json:"keys"` } // RuntimeOverview 配置中心总览 // Logan.Li type RuntimeOverview struct { Groups []RuntimeGroupView `json:"groups"` // BootstrapKeys 必须留在 .env 的引导密钥键名(页面只读展示) // Logan.Li BootstrapKeys []string `json:"bootstrap_keys"` // PageEditableKeys 可在页面维护的键名(.env 里可以删掉) // Logan.Li PageEditableKeys []string `json:"page_editable_keys"` }