mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-07 07:10:25 +08:00
套餐可以设置带宽限制
This commit is contained in:
@@ -9541,6 +9541,15 @@
|
||||
],
|
||||
"isDeprecated": false
|
||||
},
|
||||
{
|
||||
"name": "findAllAvailableBasicPlans",
|
||||
"requestMessageName": "FindAllAvailableBasicPlansRequest",
|
||||
"responseMessageName": "FindAllAvailableBasicPlansResponse",
|
||||
"code": "rpc findAllAvailableBasicPlans(FindAllAvailableBasicPlansRequest) returns (FindAllAvailableBasicPlansResponse);",
|
||||
"doc": "列出所有可用的套餐的基本信息",
|
||||
"roles": [],
|
||||
"isDeprecated": false
|
||||
},
|
||||
{
|
||||
"name": "sortPlans",
|
||||
"requestMessageName": "SortPlansRequest",
|
||||
@@ -15822,7 +15831,7 @@
|
||||
},
|
||||
{
|
||||
"name": "CreatePlanRequest",
|
||||
"code": "message CreatePlanRequest {\n\tstring name = 1; // 套餐名称\n\tstring description = 19; // 套餐简介\n\tint64 clusterId = 2; // 集群ID\n\tbytes trafficLimitJSON = 3; // 流量限制\n\tbool hasFullFeatures = 18; // 是否有所有权限\n\tbytes featuresJSON = 4; // 权限列表,[code1, code2, ...]\n\tstring priceType = 5; // 价格类型:traffic, bandwidth, period\n\tbytes trafficPriceJSON = 6; // 流量价格配置\n\tbytes bandwidthPriceJSON = 10; // 带宽价格配置\n\tfloat monthlyPrice = 7; // 月度价格\n\tfloat seasonallyPrice = 8; // 季度价格\n\tfloat yearlyPrice = 9; // 年度价格\n\tint32 totalServers = 11; // 可以添加的网站数\n\tint32 totalServerNamesPerServer = 12; // 每个网站可以添加的域名数\n\tint32 totalServerNames = 13; // 可以添加的域名总数\n\tint64 dailyRequests = 14; // 每日访问量额度\n\tint64 monthlyRequests = 15; // 每月访问量额度\n\tint64 dailyWebsocketConnections = 16; // 每日Websocket连接数额度\n\tint64 monthlyWebsocketConnections = 17; // 每月Websocket连接数额度\n}",
|
||||
"code": "message CreatePlanRequest {\n\tstring name = 1; // 套餐名称\n\tstring description = 19; // 套餐简介\n\tint64 clusterId = 2; // 集群ID\n\tbytes trafficLimitJSON = 3; // 流量限制\n\tbytes bandwidthLimitPerNodeJSON = 20; // 单节点带宽限制\n\tbool hasFullFeatures = 18; // 是否有所有权限\n\tbytes featuresJSON = 4; // 权限列表,[code1, code2, ...]\n\tstring priceType = 5; // 价格类型:traffic, bandwidth, period\n\tbytes trafficPriceJSON = 6; // 流量价格配置\n\tbytes bandwidthPriceJSON = 10; // 带宽价格配置\n\tfloat monthlyPrice = 7; // 月度价格\n\tfloat seasonallyPrice = 8; // 季度价格\n\tfloat yearlyPrice = 9; // 年度价格\n\tint32 totalServers = 11; // 可以添加的网站数\n\tint32 totalServerNamesPerServer = 12; // 每个网站可以添加的域名数\n\tint32 totalServerNames = 13; // 可以添加的域名总数\n\tint64 dailyRequests = 14; // 每日访问量额度\n\tint64 monthlyRequests = 15; // 每月访问量额度\n\tint64 dailyWebsocketConnections = 16; // 每日Websocket连接数额度\n\tint64 monthlyWebsocketConnections = 17; // 每月Websocket连接数额度\n}",
|
||||
"doc": "创建套餐"
|
||||
},
|
||||
{
|
||||
@@ -16955,6 +16964,16 @@
|
||||
"code": "message FindAllAvailableADPackagePeriodsResponse {\n\trepeated ADPackagePeriod adPackagePeriods = 1;\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "FindAllAvailableBasicPlansRequest",
|
||||
"code": "message FindAllAvailableBasicPlansRequest {\n\n}",
|
||||
"doc": "列出所有可用的套餐的基本信息"
|
||||
},
|
||||
{
|
||||
"name": "FindAllAvailableBasicPlansResponse",
|
||||
"code": "message FindAllAvailableBasicPlansResponse {\n\trepeated Plan plans = 1; // 套餐列表\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
"name": "FindAllAvailableNSDomainGroupsRequest",
|
||||
"code": "message FindAllAvailableNSDomainGroupsRequest {\n\tint64 userId = 1;\n}",
|
||||
@@ -21647,7 +21666,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Plan",
|
||||
"code": "message Plan {\n\tint64 id = 1; // 套餐ID\n\tbool isOn = 2; // 是否启用\n\tstring name = 3; // 套餐名称\n\tstring description = 21; // 套餐简介\n\tint64 clusterId = 4; // 集群ID\n\tbytes trafficLimitJSON = 5; // 流量限制\n\tbool hasFullFeatures = 20; // 是否有所有权限\n\tbytes featuresJSON = 6; // 权限列表,[code1, code2, ...]\n\tstring priceType = 7; // 价格类型:traffic, bandwidth, period\n\tbytes trafficPriceJSON = 8; // 流量价格配置\n\tbytes bandwidthPriceJSON = 12; // 带宽价格配置\n\tdouble monthlyPrice = 9; // 月度价格\n\tdouble seasonallyPrice = 10; // 季度价格\n\tdouble yearlyPrice = 11; // 年度价格\n\tint32 totalServers = 13; // 可以添加的网站数\n\tint32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数\n\tint32 totalServerNames = 15; // 可以添加的域名总数\n\tint64 dailyRequests = 16; // 每日访问量额度\n\tint64 monthlyRequests = 17; // 每月访问量额度\n\tint64 dailyWebsocketConnections = 18; // 每日Websocket连接数额度\n\tint64 monthlyWebsocketConnections = 19; // 每月Websocket连接数额度\n}",
|
||||
"code": "message Plan {\n\tint64 id = 1; // 套餐ID\n\tbool isOn = 2; // 是否启用\n\tstring name = 3; // 套餐名称\n\tstring description = 21; // 套餐简介\n\tint64 clusterId = 4; // 集群ID\n\tbytes trafficLimitJSON = 5; // 流量限制\n\tbytes bandwidthLimitPerNodeJSON = 22; // 单节点带宽限制\n\tbool hasFullFeatures = 20; // 是否有所有权限\n\tbytes featuresJSON = 6; // 权限列表,[code1, code2, ...]\n\tstring priceType = 7; // 价格类型:traffic, bandwidth, period\n\tbytes trafficPriceJSON = 8; // 流量价格配置\n\tbytes bandwidthPriceJSON = 12; // 带宽价格配置\n\tdouble monthlyPrice = 9; // 月度价格\n\tdouble seasonallyPrice = 10; // 季度价格\n\tdouble yearlyPrice = 11; // 年度价格\n\tint32 totalServers = 13; // 可以添加的网站数\n\tint32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数\n\tint32 totalServerNames = 15; // 可以添加的域名总数\n\tint64 dailyRequests = 16; // 每日访问量额度\n\tint64 monthlyRequests = 17; // 每月访问量额度\n\tint64 dailyWebsocketConnections = 18; // 每日Websocket连接数额度\n\tint64 monthlyWebsocketConnections = 19; // 每月Websocket连接数额度\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
@@ -23067,7 +23086,7 @@
|
||||
},
|
||||
{
|
||||
"name": "UpdatePlanRequest",
|
||||
"code": "message UpdatePlanRequest {\n\tint64 planId = 1; // 套餐ID\n\tstring name = 2; // 套餐名称\n\tstring description = 21; // 套餐简介\n\tbool isOn = 3; // 是否启用\n\tint64 clusterId = 4; // 集群ID\n\tbytes trafficLimitJSON = 5; // 流量限制\n\tbool hasFullFeatures = 20; // 是否有所有权限\n\tbytes featuresJSON = 6; // 权限列表,[code1, code2, ...]\n\tstring priceType = 7; // 价格类型:traffic, bandwidth, period\n\tbytes trafficPriceJSON = 8; // 流量价格配置\n\tbytes bandwidthPriceJSON = 12; // 带宽价格配置\n\tfloat monthlyPrice = 9; // 月费用\n\tfloat seasonallyPrice = 10; // 季度费用\n\tfloat yearlyPrice = 11; // 年度费用\n\tint32 totalServers = 13; // 可以添加的网站数\n\tint32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数\n\tint32 totalServerNames = 15; // 可以添加的域名总数\n\tint64 dailyRequests = 16; // 每日访问量额度\n\tint64 monthlyRequests = 17; // 每月访问量额度\n\tint64 dailyWebsocketConnections = 18; // 每日Websocket连接数额度\n\tint64 monthlyWebsocketConnections = 19; // 每月Websocket连接数额度\n}",
|
||||
"code": "message UpdatePlanRequest {\n\tint64 planId = 1; // 套餐ID\n\tstring name = 2; // 套餐名称\n\tstring description = 21; // 套餐简介\n\tbool isOn = 3; // 是否启用\n\tint64 clusterId = 4; // 集群ID\n\tbytes trafficLimitJSON = 5; // 流量限制\n\tbytes bandwidthLimitPerNodeJSON = 22; // 单节点带宽限制\n\tbool hasFullFeatures = 20; // 是否有所有权限\n\tbytes featuresJSON = 6; // 权限列表,[code1, code2, ...]\n\tstring priceType = 7; // 价格类型:traffic, bandwidth, period\n\tbytes trafficPriceJSON = 8; // 流量价格配置\n\tbytes bandwidthPriceJSON = 12; // 带宽价格配置\n\tfloat monthlyPrice = 9; // 月费用\n\tfloat seasonallyPrice = 10; // 季度费用\n\tfloat yearlyPrice = 11; // 年度费用\n\tint32 totalServers = 13; // 可以添加的网站数\n\tint32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数\n\tint32 totalServerNames = 15; // 可以添加的域名总数\n\tint64 dailyRequests = 16; // 每日访问量额度\n\tint64 monthlyRequests = 17; // 每月访问量额度\n\tint64 dailyWebsocketConnections = 18; // 每日Websocket连接数额度\n\tint64 monthlyWebsocketConnections = 19; // 每月Websocket连接数额度\n}",
|
||||
"doc": "修改套餐"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@ var httpCCPolicyLocker = &sync.RWMutex{}
|
||||
var http3PolicyLocker = &sync.RWMutex{}
|
||||
var httpPagesPolicyLocker = &sync.RWMutex{}
|
||||
var webPPolicyLocker = &sync.RWMutex{}
|
||||
var plansLocker = &sync.RWMutex{}
|
||||
|
||||
type ServerError struct {
|
||||
Id int64
|
||||
@@ -105,6 +106,7 @@ type NodeConfig struct {
|
||||
HTTP3Policies map[int64]*HTTP3Policy `yaml:"http3Policies" json:"http3Policies"` // HTTP3相关配置, clusterId => *HTTP3Policy
|
||||
HTTPPagesPolicies map[int64]*HTTPPagesPolicy `yaml:"httpPagesPolicies" json:"httpPagesPolicies"` // 自定义页面,clusterId => *HTTPPagesPolicy
|
||||
NetworkSecurityPolicy *NetworkSecurityPolicy `yaml:"networkSecurityPolicy" json:"networkSecurityPolicy"` // 网络安全策略
|
||||
Plans map[int64]*serverconfigs.PlanConfig `yaml:"plans" json:"plans"` // 套餐 plan id => *serverconfigs.PlanConfig
|
||||
|
||||
// DNS
|
||||
DNSResolver *DNSResolverConfig `yaml:"dnsResolver" json:"dnsResolver"`
|
||||
@@ -214,6 +216,9 @@ func CloneNodeConfig(nodeConfig *NodeConfig) (*NodeConfig, error) {
|
||||
webPPolicyLocker.RLock()
|
||||
defer webPPolicyLocker.RUnlock()
|
||||
|
||||
plansLocker.RLock()
|
||||
defer plansLocker.RUnlock()
|
||||
|
||||
var newConfigValue = reflect.Indirect(reflect.ValueOf(&NodeConfig{}))
|
||||
var oldValue = reflect.Indirect(reflect.ValueOf(nodeConfig))
|
||||
var valueType = oldValue.Type()
|
||||
@@ -444,6 +449,19 @@ func (this *NodeConfig) Init(ctx context.Context) (err error, serverErrors []*Se
|
||||
}
|
||||
httpPagesPolicyLocker.RUnlock()
|
||||
|
||||
// plans
|
||||
plansLocker.RLock()
|
||||
if len(this.Plans) > 0 {
|
||||
for _, plan := range this.Plans {
|
||||
err = plan.Init()
|
||||
if err != nil {
|
||||
plansLocker.RUnlock()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
plansLocker.RUnlock()
|
||||
|
||||
// dns resolver
|
||||
if this.DNSResolver != nil {
|
||||
err = this.DNSResolver.Init()
|
||||
@@ -784,6 +802,27 @@ func (this *NodeConfig) FindHTTPPagesPolicyWithClusterId(clusterId int64) *HTTPP
|
||||
return this.HTTPPagesPolicies[clusterId]
|
||||
}
|
||||
|
||||
// UpdatePlans 更新套餐
|
||||
func (this *NodeConfig) UpdatePlans(planMap map[int64]*serverconfigs.PlanConfig) {
|
||||
plansLocker.Lock()
|
||||
this.Plans = planMap
|
||||
plansLocker.Unlock()
|
||||
}
|
||||
|
||||
// FindAllPlans 查找所有套餐
|
||||
func (this *NodeConfig) FindAllPlans() map[int64]*serverconfigs.PlanConfig {
|
||||
plansLocker.RLock()
|
||||
defer plansLocker.RUnlock()
|
||||
return this.Plans
|
||||
}
|
||||
|
||||
// 查找单个套餐
|
||||
func (this *NodeConfig) FindPlan(planId int64) *serverconfigs.PlanConfig {
|
||||
plansLocker.RLock()
|
||||
defer plansLocker.RUnlock()
|
||||
return this.Plans[planId]
|
||||
}
|
||||
|
||||
// SecretHash 对Id和Secret的Hash计算
|
||||
func (this *NodeConfig) SecretHash() string {
|
||||
return this.secretHash
|
||||
|
||||
@@ -31,6 +31,7 @@ type Plan struct {
|
||||
Description string `protobuf:"bytes,21,opt,name=description,proto3" json:"description,omitempty"` // 套餐简介
|
||||
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"` // 集群ID
|
||||
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"` // 流量限制
|
||||
BandwidthLimitPerNodeJSON []byte `protobuf:"bytes,22,opt,name=bandwidthLimitPerNodeJSON,proto3" json:"bandwidthLimitPerNodeJSON,omitempty"` // 单节点带宽限制
|
||||
HasFullFeatures bool `protobuf:"varint,20,opt,name=hasFullFeatures,proto3" json:"hasFullFeatures,omitempty"` // 是否有所有权限
|
||||
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"` // 权限列表,[code1, code2, ...]
|
||||
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"` // 价格类型:traffic, bandwidth, period
|
||||
@@ -122,6 +123,13 @@ func (x *Plan) GetTrafficLimitJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Plan) GetBandwidthLimitPerNodeJSON() []byte {
|
||||
if x != nil {
|
||||
return x.BandwidthLimitPerNodeJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Plan) GetHasFullFeatures() bool {
|
||||
if x != nil {
|
||||
return x.HasFullFeatures
|
||||
@@ -231,7 +239,7 @@ var File_models_model_plan_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_plan_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70,
|
||||
0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xc0, 0x06,
|
||||
0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xfe, 0x06,
|
||||
0x0a, 0x04, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
|
||||
@@ -242,49 +250,53 @@ var file_models_model_plan_proto_rawDesc = []byte{
|
||||
0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a,
|
||||
0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
|
||||
0x63, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x61,
|
||||
0x73, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x14, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74,
|
||||
0x75, 0x72, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73,
|
||||
0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74,
|
||||
0x75, 0x72, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x63,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69,
|
||||
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
|
||||
0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12,
|
||||
0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69,
|
||||
0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c,
|
||||
0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e,
|
||||
0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52,
|
||||
0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18,
|
||||
0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69,
|
||||
0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c,
|
||||
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x12, 0x24, 0x0a, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c,
|
||||
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
|
||||
0x12, 0x3c, 0x0a, 0x19, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x12, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x19, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63,
|
||||
0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40,
|
||||
0x0a, 0x1b, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x1b, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73,
|
||||
0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x63, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x3c, 0x0a, 0x19, 0x62, 0x61,
|
||||
0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x19, 0x62,
|
||||
0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x61, 0x73, 0x46,
|
||||
0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65,
|
||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10,
|
||||
0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x12, 0x2e, 0x0a, 0x12, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69,
|
||||
0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x62, 0x61,
|
||||
0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c,
|
||||
0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0f, 0x73,
|
||||
0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20,
|
||||
0x01, 0x28, 0x01, 0x52, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65,
|
||||
0x12, 0x22, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
|
||||
0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
|
||||
0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x6f,
|
||||
0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24,
|
||||
0x0a, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18,
|
||||
0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d,
|
||||
0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3c,
|
||||
0x0a, 0x19, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x19, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65,
|
||||
0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x1b,
|
||||
0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x1b, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63,
|
||||
0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -30,6 +30,7 @@ type CreatePlanRequest struct {
|
||||
Description string `protobuf:"bytes,19,opt,name=description,proto3" json:"description,omitempty"` // 套餐简介
|
||||
ClusterId int64 `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"` // 集群ID
|
||||
TrafficLimitJSON []byte `protobuf:"bytes,3,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"` // 流量限制
|
||||
BandwidthLimitPerNodeJSON []byte `protobuf:"bytes,20,opt,name=bandwidthLimitPerNodeJSON,proto3" json:"bandwidthLimitPerNodeJSON,omitempty"` // 单节点带宽限制
|
||||
HasFullFeatures bool `protobuf:"varint,18,opt,name=hasFullFeatures,proto3" json:"hasFullFeatures,omitempty"` // 是否有所有权限
|
||||
FeaturesJSON []byte `protobuf:"bytes,4,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"` // 权限列表,[code1, code2, ...]
|
||||
PriceType string `protobuf:"bytes,5,opt,name=priceType,proto3" json:"priceType,omitempty"` // 价格类型:traffic, bandwidth, period
|
||||
@@ -107,6 +108,13 @@ func (x *CreatePlanRequest) GetTrafficLimitJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreatePlanRequest) GetBandwidthLimitPerNodeJSON() []byte {
|
||||
if x != nil {
|
||||
return x.BandwidthLimitPerNodeJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreatePlanRequest) GetHasFullFeatures() bool {
|
||||
if x != nil {
|
||||
return x.HasFullFeatures
|
||||
@@ -271,6 +279,7 @@ type UpdatePlanRequest struct {
|
||||
IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
|
||||
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"` // 集群ID
|
||||
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"` // 流量限制
|
||||
BandwidthLimitPerNodeJSON []byte `protobuf:"bytes,22,opt,name=bandwidthLimitPerNodeJSON,proto3" json:"bandwidthLimitPerNodeJSON,omitempty"` // 单节点带宽限制
|
||||
HasFullFeatures bool `protobuf:"varint,20,opt,name=hasFullFeatures,proto3" json:"hasFullFeatures,omitempty"` // 是否有所有权限
|
||||
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"` // 权限列表,[code1, code2, ...]
|
||||
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"` // 价格类型:traffic, bandwidth, period
|
||||
@@ -362,6 +371,13 @@ func (x *UpdatePlanRequest) GetTrafficLimitJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UpdatePlanRequest) GetBandwidthLimitPerNodeJSON() []byte {
|
||||
if x != nil {
|
||||
return x.BandwidthLimitPerNodeJSON
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UpdatePlanRequest) GetHasFullFeatures() bool {
|
||||
if x != nil {
|
||||
return x.HasFullFeatures
|
||||
@@ -838,6 +854,92 @@ func (x *FindAllAvailablePlansResponse) GetPlans() []*Plan {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 列出所有可用的套餐的基本信息
|
||||
type FindAllAvailableBasicPlansRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *FindAllAvailableBasicPlansRequest) Reset() {
|
||||
*x = FindAllAvailableBasicPlansRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_plan_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindAllAvailableBasicPlansRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindAllAvailableBasicPlansRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FindAllAvailableBasicPlansRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_plan_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FindAllAvailableBasicPlansRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FindAllAvailableBasicPlansRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_plan_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
type FindAllAvailableBasicPlansResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Plans []*Plan `protobuf:"bytes,1,rep,name=plans,proto3" json:"plans,omitempty"` // 套餐列表
|
||||
}
|
||||
|
||||
func (x *FindAllAvailableBasicPlansResponse) Reset() {
|
||||
*x = FindAllAvailableBasicPlansResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_plan_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FindAllAvailableBasicPlansResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FindAllAvailableBasicPlansResponse) ProtoMessage() {}
|
||||
|
||||
func (x *FindAllAvailableBasicPlansResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_plan_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FindAllAvailableBasicPlansResponse.ProtoReflect.Descriptor instead.
|
||||
func (*FindAllAvailableBasicPlansResponse) Descriptor() ([]byte, []int) {
|
||||
return file_service_plan_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *FindAllAvailableBasicPlansResponse) GetPlans() []*Plan {
|
||||
if x != nil {
|
||||
return x.Plans
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 对套餐进行排序
|
||||
type SortPlansRequest struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -850,7 +952,7 @@ type SortPlansRequest struct {
|
||||
func (x *SortPlansRequest) Reset() {
|
||||
*x = SortPlansRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_plan_proto_msgTypes[11]
|
||||
mi := &file_service_plan_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -863,7 +965,7 @@ func (x *SortPlansRequest) String() string {
|
||||
func (*SortPlansRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SortPlansRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_plan_proto_msgTypes[11]
|
||||
mi := &file_service_plan_proto_msgTypes[13]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -876,7 +978,7 @@ func (x *SortPlansRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SortPlansRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SortPlansRequest) Descriptor() ([]byte, []int) {
|
||||
return file_service_plan_proto_rawDescGZIP(), []int{11}
|
||||
return file_service_plan_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *SortPlansRequest) GetPlanIds() []int64 {
|
||||
@@ -893,7 +995,7 @@ var file_service_plan_proto_rawDesc = []byte{
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
|
||||
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x6d, 0x65,
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x06, 0x0a,
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x06, 0x0a,
|
||||
0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
|
||||
@@ -903,169 +1005,190 @@ var file_service_plan_proto_rawDesc = []byte{
|
||||
0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
|
||||
0x63, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x61, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73,
|
||||
0x46, 0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a,
|
||||
0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
|
||||
0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x62, 0x61,
|
||||
0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74,
|
||||
0x68, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f,
|
||||
0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02,
|
||||
0x52, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28,
|
||||
0x0a, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63,
|
||||
0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61,
|
||||
0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x79, 0x65, 0x61, 0x72,
|
||||
0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x79,
|
||||
0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x6f,
|
||||
0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x3c,
|
||||
0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x61, 0x69, 0x6c,
|
||||
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x28,
|
||||
0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x19, 0x64, 0x61, 0x69, 0x6c,
|
||||
0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x64, 0x61, 0x69,
|
||||
0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x1b, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c,
|
||||
0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1b, 0x6d, 0x6f, 0x6e,
|
||||
0x74, 0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
|
||||
0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x22, 0xd5, 0x06, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x6c,
|
||||
0x61, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
|
||||
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
|
||||
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73,
|
||||
0x4f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10,
|
||||
0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x61, 0x73, 0x46,
|
||||
0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65,
|
||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10,
|
||||
0x4f, 0x4e, 0x12, 0x3c, 0x0a, 0x19, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x4c,
|
||||
0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18,
|
||||
0x14, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x19, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68,
|
||||
0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x12, 0x28, 0x0a, 0x0f, 0x68, 0x61, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75,
|
||||
0x72, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x46, 0x75,
|
||||
0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x65,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10,
|
||||
0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x12, 0x2e, 0x0a, 0x12, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69,
|
||||
0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x62, 0x61,
|
||||
0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c,
|
||||
0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x73,
|
||||
0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20,
|
||||
0x01, 0x28, 0x02, 0x52, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65,
|
||||
0x12, 0x22, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
|
||||
0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
|
||||
0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x6f,
|
||||
0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24,
|
||||
0x0a, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18,
|
||||
0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d,
|
||||
0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3c,
|
||||
0x0a, 0x19, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x19, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65,
|
||||
0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x1b,
|
||||
0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x1b, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63,
|
||||
0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2b,
|
||||
0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x16, 0x46,
|
||||
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x37, 0x0a,
|
||||
0x17, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x6e,
|
||||
0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x22, 0x1d, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41,
|
||||
0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x45, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x0a, 0x18,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x6e,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61,
|
||||
0x6e, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64,
|
||||
0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x6e,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64,
|
||||
0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x6e,
|
||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x70, 0x6c, 0x61,
|
||||
0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c,
|
||||
0x61, 0x6e, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x22, 0x2c, 0x0a, 0x10, 0x53, 0x6f, 0x72,
|
||||
0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07,
|
||||
0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x32, 0xaf, 0x04, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x6e,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c,
|
||||
0x61, 0x6e, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c,
|
||||
0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52,
|
||||
0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x33, 0x0a, 0x0a, 0x64, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4a,
|
||||
0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61,
|
||||
0x6e, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c,
|
||||
0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x14, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61,
|
||||
0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x10, 0x6c, 0x69, 0x73,
|
||||
0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x1b, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c,
|
||||
0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x64,
|
||||
0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x6e,
|
||||
0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x76,
|
||||
0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c,
|
||||
0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x50, 0x6c,
|
||||
0x61, 0x6e, 0x73, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x50, 0x6c, 0x61,
|
||||
0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52,
|
||||
0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x62, 0x61, 0x6e, 0x64,
|
||||
0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0a,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f, 0x6e, 0x74,
|
||||
0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c,
|
||||
0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f,
|
||||
0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c,
|
||||
0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79,
|
||||
0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x79, 0x65, 0x61,
|
||||
0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61,
|
||||
0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x19,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x6f,
|
||||
0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0d,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64,
|
||||
0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f,
|
||||
0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18,
|
||||
0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x19, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x57,
|
||||
0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x64, 0x61, 0x69, 0x6c, 0x79,
|
||||
0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x1b, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x57,
|
||||
0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1b, 0x6d, 0x6f, 0x6e, 0x74, 0x68,
|
||||
0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x6c,
|
||||
0x61, 0x6e, 0x49, 0x64, 0x22, 0x93, 0x07, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50,
|
||||
0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c,
|
||||
0x61, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e,
|
||||
0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
|
||||
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72,
|
||||
0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x69, 0x6d,
|
||||
0x69, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x3c, 0x0a, 0x19, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69,
|
||||
0x64, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x4a,
|
||||
0x53, 0x4f, 0x4e, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x19, 0x62, 0x61, 0x6e, 0x64, 0x77,
|
||||
0x69, 0x64, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x61, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x46,
|
||||
0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68,
|
||||
0x61, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x22,
|
||||
0x0a, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65,
|
||||
0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66,
|
||||
0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12,
|
||||
0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53,
|
||||
0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69,
|
||||
0x64, 0x74, 0x68, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01,
|
||||
0x28, 0x02, 0x52, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65,
|
||||
0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72,
|
||||
0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f,
|
||||
0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x79, 0x65,
|
||||
0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52,
|
||||
0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
|
||||
0x12, 0x3c, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x0e, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2a,
|
||||
0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x61,
|
||||
0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
|
||||
0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68,
|
||||
0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x19, 0x64, 0x61,
|
||||
0x69, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x64,
|
||||
0x61, 0x69, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x1b, 0x6d, 0x6f, 0x6e, 0x74,
|
||||
0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1b, 0x6d,
|
||||
0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43,
|
||||
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2b, 0x0a, 0x11, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x16, 0x46, 0x69, 0x6e, 0x64, 0x45,
|
||||
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x37, 0x0a, 0x17, 0x46, 0x69, 0x6e,
|
||||
0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x04, 0x70, 0x6c,
|
||||
0x61, 0x6e, 0x22, 0x1d, 0x0a, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x22, 0x45, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66,
|
||||
0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x3a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x70,
|
||||
0x6c, 0x61, 0x6e, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41,
|
||||
0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41,
|
||||
0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x05,
|
||||
0x70, 0x6c, 0x61, 0x6e, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c,
|
||||
0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x69, 0x63, 0x50, 0x6c,
|
||||
0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, 0x22, 0x46, 0x69,
|
||||
0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61,
|
||||
0x73, 0x69, 0x63, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x1e, 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x08, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x05, 0x70, 0x6c, 0x61, 0x6e, 0x73,
|
||||
0x22, 0x2c, 0x0a, 0x10, 0x53, 0x6f, 0x72, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x73, 0x32, 0x9c,
|
||||
0x05, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b,
|
||||
0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x15, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50,
|
||||
0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x75,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x12, 0x33, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x15,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4a, 0x0a, 0x0f, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
|
||||
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x4d, 0x0a, 0x14, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c,
|
||||
0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x52, 0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x4d, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x50,
|
||||
0x6c, 0x61, 0x6e, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x5c, 0x0a, 0x15, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
|
||||
0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c,
|
||||
0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a,
|
||||
0x1a, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x42, 0x61, 0x73, 0x69, 0x63, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x42, 0x61, 0x73, 0x69, 0x63, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x26, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41,
|
||||
0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x69, 0x63, 0x50, 0x6c, 0x61,
|
||||
0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x73, 0x6f,
|
||||
0x72, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x6f, 0x72,
|
||||
0x74, 0x50, 0x6c, 0x61, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a,
|
||||
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -1080,7 +1203,7 @@ func file_service_plan_proto_rawDescGZIP() []byte {
|
||||
return file_service_plan_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_service_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_service_plan_proto_goTypes = []interface{}{
|
||||
(*CreatePlanRequest)(nil), // 0: pb.CreatePlanRequest
|
||||
(*CreatePlanResponse)(nil), // 1: pb.CreatePlanResponse
|
||||
@@ -1093,36 +1216,41 @@ var file_service_plan_proto_goTypes = []interface{}{
|
||||
(*ListEnabledPlansResponse)(nil), // 8: pb.ListEnabledPlansResponse
|
||||
(*FindAllAvailablePlansRequest)(nil), // 9: pb.FindAllAvailablePlansRequest
|
||||
(*FindAllAvailablePlansResponse)(nil), // 10: pb.FindAllAvailablePlansResponse
|
||||
(*SortPlansRequest)(nil), // 11: pb.SortPlansRequest
|
||||
(*Plan)(nil), // 12: pb.Plan
|
||||
(*RPCSuccess)(nil), // 13: pb.RPCSuccess
|
||||
(*RPCCountResponse)(nil), // 14: pb.RPCCountResponse
|
||||
(*FindAllAvailableBasicPlansRequest)(nil), // 11: pb.FindAllAvailableBasicPlansRequest
|
||||
(*FindAllAvailableBasicPlansResponse)(nil), // 12: pb.FindAllAvailableBasicPlansResponse
|
||||
(*SortPlansRequest)(nil), // 13: pb.SortPlansRequest
|
||||
(*Plan)(nil), // 14: pb.Plan
|
||||
(*RPCSuccess)(nil), // 15: pb.RPCSuccess
|
||||
(*RPCCountResponse)(nil), // 16: pb.RPCCountResponse
|
||||
}
|
||||
var file_service_plan_proto_depIdxs = []int32{
|
||||
12, // 0: pb.FindEnabledPlanResponse.plan:type_name -> pb.Plan
|
||||
12, // 1: pb.ListEnabledPlansResponse.plans:type_name -> pb.Plan
|
||||
12, // 2: pb.FindAllAvailablePlansResponse.plans:type_name -> pb.Plan
|
||||
0, // 3: pb.PlanService.createPlan:input_type -> pb.CreatePlanRequest
|
||||
2, // 4: pb.PlanService.updatePlan:input_type -> pb.UpdatePlanRequest
|
||||
3, // 5: pb.PlanService.deletePlan:input_type -> pb.DeletePlanRequest
|
||||
4, // 6: pb.PlanService.findEnabledPlan:input_type -> pb.FindEnabledPlanRequest
|
||||
6, // 7: pb.PlanService.countAllEnabledPlans:input_type -> pb.CountAllEnabledPlansRequest
|
||||
7, // 8: pb.PlanService.listEnabledPlans:input_type -> pb.ListEnabledPlansRequest
|
||||
9, // 9: pb.PlanService.findAllAvailablePlans:input_type -> pb.FindAllAvailablePlansRequest
|
||||
11, // 10: pb.PlanService.sortPlans:input_type -> pb.SortPlansRequest
|
||||
1, // 11: pb.PlanService.createPlan:output_type -> pb.CreatePlanResponse
|
||||
13, // 12: pb.PlanService.updatePlan:output_type -> pb.RPCSuccess
|
||||
13, // 13: pb.PlanService.deletePlan:output_type -> pb.RPCSuccess
|
||||
5, // 14: pb.PlanService.findEnabledPlan:output_type -> pb.FindEnabledPlanResponse
|
||||
14, // 15: pb.PlanService.countAllEnabledPlans:output_type -> pb.RPCCountResponse
|
||||
8, // 16: pb.PlanService.listEnabledPlans:output_type -> pb.ListEnabledPlansResponse
|
||||
10, // 17: pb.PlanService.findAllAvailablePlans:output_type -> pb.FindAllAvailablePlansResponse
|
||||
13, // 18: pb.PlanService.sortPlans:output_type -> pb.RPCSuccess
|
||||
11, // [11:19] is the sub-list for method output_type
|
||||
3, // [3:11] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
14, // 0: pb.FindEnabledPlanResponse.plan:type_name -> pb.Plan
|
||||
14, // 1: pb.ListEnabledPlansResponse.plans:type_name -> pb.Plan
|
||||
14, // 2: pb.FindAllAvailablePlansResponse.plans:type_name -> pb.Plan
|
||||
14, // 3: pb.FindAllAvailableBasicPlansResponse.plans:type_name -> pb.Plan
|
||||
0, // 4: pb.PlanService.createPlan:input_type -> pb.CreatePlanRequest
|
||||
2, // 5: pb.PlanService.updatePlan:input_type -> pb.UpdatePlanRequest
|
||||
3, // 6: pb.PlanService.deletePlan:input_type -> pb.DeletePlanRequest
|
||||
4, // 7: pb.PlanService.findEnabledPlan:input_type -> pb.FindEnabledPlanRequest
|
||||
6, // 8: pb.PlanService.countAllEnabledPlans:input_type -> pb.CountAllEnabledPlansRequest
|
||||
7, // 9: pb.PlanService.listEnabledPlans:input_type -> pb.ListEnabledPlansRequest
|
||||
9, // 10: pb.PlanService.findAllAvailablePlans:input_type -> pb.FindAllAvailablePlansRequest
|
||||
11, // 11: pb.PlanService.findAllAvailableBasicPlans:input_type -> pb.FindAllAvailableBasicPlansRequest
|
||||
13, // 12: pb.PlanService.sortPlans:input_type -> pb.SortPlansRequest
|
||||
1, // 13: pb.PlanService.createPlan:output_type -> pb.CreatePlanResponse
|
||||
15, // 14: pb.PlanService.updatePlan:output_type -> pb.RPCSuccess
|
||||
15, // 15: pb.PlanService.deletePlan:output_type -> pb.RPCSuccess
|
||||
5, // 16: pb.PlanService.findEnabledPlan:output_type -> pb.FindEnabledPlanResponse
|
||||
16, // 17: pb.PlanService.countAllEnabledPlans:output_type -> pb.RPCCountResponse
|
||||
8, // 18: pb.PlanService.listEnabledPlans:output_type -> pb.ListEnabledPlansResponse
|
||||
10, // 19: pb.PlanService.findAllAvailablePlans:output_type -> pb.FindAllAvailablePlansResponse
|
||||
12, // 20: pb.PlanService.findAllAvailableBasicPlans:output_type -> pb.FindAllAvailableBasicPlansResponse
|
||||
15, // 21: pb.PlanService.sortPlans:output_type -> pb.RPCSuccess
|
||||
13, // [13:22] is the sub-list for method output_type
|
||||
4, // [4:13] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_service_plan_proto_init() }
|
||||
@@ -1266,6 +1394,30 @@ func file_service_plan_proto_init() {
|
||||
}
|
||||
}
|
||||
file_service_plan_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindAllAvailableBasicPlansRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_plan_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FindAllAvailableBasicPlansResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_plan_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SortPlansRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1284,7 +1436,7 @@ func file_service_plan_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_service_plan_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 12,
|
||||
NumMessages: 14,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@@ -26,6 +26,7 @@ const (
|
||||
PlanService_CountAllEnabledPlans_FullMethodName = "/pb.PlanService/countAllEnabledPlans"
|
||||
PlanService_ListEnabledPlans_FullMethodName = "/pb.PlanService/listEnabledPlans"
|
||||
PlanService_FindAllAvailablePlans_FullMethodName = "/pb.PlanService/findAllAvailablePlans"
|
||||
PlanService_FindAllAvailableBasicPlans_FullMethodName = "/pb.PlanService/findAllAvailableBasicPlans"
|
||||
PlanService_SortPlans_FullMethodName = "/pb.PlanService/sortPlans"
|
||||
)
|
||||
|
||||
@@ -47,6 +48,8 @@ type PlanServiceClient interface {
|
||||
ListEnabledPlans(ctx context.Context, in *ListEnabledPlansRequest, opts ...grpc.CallOption) (*ListEnabledPlansResponse, error)
|
||||
// 列出所有可用的套餐
|
||||
FindAllAvailablePlans(ctx context.Context, in *FindAllAvailablePlansRequest, opts ...grpc.CallOption) (*FindAllAvailablePlansResponse, error)
|
||||
// 列出所有可用的套餐的基本信息
|
||||
FindAllAvailableBasicPlans(ctx context.Context, in *FindAllAvailableBasicPlansRequest, opts ...grpc.CallOption) (*FindAllAvailableBasicPlansResponse, error)
|
||||
// 对套餐进行排序
|
||||
SortPlans(ctx context.Context, in *SortPlansRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
}
|
||||
@@ -122,6 +125,15 @@ func (c *planServiceClient) FindAllAvailablePlans(ctx context.Context, in *FindA
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *planServiceClient) FindAllAvailableBasicPlans(ctx context.Context, in *FindAllAvailableBasicPlansRequest, opts ...grpc.CallOption) (*FindAllAvailableBasicPlansResponse, error) {
|
||||
out := new(FindAllAvailableBasicPlansResponse)
|
||||
err := c.cc.Invoke(ctx, PlanService_FindAllAvailableBasicPlans_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *planServiceClient) SortPlans(ctx context.Context, in *SortPlansRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
|
||||
out := new(RPCSuccess)
|
||||
err := c.cc.Invoke(ctx, PlanService_SortPlans_FullMethodName, in, out, opts...)
|
||||
@@ -149,6 +161,8 @@ type PlanServiceServer interface {
|
||||
ListEnabledPlans(context.Context, *ListEnabledPlansRequest) (*ListEnabledPlansResponse, error)
|
||||
// 列出所有可用的套餐
|
||||
FindAllAvailablePlans(context.Context, *FindAllAvailablePlansRequest) (*FindAllAvailablePlansResponse, error)
|
||||
// 列出所有可用的套餐的基本信息
|
||||
FindAllAvailableBasicPlans(context.Context, *FindAllAvailableBasicPlansRequest) (*FindAllAvailableBasicPlansResponse, error)
|
||||
// 对套餐进行排序
|
||||
SortPlans(context.Context, *SortPlansRequest) (*RPCSuccess, error)
|
||||
}
|
||||
@@ -178,6 +192,9 @@ func (UnimplementedPlanServiceServer) ListEnabledPlans(context.Context, *ListEna
|
||||
func (UnimplementedPlanServiceServer) FindAllAvailablePlans(context.Context, *FindAllAvailablePlansRequest) (*FindAllAvailablePlansResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAllAvailablePlans not implemented")
|
||||
}
|
||||
func (UnimplementedPlanServiceServer) FindAllAvailableBasicPlans(context.Context, *FindAllAvailableBasicPlansRequest) (*FindAllAvailableBasicPlansResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindAllAvailableBasicPlans not implemented")
|
||||
}
|
||||
func (UnimplementedPlanServiceServer) SortPlans(context.Context, *SortPlansRequest) (*RPCSuccess, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SortPlans not implemented")
|
||||
}
|
||||
@@ -319,6 +336,24 @@ func _PlanService_FindAllAvailablePlans_Handler(srv interface{}, ctx context.Con
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PlanService_FindAllAvailableBasicPlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindAllAvailableBasicPlansRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PlanServiceServer).FindAllAvailableBasicPlans(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PlanService_FindAllAvailableBasicPlans_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PlanServiceServer).FindAllAvailableBasicPlans(ctx, req.(*FindAllAvailableBasicPlansRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PlanService_SortPlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SortPlansRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -372,6 +407,10 @@ var PlanService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "findAllAvailablePlans",
|
||||
Handler: _PlanService_FindAllAvailablePlans_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "findAllAvailableBasicPlans",
|
||||
Handler: _PlanService_FindAllAvailableBasicPlans_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "sortPlans",
|
||||
Handler: _PlanService_SortPlans_Handler,
|
||||
|
||||
@@ -10,6 +10,7 @@ message Plan {
|
||||
string description = 21; // 套餐简介
|
||||
int64 clusterId = 4; // 集群ID
|
||||
bytes trafficLimitJSON = 5; // 流量限制
|
||||
bytes bandwidthLimitPerNodeJSON = 22; // 单节点带宽限制
|
||||
bool hasFullFeatures = 20; // 是否有所有权限
|
||||
bytes featuresJSON = 6; // 权限列表,[code1, code2, ...]
|
||||
string priceType = 7; // 价格类型:traffic, bandwidth, period
|
||||
|
||||
@@ -29,6 +29,9 @@ service PlanService {
|
||||
// 列出所有可用的套餐
|
||||
rpc findAllAvailablePlans(FindAllAvailablePlansRequest) returns (FindAllAvailablePlansResponse);
|
||||
|
||||
// 列出所有可用的套餐的基本信息
|
||||
rpc findAllAvailableBasicPlans(FindAllAvailableBasicPlansRequest) returns (FindAllAvailableBasicPlansResponse);
|
||||
|
||||
// 对套餐进行排序
|
||||
rpc sortPlans(SortPlansRequest) returns (RPCSuccess);
|
||||
}
|
||||
@@ -39,6 +42,7 @@ message CreatePlanRequest {
|
||||
string description = 19; // 套餐简介
|
||||
int64 clusterId = 2; // 集群ID
|
||||
bytes trafficLimitJSON = 3; // 流量限制
|
||||
bytes bandwidthLimitPerNodeJSON = 20; // 单节点带宽限制
|
||||
bool hasFullFeatures = 18; // 是否有所有权限
|
||||
bytes featuresJSON = 4; // 权限列表,[code1, code2, ...]
|
||||
string priceType = 5; // 价格类型:traffic, bandwidth, period
|
||||
@@ -68,6 +72,7 @@ message UpdatePlanRequest {
|
||||
bool isOn = 3; // 是否启用
|
||||
int64 clusterId = 4; // 集群ID
|
||||
bytes trafficLimitJSON = 5; // 流量限制
|
||||
bytes bandwidthLimitPerNodeJSON = 22; // 单节点带宽限制
|
||||
bool hasFullFeatures = 20; // 是否有所有权限
|
||||
bytes featuresJSON = 6; // 权限列表,[code1, code2, ...]
|
||||
string priceType = 7; // 价格类型:traffic, bandwidth, period
|
||||
@@ -123,6 +128,15 @@ message FindAllAvailablePlansResponse {
|
||||
repeated Plan plans = 1; // 套餐列表
|
||||
}
|
||||
|
||||
// 列出所有可用的套餐的基本信息
|
||||
message FindAllAvailableBasicPlansRequest {
|
||||
|
||||
}
|
||||
|
||||
message FindAllAvailableBasicPlansResponse {
|
||||
repeated Plan plans = 1; // 套餐列表
|
||||
}
|
||||
|
||||
// 对套餐进行排序
|
||||
message SortPlansRequest {
|
||||
repeated int64 planIds = 1; // 排序后的套餐ID列表
|
||||
|
||||
@@ -2,11 +2,22 @@
|
||||
|
||||
package serverconfigs
|
||||
|
||||
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
|
||||
|
||||
type PlanConfig struct {
|
||||
Id int64 `yaml:"id" json:"id"`
|
||||
Name string `yaml:"name" json:"name"`
|
||||
|
||||
TrafficLimit *TrafficLimitConfig `yaml:"trafficLimit" json:"trafficLimit"`
|
||||
BandwidthLimitPerNode *shared.BitSizeCapacity `yaml:"bandwidthLimitPerNode" json:"bandwidthLimitPerNode"`
|
||||
}
|
||||
|
||||
func (this *PlanConfig) Init() error {
|
||||
if this.TrafficLimit != nil {
|
||||
err := this.TrafficLimit.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -256,9 +256,7 @@ func (this *ServerConfig) Init(ctx context.Context) (results []error) {
|
||||
results = append(results, err)
|
||||
}
|
||||
|
||||
if this.UserPlan.Plan != nil {
|
||||
this.planId = this.UserPlan.Plan.Id
|
||||
}
|
||||
this.planId = this.UserPlan.PlanId
|
||||
}
|
||||
|
||||
// UAM
|
||||
|
||||
77
pkg/serverconfigs/shared/bit_size_capacity.go
Normal file
77
pkg/serverconfigs/shared/bit_size_capacity.go
Normal file
@@ -0,0 +1,77 @@
|
||||
package shared
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
type BitSizeCapacityUnit = string
|
||||
|
||||
const (
|
||||
BitSizeCapacityUnitB BitSizeCapacityUnit = "b"
|
||||
BitSizeCapacityUnitKB BitSizeCapacityUnit = "kb"
|
||||
BitSizeCapacityUnitMB BitSizeCapacityUnit = "mb"
|
||||
BitSizeCapacityUnitGB BitSizeCapacityUnit = "gb"
|
||||
BitSizeCapacityUnitTB BitSizeCapacityUnit = "tb"
|
||||
BitSizeCapacityUnitPB BitSizeCapacityUnit = "pb"
|
||||
BitSizeCapacityUnitEB BitSizeCapacityUnit = "eb"
|
||||
//BitSizeCapacityUnitZB BitSizeCapacityUnit = "zb" // zb和yb超出int64范围,暂不支持
|
||||
//BitSizeCapacityUnitYB BitSizeCapacityUnit = "yb"
|
||||
)
|
||||
|
||||
type BitSizeCapacity struct {
|
||||
Count int64 `json:"count" yaml:"count"`
|
||||
Unit BitSizeCapacityUnit `json:"unit" yaml:"unit"`
|
||||
}
|
||||
|
||||
func NewBitSizeCapacity(count int64, unit BitSizeCapacityUnit) *BitSizeCapacity {
|
||||
return &BitSizeCapacity{
|
||||
Count: count,
|
||||
Unit: unit,
|
||||
}
|
||||
}
|
||||
|
||||
func DecodeBitSizeCapacityJSON(sizeCapacityJSON []byte) (*BitSizeCapacity, error) {
|
||||
var capacity = &BitSizeCapacity{}
|
||||
err := json.Unmarshal(sizeCapacityJSON, capacity)
|
||||
return capacity, err
|
||||
}
|
||||
|
||||
func (this *BitSizeCapacity) Bits() int64 {
|
||||
if this.Count < 0 {
|
||||
return -1
|
||||
}
|
||||
switch this.Unit {
|
||||
case BitSizeCapacityUnitB:
|
||||
return this.Count
|
||||
case BitSizeCapacityUnitKB:
|
||||
return this.Count * this.pow(1)
|
||||
case BitSizeCapacityUnitMB:
|
||||
return this.Count * this.pow(2)
|
||||
case BitSizeCapacityUnitGB:
|
||||
return this.Count * this.pow(3)
|
||||
case BitSizeCapacityUnitTB:
|
||||
return this.Count * this.pow(4)
|
||||
case BitSizeCapacityUnitPB:
|
||||
return this.Count * this.pow(5)
|
||||
case BitSizeCapacityUnitEB:
|
||||
return this.Count * this.pow(6)
|
||||
default:
|
||||
return this.Count
|
||||
}
|
||||
}
|
||||
|
||||
func (this *BitSizeCapacity) IsNotEmpty() bool {
|
||||
return this.Count > 0
|
||||
}
|
||||
|
||||
func (this *BitSizeCapacity) AsJSON() ([]byte, error) {
|
||||
return json.Marshal(this)
|
||||
}
|
||||
|
||||
func (this *BitSizeCapacity) pow(n int) int64 {
|
||||
if n <= 0 {
|
||||
return 1
|
||||
}
|
||||
if n == 1 {
|
||||
return 1024 // TODO 考虑是否使用1000进制
|
||||
}
|
||||
return this.pow(n-1) * 1024
|
||||
}
|
||||
27
pkg/serverconfigs/shared/bit_size_capacity_test.go
Normal file
27
pkg/serverconfigs/shared/bit_size_capacity_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package shared_test
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBitSizeCapacity_Bits(t *testing.T) {
|
||||
{
|
||||
var capacity = shared.NewBitSizeCapacity(1, shared.BitSizeCapacityUnitB)
|
||||
t.Log(capacity.Bits())
|
||||
}
|
||||
{
|
||||
var capacity = shared.NewBitSizeCapacity(2, shared.BitSizeCapacityUnitKB)
|
||||
t.Log(capacity.Bits())
|
||||
}
|
||||
{
|
||||
var capacity = shared.NewBitSizeCapacity(3, shared.BitSizeCapacityUnitMB)
|
||||
t.Log(capacity.Bits())
|
||||
}
|
||||
{
|
||||
var capacity = shared.NewBitSizeCapacity(4, shared.BitSizeCapacityUnitGB)
|
||||
t.Log(capacity.Bits())
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,10 @@ type TrafficLimitConfig struct {
|
||||
NoticePageBody string `yaml:"noticePageBody" json:"noticePageBody"` // 超出限制时的提醒,支持请求变量
|
||||
}
|
||||
|
||||
func (this *TrafficLimitConfig) Init() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DailyBytes 每天限制
|
||||
// 不使用Init()来初始化数据,是为了让其他地方不经过Init()也能得到计算值
|
||||
func (this *TrafficLimitConfig) DailyBytes() int64 {
|
||||
|
||||
@@ -22,18 +22,11 @@ const DefaultPlanExpireNoticePageBody = `<!DOCTYPE html>
|
||||
type UserPlanConfig struct {
|
||||
Id int64 `yaml:"id" json:"id"` // 用户套餐ID
|
||||
DayTo string `yaml:"dayTo" json:"dayTo"` // 有效期
|
||||
|
||||
Plan *PlanConfig `yaml:"plan" json:"plan"`
|
||||
PlanId int64 `yaml:"planId" json:"planId"` // 套餐定义ID
|
||||
}
|
||||
|
||||
// Init 初始化
|
||||
func (this *UserPlanConfig) Init() error {
|
||||
if this.Plan != nil {
|
||||
err := this.Plan.Init()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user