[日志审计]增加删除、清理和别的一些设置

This commit is contained in:
刘祥超
2020-12-02 20:31:33 +08:00
parent 433543741e
commit 996ccd2ffb
5 changed files with 613 additions and 35 deletions

View File

@@ -0,0 +1,24 @@
package systemconfigs
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
// 默认日志配置
func DefaultLogConfig() *LogConfig {
return &LogConfig{
CanDelete: false,
CanClean: false,
Capacity: &shared.SizeCapacity{
Count: 1,
Unit: shared.SizeCapacityUnitGB,
},
Days: 30,
}
}
// 操作日志相关配置
type LogConfig struct {
CanDelete bool `json:"canDelete"` // 是否可删除
CanClean bool `json:"canClean"` // 是否可清理
Capacity *shared.SizeCapacity `json:"capacity"` // 容量
Days int `json:"days"` // 自动保存天数
}

View File

@@ -0,0 +1,9 @@
package systemconfigs
// 安全相关配置
type SecurityConfig struct {
Frame string `json:"frame"`
AllowCountryIds []int64 `json:"allowCountryIds"`
AllowProvinceIds []int64 `json:"allowProvinceIds"`
AllowLocal bool `json:"allowLocal"`
}

View File

@@ -0,0 +1,10 @@
package systemconfigs
// 界面相关配置
type UIConfig struct {
ProductName string `json:"productName"` // 产品名
AdminSystemName string `json:"adminSystemName"` // 管理员系统名称
ShowOpenSourceInfo bool `json:"showOpenSourceInfo"` // 是否显示开源信息
ShowVersion bool `json:"showVersion"` // 是否显示版本号
Version string `json:"version"` // 显示的版本号
}