Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxCacheKeysPerTask int32 = 1000 MaxCacheKeysPerDay int32 = 10000 )
Variables ¶
View Source
var AccountExpenseEventTypes = []AccountEventType{AccountEventTypeWithdraw} // 支出
View Source
var AccountIncomeEventTypes = []AccountEventType{AccountEventTypeCharge} // 收入
Functions ¶
This section is empty.
Types ¶
type AccountEvent ¶
type AccountEvent struct { Name string `json:"name"` // 名称 Code AccountEventType `json:"code"` // 代号 Description string `json:"description"` // 描述 IsPositive bool `json:"isPositive"` // 是否为正向 }
func FindAccountEvent ¶
func FindAccountEvent(eventType AccountEventType) *AccountEvent
FindAccountEvent 根据事件类型查找事件定义
func FindAllAccountEventTypes ¶
func FindAllAccountEventTypes() []*AccountEvent
FindAllAccountEventTypes 查找所有的事件类型
type AccountEventType ¶
type AccountEventType = string
const ( AccountEventTypeCharge AccountEventType = "charge" // 充值 AccountEventTypeAward AccountEventType = "award" // 赠送 AccountEventTypeBuyPlan AccountEventType = "buyPlan" // 购买套餐 AccountEventTypePayBill AccountEventType = "payBill" // 支付账单 AccountEventTypeRefund AccountEventType = "refund" // 退款 AccountEventTypeWithdraw AccountEventType = "withdraw" // 提现 )
type HTTPCacheTaskConfig ¶
type HTTPCacheTaskConfig struct { MaxKeysPerTask int32 `yaml:"maxKeysPerTask" json:"maxKeysPerTask"` MaxKeysPerDay int32 `yaml:"maxKeysPerDay" json:"maxKeysPerDay"` }
func DefaultHTTPCacheTaskConfig ¶
func DefaultHTTPCacheTaskConfig() *HTTPCacheTaskConfig
type UserFeature ¶
type UserFeature struct { Name string `json:"name"` Code string `json:"code"` Description string `json:"description"` }
UserFeature 用户功能
func (*UserFeature) ToPB ¶
func (this *UserFeature) ToPB() *pb.UserFeature
type UserFeatureCode ¶
type UserFeatureCode = string
UserFeatureCode 用户功能代号
const ( UserFeatureCodeServerAccessLog UserFeatureCode = "server.accessLog" UserFeatureCodeServerViewAccessLog UserFeatureCode = "server.viewAccessLog" UserFeatureCodePlan UserFeatureCode = "plan" UserFeatureCodeScript UserFeatureCode = "script" UserFeatureCodeServerWAF UserFeatureCode = "server.waf" UserFeatureCodeServerUAM UserFeatureCode = "server.uam" UserFeatureCodeServerWebP UserFeatureCode = "server.webp" UserFeatureCodeFinance UserFeatureCode = "finance" )
type UserFinanceConfig ¶
type UserFinanceConfig struct { IsOn bool `yaml:"isOn" json:"isOn"` PriceType serverconfigs.PlanPriceType `yaml:"priceType" json:"priceType"` TrafficPriceConfig *serverconfigs.PlanTrafficPriceConfig `yaml:"trafficPrice" json:"trafficPrice"` BandwidthPriceConfig *serverconfigs.PlanBandwidthPriceConfig `yaml:"bandwidthPrice" json:"bandwidthPrice"` }
UserFinanceConfig 财务相关设置
func DefaultUserFinanceConfig ¶
func DefaultUserFinanceConfig() *UserFinanceConfig
type UserRegisterConfig ¶
type UserRegisterConfig struct { IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用用户注册 ClusterId int64 `yaml:"clusterId" json:"clusterId"` // 用户创建服务集群 ComplexPassword bool `yaml:"complexPassword" json:"complexPassword"` // 必须使用复杂密码 Features []string `yaml:"features" json:"features"` // 默认启用的功能 RequireVerification bool `yaml:"requireVerification" json:"requireVerification"` // 是否需要审核 }
func DefaultUserRegisterConfig ¶
func DefaultUserRegisterConfig() *UserRegisterConfig
type UserServerConfig ¶
type UserServerConfig struct { GroupId int64 `yaml:"groupId" json:"groupId"` // 分组 RequirePlan bool `yaml:"requirePlan" json:"requirePlan"` // 必须使用套餐 EnableStat bool `yaml:"enableStat" json:"enableStat"` // 开启统计 HTTPCacheTaskPurgeConfig *HTTPCacheTaskConfig `yaml:"httpCacheTaskPurgeConfig" json:"httpCacheTaskPurgeConfig"` // 缓存任务删除配置 HTTPCacheTaskFetchConfig *HTTPCacheTaskConfig `yaml:"httpCacheTaskFetchConfig" json:"httpCacheTaskFetchConfig"` // 缓存任务预热配置 }
UserServerConfig 用户服务设置
func DefaultUserServerConfig ¶
func DefaultUserServerConfig() *UserServerConfig
Click to show internal directories.
Click to hide internal directories.