userconfigs

package
v0.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2022 License: BSD-3-Clause Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MaxCacheKeysPerTask int32 = 1000
	MaxCacheKeysPerDay  int32 = 10000
)

Variables

View Source
var DefaultUserModules = []UserModule{UserModuleCDN}

Functions

func FindAllUserTicketStatusList added in v0.5.0

func FindAllUserTicketStatusList() []*shared.Definition

func UserTicketStatusName added in v0.5.0

func UserTicketStatusName(status UserTicketStatus) string

Types

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 FindAllUserFeatures

func FindAllUserFeatures() []*UserFeature

FindAllUserFeatures 所有功能列表

func FindUserFeature

func FindUserFeature(code string) *UserFeature

FindUserFeature 查询单个功能

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 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 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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL