Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultBandwidthDateRangeCode = "latest30days"
View Source
const DefaultBandwidthPercentile int32 = 95
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminModule ¶
type AdminModule struct {
Code string `json:"code"` // 模块代号
AllowAll bool `json:"allowAll"` // 允许所有的动作
Actions []string `json:"actions"` // 只允许的动作
}
AdminModule 管理用户模块权限
type AdminUIConfig ¶
type AdminUIConfig struct {
ProductName string `json:"productName"` // 产品名
AdminSystemName string `json:"adminSystemName"` // 管理员系统名称
ShowOpenSourceInfo bool `json:"showOpenSourceInfo"` // 是否显示开源信息
ShowVersion bool `json:"showVersion"` // 是否显示版本号
Version string `json:"version"` // 显示的版本号
ShowFinance bool `json:"showFinance"` // 是否显示财务相关信息
FaviconFileId int64 `json:"faviconFileId"` // Favicon文件ID
LogoFileId int64 `json:"logoFileId"` // Logo文件ID
DefaultPageSize int `json:"defaultPageSize"` // 默认每页显示数
TimeZone string `json:"timeZone"` // 时区
Modules []userconfigs.UserModule `json:"modules"` // 开通模块
}
AdminUIConfig 管理员界面相关配置
func (*AdminUIConfig) ContainsModule ¶ added in v0.5.3
func (this *AdminUIConfig) ContainsModule(module string) bool
type BandwidthDateRange ¶ added in v0.5.8
type BandwidthDateRange struct {
Name string `json:"name"`
Code string `json:"code"`
DayFrom string `json:"dayFrom"`
DayTo string `json:"dayTo"`
}
func FindAllBandwidthDateRanges ¶ added in v0.5.8
func FindAllBandwidthDateRanges() []*BandwidthDateRange
func FindBandwidthDateRange ¶ added in v0.5.8
func FindBandwidthDateRange(code string) *BandwidthDateRange
type BandwidthUnit ¶ added in v0.4.9
type BandwidthUnit = string
const ( BandwidthUnitByte BandwidthUnit = "byte" BandwidthUnitBit BandwidthUnit = "bit" )
type CheckUpdatesConfig ¶
type CheckUpdatesConfig struct {
AutoCheck bool `yaml:"autoCheck" json:"autoCheck"`
}
CheckUpdatesConfig 检查更新配置
type DatabaseConfig ¶
type DatabaseConfig struct {
ServerAccessLog struct {
Clean struct {
Days int `json:"days"` // 日志保留天数,0表示不限制
} `json:"clean"` // 清理相关配置
} `json:"serverAccessLog"` // 服务访问日志相关配置
}
DatabaseConfig 数据库相关配置
type LogConfig ¶
type LogConfig struct {
CanDelete bool `json:"canDelete"` // 是否可删除
CanClean bool `json:"canClean"` // 是否可清理
Capacity *shared.SizeCapacity `json:"capacity"` // 容量
Days int `json:"days"` // 自动保存天数
CanChange bool `json:"canChange"` // 是否允许再次修改配置
}
LogConfig 操作日志相关配置
type SecurityConfig ¶
type SecurityConfig struct {
Frame string `json:"frame"` // Frame嵌套
AllowCountryIds []int64 `json:"allowCountryIds"` // 允许的国家/地区
AllowProvinceIds []int64 `json:"allowProvinceIds"` // 允许的省份
AllowLocal bool `json:"allowLocal"` // 允许本地+局域网IP访问
AllowIPs []string `json:"allowIPs"` // 允许访问的IP
AllowRememberLogin bool `json:"allowRememberLogin"` // 是否允许在设备上记住登录
DenySearchEngines bool `json:"denySearchEngines"` // 禁止常见的搜索引擎访问
DenySpiders bool `json:"denySpiders"` // 禁止常见的爬虫
AllowDomains []string `json:"allowDomains"` // 允许访问的域名
// contains filtered or unexported fields
}
SecurityConfig 安全相关配置
func (*SecurityConfig) AllowIPRanges ¶
func (this *SecurityConfig) AllowIPRanges() []*shared.IPRangeConfig
AllowIPRanges 查询允许的IP区域
type SettingCode ¶
type SettingCode = string
const ( SettingCodeServerGlobalConfig SettingCode = "serverGlobalConfig" // 服务相关全局设置 SettingCodeNodeMonitor SettingCode = "nodeMonitor" // 监控节点状态 SettingCodeClusterHealthCheck SettingCode = "clusterHealthCheck" // 集群健康检查 SettingCodeIPListVersion SettingCode = "ipListVersion" // IP名单的版本号 SettingCodeAdminSecurityConfig SettingCode = "adminSecurityConfig" // 管理员安全设置 SettingCodeAdminUIConfig SettingCode = "adminUIConfig" // 管理员界面设置 SettingCodeDatabaseConfigSetting SettingCode = "databaseConfig" // 数据库相关配置 SettingCodeAccessLogQueue SettingCode = "accessLogQueue" // 访问日志队列 SettingCodeCheckUpdates SettingCode = "checkUpdates" // 检查自动更新配置 SettingCodeUserServerConfig SettingCode = "userServerConfig" // 用户服务设置 SettingCodeUserRegisterConfig SettingCode = "userRegisterConfig" // 用户注册配置 SettingCodeUserUIConfig SettingCode = "userUIConfig" // 用户界面配置 )
type UserUIConfig ¶
type UserUIConfig struct {
ProductName string `json:"productName"` // 产品名
UserSystemName string `json:"userSystemName"` // 管理员系统名称
ShowVersion bool `json:"showVersion"` // 是否显示版本号
Version string `json:"version"` // 显示的版本号
ShowFinance bool `json:"showFinance"` // 是否显示财务相关信息
FaviconFileId int64 `json:"faviconFileId"` // Favicon文件ID
LogoFileId int64 `json:"logoFileId"` // Logo文件ID
TimeZone string `json:"timeZone"` // 时区
BandwidthUnit BandwidthUnit `json:"bandwidthUnit"` // 带宽单位
ShowTrafficCharts bool `json:"showTrafficCharts"` // 是否显示流量相关图表和数据
ShowCacheInfoInTrafficCharts bool `json:"showCacheInfoInTrafficCharts"` // 在流量图中显示缓存相关信息
ShowBandwidthCharts bool `json:"showBandwidthCharts"` // 是否显示带宽相关图表和数据
TrafficStats struct {
BandwidthPercentile int32 `json:"bandwidthPercentile"` // 带宽百分位
DefaultBandwidthDateRange string `json:"defaultBandwidthDateRange"` // 默认带宽周期
} `json:"trafficStats"` // 流量统计相关设置
}
UserUIConfig 用户界面相关配置
func DefaultUserUIConfig ¶ added in v0.5.8
func DefaultUserUIConfig() *UserUIConfig
Click to show internal directories.
Click to hide internal directories.