Documentation
¶
Index ¶
- Constants
- Variables
- func FindAllOrderStatusList() []*shared.Definition
- func FindAllUserTicketStatusList() []*shared.Definition
- func IsValidOrderType(s string) bool
- func OrderStatusName(orderStatus OrderStatus) string
- func OrderTypeName(orderType OrderType) string
- func UserTicketStatusName(status UserTicketStatus) string
- type AccountEvent
- type AccountEventType
- type HTTPCacheTaskConfig
- type OrderStatus
- type OrderType
- type UserFeature
- type UserFeatureCode
- type UserFinanceConfig
- type UserIdentityOrgType
- type UserIdentityStatus
- type UserIdentityType
- type UserModule
- type UserOrderConfig
- type UserRegisterConfig
- type UserServerConfig
- type UserTicketStatus
Constants ¶
View Source
const ( MaxCacheKeysPerTask int32 = 1000 MaxCacheKeysPerDay int32 = 10000 )
Variables ¶
View Source
var AccountExpenseEventTypes = []AccountEventType{AccountEventTypeWithdraw} // 支出
View Source
var AccountIncomeEventTypes = []AccountEventType{AccountEventTypeCharge} // 收入
View Source
var DefaultUserModules = []UserModule{UserModuleCDN}
Functions ¶
func FindAllOrderStatusList ¶ added in v0.5.0
func FindAllOrderStatusList() []*shared.Definition
func FindAllUserTicketStatusList ¶ added in v0.5.0
func FindAllUserTicketStatusList() []*shared.Definition
func IsValidOrderType ¶ added in v0.5.0
func OrderStatusName ¶ added in v0.5.0
func OrderStatusName(orderStatus OrderStatus) string
func OrderTypeName ¶ added in v0.5.0
func UserTicketStatusName ¶ added in v0.5.0
func UserTicketStatusName(status UserTicketStatus) string
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 OrderStatus ¶ added in v0.5.0
type OrderStatus = string
const ( OrderStatusNone OrderStatus = "none" OrderStatusCancelled OrderStatus = "cancelled" OrderStatusFinished OrderStatus = "finished" )
type OrderType ¶ added in v0.5.0
type OrderType = string
const (
OrderTypeCharge OrderType = "charge"
)
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" UserFeatureCodeServerACME UserFeatureCode = "server.acme" )
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 UserIdentityOrgType ¶ added in v0.4.10
type UserIdentityOrgType = string
const ( UserIdentityOrgTypeEnterprise UserIdentityOrgType = "enterprise" UserIdentityOrgTypeIndividual UserIdentityOrgType = "individual" )
type UserIdentityStatus ¶ added in v0.4.9
type UserIdentityStatus = string
const ( UserIdentityStatusNone UserIdentityStatus = "none" UserIdentityStatusSubmitted UserIdentityStatus = "submitted" UserIdentityStatusRejected UserIdentityStatus = "rejected" UserIdentityStatusVerified UserIdentityStatus = "verified" )
type UserIdentityType ¶ added in v0.4.9
type UserIdentityType = string
const ( UserIdentityTypeIDCard UserIdentityType = "idCard" UserIdentityTypeEnterpriseLicense UserIdentityType = "enterpriseLicense" )
type UserModule ¶ added in v0.5.3
type UserModule = string
const ( UserModuleCDN UserModule = "cdn" UserModuleNS UserModule = "ns" )
type UserOrderConfig ¶ added in v0.5.0
type UserOrderConfig struct {
EnablePay bool `json:"enablePay"` // 启用支付
DisablePageHTML string `json:"disablePageHTML"` // 禁用支付时的页面提示
OrderLife *shared.TimeDuration `json:"orderLife"` // 过期时间
}
UserOrderConfig 用户订单配置
func DefaultUserOrderConfig ¶ added in v0.5.0
func DefaultUserOrderConfig() *UserOrderConfig
type UserRegisterConfig ¶
type UserRegisterConfig struct {
IsOn bool `yaml:"isOn" json:"isOn"` // 是否启用用户注册
ComplexPassword bool `yaml:"complexPassword" json:"complexPassword"` // 必须使用复杂密码
// CDN
CDNIsOn bool `json:"cdnIsOn"` // 是否开启CDN服务
ClusterId int64 `yaml:"clusterId" json:"clusterId"` // 用户创建服务集群
Features []string `yaml:"features" json:"features"` // 默认启用的功能
RequireVerification bool `yaml:"requireVerification" json:"requireVerification"` // 是否需要审核
RequireIdentity bool `yaml:"requireIdentity" json:"requireIdentity"` // 是否需要实名认证
// 开通DNS
NSIsOn bool `json:"nsIsOn"` // 是否开启智能DNS服务
}
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
type UserTicketStatus ¶ added in v0.5.0
type UserTicketStatus = string
const ( UserTicketStatusNone UserTicketStatus = "none" UserTicketStatusSolved UserTicketStatus = "solved" UserTicketStatusClosed UserTicketStatus = "closed" )
Click to show internal directories.
Click to hide internal directories.