Documentation
¶
Index ¶
- Constants
- func BuildConfigSettingDetail(before *model.Config, in SettingChangeInput) string
- func BuildSecuritySettingDetail(before *model.Config, in SettingChangeInput) string
- func OnServerWatchTrigger(serverID uint64, reason string)
- func PruneExcess()
- func Record(c *gin.Context, typ, action, detail string)
- func StartWatchdog()
- type SettingChangeInput
- type TypeOption
Constants ¶
View Source
const ( TypeAuth = "auth" TypeSecurity = "security" TypeConfig = "config" TypeEvent = "event" MaxLogs = 1000 PageSize = 20 TriggerReasonOffline = "offline" TriggerReasonHighCPU = "high_cpu" TriggerReasonHighMemory = "high_memory" )
Variables ¶
This section is empty.
Functions ¶
func BuildConfigSettingDetail ¶
func BuildConfigSettingDetail(before *model.Config, in SettingChangeInput) string
BuildConfigSettingDetail 非安全类站点配置变更。
func BuildSecuritySettingDetail ¶
func BuildSecuritySettingDetail(before *model.Config, in SettingChangeInput) string
BuildSecuritySettingDetail 安全相关配置变更(登录、权限、API 边界等)。
func OnServerWatchTrigger ¶
OnServerWatchTrigger 服务器离线、持续高 CPU/内存时触发回调,供后续扩展通知/Webhook 等。
Types ¶
type SettingChangeInput ¶
type SettingChangeInput struct {
Title string
Admin string
Language string
Theme string
DashboardTheme string
CustomCodeChanged bool
CustomCodeDashboardChanged bool
ViewPasswordChanged bool
CustomNameservers string
UseExternalGeoIP bool
EnableIPChangeNotification bool
EnablePlainIPInNotification bool
DisableSwitchTemplateInFrontend bool
CompatAPIDisable bool
UseTemplateHandleNoRoute bool
DisableOauthLogin bool
DisablePasswordLogin bool
GRPCHost string
GRPCDiscoverKey string
Cover uint8
IgnoredIPNotification string
IPChangeNotificationTag string
PasswordChanged bool
TwoFactorCleared bool
}
SettingChangeInput 设置保存后的目标值(用于生成变更详情,不含敏感内容)。
type TypeOption ¶
Click to show internal directories.
Click to hide internal directories.