[日志审计]增加删除、清理和别的一些设置
This commit is contained in:
24
pkg/systemconfigs/log_config.go
Normal file
24
pkg/systemconfigs/log_config.go
Normal 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"` // 自动保存天数
|
||||
}
|
||||
9
pkg/systemconfigs/security_config.go
Normal file
9
pkg/systemconfigs/security_config.go
Normal 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"`
|
||||
}
|
||||
10
pkg/systemconfigs/ui_config.go
Normal file
10
pkg/systemconfigs/ui_config.go
Normal 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"` // 显示的版本号
|
||||
}
|
||||
Reference in New Issue
Block a user