重新实现套餐相关功能

This commit is contained in:
刘祥超
2023-09-06 16:31:14 +08:00
parent 972b487db8
commit 2497a81e09
16 changed files with 1600 additions and 972 deletions

View File

@@ -10717,6 +10717,30 @@
],
"isDeprecated": false
},
{
"name": "countAllServerNamesWithUserId",
"requestMessageName": "CountAllServerNamesWithUserIdRequest",
"responseMessageName": "RPCCountResponse",
"code": "rpc countAllServerNamesWithUserId (CountAllServerNamesWithUserIdRequest) returns (RPCCountResponse);",
"doc": "计算一个用户下的所有域名数量",
"roles": [
"admin",
"user"
],
"isDeprecated": false
},
{
"name": "countServerNames",
"requestMessageName": "CountServerNamesRequest",
"responseMessageName": "RPCCountResponse",
"code": "rpc countServerNames(CountServerNamesRequest) returns (RPCCountResponse);",
"doc": "计算某个网站下的域名数量",
"roles": [
"admin",
"user"
],
"isDeprecated": false
},
{
"name": "findAllUserServers",
"requestMessageName": "FindAllUserServersRequest",
@@ -10729,6 +10753,18 @@
],
"isDeprecated": false
},
{
"name": "countAllUserServers",
"requestMessageName": "CountAllUserServersRequest",
"responseMessageName": "RPCCountResponse",
"code": "rpc countAllUserServers(CountAllUserServersRequest) returns (RPCCountResponse);",
"doc": "计算一个用户下的所有网站数量",
"roles": [
"admin",
"user"
],
"isDeprecated": false
},
{
"name": "composeAllUserServersConfig",
"requestMessageName": "ComposeAllUserServersConfigRequest",
@@ -14299,7 +14335,7 @@
},
{
"name": "CountAllEnabledServersMatchRequest",
"code": "message CountAllEnabledServersMatchRequest {\n\tint64 serverGroupId = 1; // 网站分组ID如果为-1表示查找未分组\n\tstring keyword = 2;\n\tint64 userId = 3;\n\tint64 nodeClusterId = 4;\n\tint32 auditingFlag = 5;\n\tstring protocolFamily = 6;\n}",
"code": "message CountAllEnabledServersMatchRequest {\n\tint64 serverGroupId = 1; // 网站分组ID如果为-1表示查找未分组\n\tstring keyword = 2;\n\tint64 userId = 3;\n\tint64 nodeClusterId = 4;\n\tint32 auditingFlag = 5;\n\tstring protocolFamily = 6;\n\tint64 userPlanId = 7; // 用户套餐ID\n}",
"doc": "计算网站数量"
},
{
@@ -14427,6 +14463,11 @@
"code": "message CountAllServerBillsRequest {\n\tint64 userId = 1;\n\tstring month = 2;\n}",
"doc": "查询服务账单数量"
},
{
"name": "CountAllServerNamesWithUserIdRequest",
"code": "message CountAllServerNamesWithUserIdRequest {\n\tint64 userId = 1; // 用户ID\n\tint64 userPlanId = 2; // 用户套餐ID\n}",
"doc": "计算一个用户下的所有域名数量"
},
{
"name": "CountAllUpgradeNSNodesWithNSClusterIdRequest",
"code": "message CountAllUpgradeNSNodesWithNSClusterIdRequest {\n\tint64 nsClusterId = 1;\n}",
@@ -14442,6 +14483,11 @@
"code": "message CountAllUserBillsRequest {\n\tint32 paidFlag = 1; // 可选0|1|-1\n\tint64 userId = 2; // 可选用户ID\n\tstring month = 3; // 可选,月份\n\tbool trafficRelated = 4; // 可选,是否为流量带宽相关\n\tint32 minDailyBillDays = 5; // 可选,按日计费账单生成最小天数\n\tint32 minMonthlyBillDays = 6; // 可选,按月计费账单生成最小天数\n}",
"doc": "计算所有账单数量"
},
{
"name": "CountAllUserServersRequest",
"code": "message CountAllUserServersRequest {\n\tint64 userId = 1; // 用户ID\n\tint64 userPlanId = 2; // 用户套餐ID\n}",
"doc": "计算一个用户下的所有网站数量"
},
{
"name": "CountDoingHTTPCacheTasksRequest",
"code": "message CountDoingHTTPCacheTasksRequest {\n\n}",
@@ -14537,6 +14583,11 @@
"code": "message CountSSLCertRequest {\n\tbool isCA = 1; // 可选项是否为CA证书\n\tbool isAvailable = 2; // 可选项,是否可用(在有效期内)\n\tbool isExpired = 3; // 可选项,是否已过期\n\tint32 expiringDays = 4; // 可选项,离过期日的天数\n\tstring keyword = 5; // 可选项,关键词\n\tint64 userId = 6; // 可选项用户ID不填则表示读取管理员上传的证书\n\trepeated string domains = 7; // 可选项,搜索使用的域名列表\n}",
"doc": "计算匹配的证书数量"
},
{
"name": "CountServerNamesRequest",
"code": "message CountServerNamesRequest {\n\tint64 serverId = 1; // 网站ID\n}",
"doc": "计算某个网站下的域名数量"
},
{
"name": "CountTrafficPackagePricesRequest",
"code": "message CountTrafficPackagePricesRequest {\n\tint64 trafficPackageId = 1;\n}",
@@ -15389,7 +15440,7 @@
},
{
"name": "CreatePlanRequest",
"code": "message CreatePlanRequest {\n\tstring name = 1;\n\tint64 clusterId = 2;\n\tbytes trafficLimitJSON = 3;\n\tbytes featuresJSON = 4;\n\tstring priceType = 5;\n\tbytes trafficPriceJSON = 6;\n\tbytes bandwidthPriceJSON = 10;\n\tfloat monthlyPrice = 7;\n\tfloat seasonallyPrice = 8;\n\tfloat yearlyPrice = 9;\n}",
"code": "message CreatePlanRequest {\n\tstring name = 1;\n\tint64 clusterId = 2;\n\tbytes trafficLimitJSON = 3;\n\tbytes featuresJSON = 4;\n\tstring priceType = 5;\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}",
"doc": "创建套餐"
},
{
@@ -21024,7 +21075,7 @@
},
{
"name": "Plan",
"code": "message Plan {\n\tint64 id = 1;\n\tbool isOn = 2;\n\tstring name = 3;\n\tint64 clusterId = 4;\n\tbytes trafficLimitJSON = 5;\n\tbytes featuresJSON = 6;\n\tstring priceType = 7;\n\tbytes trafficPriceJSON = 8;\n\tbytes bandwidthPriceJSON = 12;\n\tdouble monthlyPrice = 9;\n\tdouble seasonallyPrice = 10;\n\tdouble yearlyPrice = 11;\n}",
"code": "message Plan {\n\tint64 id = 1;\n\tbool isOn = 2;\n\tstring name = 3;\n\tint64 clusterId = 4;\n\tbytes trafficLimitJSON = 5;\n\tbytes featuresJSON = 6;\n\tstring priceType = 7;\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}",
"doc": ""
},
{
@@ -21259,7 +21310,7 @@
},
{
"name": "ServerBandwidthStat",
"code": "message ServerBandwidthStat {\n\tint64 id = 1; // ID\n\tint64 userId = 2; // 用户ID\n\tint64 serverId = 3; //服务ID\n\tstring day = 4; // 日期格式YYYYMMDD\n\tstring timeAt = 5; // 时间格式HHII\n\tint64 bytes = 6; // 峰值带宽字节\n\tint64 totalBytes = 9; // 总流量\n\tint64 bits = 7; // 峰值带宽比特\n\tint64 nodeRegionId = 8; // 节点所在区域ID\n\tint64 cachedBytes = 10; // 总缓存流量\n\tint64 attackBytes = 11; // 总攻击流量\n\tint64 countRequests = 12; // 总请求数\n\tint64 countCachedRequests = 13; // 总缓存请求数\n\tint64 countAttackRequests = 14; // 总攻击请求数\n}",
"code": "message ServerBandwidthStat {\n\tint64 id = 1; // ID\n\tint64 userId = 2; // 用户ID\n\tint64 serverId = 3; //服务ID\n\tstring day = 4; // 日期格式YYYYMMDD\n\tstring timeAt = 5; // 时间格式HHII\n\tint64 bytes = 6; // 峰值带宽字节\n\tint64 totalBytes = 9; // 总流量\n\tint64 bits = 7; // 峰值带宽比特\n\tint64 nodeRegionId = 8; // 节点所在区域ID\n\tint64 cachedBytes = 10; // 总缓存流量\n\tint64 attackBytes = 11; // 总攻击流量\n\tint64 countRequests = 12; // 总请求数\n\tint64 countCachedRequests = 13; // 总缓存请求数\n\tint64 countAttackRequests = 14; // 总攻击请求数\n\tint64 userPlanId = 15; // 绑定的用户套餐ID\n}",
"doc": "带宽统计数据"
},
{
@@ -22399,7 +22450,7 @@
},
{
"name": "UpdatePlanRequest",
"code": "message UpdatePlanRequest {\n\tint64 planId = 1;\n\tstring name = 2;\n\tbool isOn = 3;\n\tint64 clusterId = 4;\n\tbytes trafficLimitJSON = 5;\n\tbytes featuresJSON = 6;\n\tstring priceType = 7;\n\tbytes trafficPriceJSON = 8;\n\tbytes bandwidthPriceJSON = 12;\n\tfloat monthlyPrice = 9;\n\tfloat seasonallyPrice = 10;\n\tfloat yearlyPrice = 11;\n}",
"code": "message UpdatePlanRequest {\n\tint64 planId = 1;\n\tstring name = 2;\n\tbool isOn = 3;\n\tint64 clusterId = 4;\n\tbytes trafficLimitJSON = 5;\n\tbytes featuresJSON = 6;\n\tstring priceType = 7;\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}",
"doc": "修改套餐"
},
{
@@ -22824,7 +22875,7 @@
},
{
"name": "UserPlan",
"code": "message UserPlan {\n\tint64 id = 1;\n\tint64 userId = 2;\n\tint64 planId = 3;\n\tbool isOn = 4;\n\tstring dayTo = 5;\n\tstring name = 6;\n\n\tUser user = 30;\n\tPlan plan = 31;\n\tServer server = 32;\n}",
"code": "message UserPlan {\n\tint64 id = 1; // 套餐ID\n\tint64 userId = 2; // 用户ID\n\tint64 planId = 3; // 套餐定义ID\n\tbool isOn = 4; // 是否启用\n\tstring dayTo = 5; // 到期日期Y-m-d\n\tstring name = 6; // 自定义备注名称\n\n\tUser user = 30; // 用户信息\n\tPlan plan = 31; // 套餐定义信息\n\trepeated Server servers = 33; // 绑定的网站列表\n\n\tServer server = 32 [deprecated = true]; // 绑定的网站,已过期,使用 servers 代替\n}",
"doc": ""
},
{

View File

@@ -37,6 +37,9 @@ type Plan struct {
MonthlyPrice float64 `protobuf:"fixed64,9,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
SeasonallyPrice float64 `protobuf:"fixed64,10,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"`
YearlyPrice float64 `protobuf:"fixed64,11,opt,name=yearlyPrice,proto3" json:"yearlyPrice,omitempty"`
TotalServers int32 `protobuf:"varint,13,opt,name=totalServers,proto3" json:"totalServers,omitempty"` // 可以添加的网站数
TotalServerNamesPerServer int32 `protobuf:"varint,14,opt,name=totalServerNamesPerServer,proto3" json:"totalServerNamesPerServer,omitempty"` // 每个网站可以添加的域名数
TotalServerNames int32 `protobuf:"varint,15,opt,name=totalServerNames,proto3" json:"totalServerNames,omitempty"` // 可以添加的域名总数
}
func (x *Plan) Reset() {
@@ -155,11 +158,32 @@ func (x *Plan) GetYearlyPrice() float64 {
return 0
}
func (x *Plan) GetTotalServers() int32 {
if x != nil {
return x.TotalServers
}
return 0
}
func (x *Plan) GetTotalServerNamesPerServer() int32 {
if x != nil {
return x.TotalServerNamesPerServer
}
return 0
}
func (x *Plan) GetTotalServerNames() int32 {
if x != nil {
return x.TotalServerNames
}
return 0
}
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, 0x96, 0x03,
0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xa4, 0x04,
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,
@@ -185,8 +209,17 @@ var file_models_model_plan_proto_rawDesc = []byte{
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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -40,6 +40,7 @@ type ServerBandwidthStat struct {
CountRequests int64 `protobuf:"varint,12,opt,name=countRequests,proto3" json:"countRequests,omitempty"` // 总请求数
CountCachedRequests int64 `protobuf:"varint,13,opt,name=countCachedRequests,proto3" json:"countCachedRequests,omitempty"` // 总缓存请求数
CountAttackRequests int64 `protobuf:"varint,14,opt,name=countAttackRequests,proto3" json:"countAttackRequests,omitempty"` // 总攻击请求数
UserPlanId int64 `protobuf:"varint,15,opt,name=userPlanId,proto3" json:"userPlanId,omitempty"` // 绑定的用户套餐ID
}
func (x *ServerBandwidthStat) Reset() {
@@ -172,12 +173,19 @@ func (x *ServerBandwidthStat) GetCountAttackRequests() int64 {
return 0
}
func (x *ServerBandwidthStat) GetUserPlanId() int64 {
if x != nil {
return x.UserPlanId
}
return 0
}
var File_models_model_server_bandwidth_stat_proto protoreflect.FileDescriptor
var file_models_model_server_bandwidth_stat_proto_rawDesc = []byte{
0x0a, 0x28, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f,
0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xbf,
0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xdf,
0x03, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
@@ -206,6 +214,8 @@ var file_models_model_server_bandwidth_stat_proto_rawDesc = []byte{
0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x0f,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x49, 0x64,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

View File

@@ -25,15 +25,17 @@ type UserPlan struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"`
PlanId int64 `protobuf:"varint,3,opt,name=planId,proto3" json:"planId,omitempty"`
IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"`
DayTo string `protobuf:"bytes,5,opt,name=dayTo,proto3" json:"dayTo,omitempty"`
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
User *User `protobuf:"bytes,30,opt,name=user,proto3" json:"user,omitempty"`
Plan *Plan `protobuf:"bytes,31,opt,name=plan,proto3" json:"plan,omitempty"`
Server *Server `protobuf:"bytes,32,opt,name=server,proto3" json:"server,omitempty"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 套餐ID
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
PlanId int64 `protobuf:"varint,3,opt,name=planId,proto3" json:"planId,omitempty"` // 套餐定义ID
IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
DayTo string `protobuf:"bytes,5,opt,name=dayTo,proto3" json:"dayTo,omitempty"` // 到期日期Y-m-d
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` // 自定义备注名称
User *User `protobuf:"bytes,30,opt,name=user,proto3" json:"user,omitempty"` // 用户信息
Plan *Plan `protobuf:"bytes,31,opt,name=plan,proto3" json:"plan,omitempty"` // 套餐定义信息
Servers []*Server `protobuf:"bytes,33,rep,name=servers,proto3" json:"servers,omitempty"` // 绑定的网站列表
// Deprecated: Marked as deprecated in models/model_user_plan.proto.
Server *Server `protobuf:"bytes,32,opt,name=server,proto3" json:"server,omitempty"` // 绑定的网站,已过期,使用 servers 代替
}
func (x *UserPlan) Reset() {
@@ -124,6 +126,14 @@ func (x *UserPlan) GetPlan() *Plan {
return nil
}
func (x *UserPlan) GetServers() []*Server {
if x != nil {
return x.Servers
}
return nil
}
// Deprecated: Marked as deprecated in models/model_user_plan.proto.
func (x *UserPlan) GetServer() *Server {
if x != nil {
return x.Server
@@ -141,7 +151,7 @@ var file_models_model_user_plan_proto_rawDesc = []byte{
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, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xe8, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02,
0x92, 0x02, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06,
0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73,
0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x03,
@@ -153,10 +163,13 @@ var file_models_model_user_plan_proto_rawDesc = []byte{
0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73,
0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e,
0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x6e,
0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x12, 0x24, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x73, 0x18, 0x21, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72,
0x76, 0x65, 0x72, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x06,
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70,
0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x73, 0x65,
0x72, 0x76, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -181,12 +194,13 @@ var file_models_model_user_plan_proto_goTypes = []interface{}{
var file_models_model_user_plan_proto_depIdxs = []int32{
1, // 0: pb.UserPlan.user:type_name -> pb.User
2, // 1: pb.UserPlan.plan:type_name -> pb.Plan
3, // 2: pb.UserPlan.server:type_name -> pb.Server
3, // [3:3] is the sub-list for method output_type
3, // [3:3] 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
3, // 2: pb.UserPlan.servers:type_name -> pb.Server
3, // 3: pb.UserPlan.server:type_name -> pb.Server
4, // [4:4] is the sub-list for method output_type
4, // [4:4] 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_models_model_user_plan_proto_init() }

View File

@@ -36,6 +36,9 @@ type CreatePlanRequest struct {
MonthlyPrice float32 `protobuf:"fixed32,7,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
SeasonallyPrice float32 `protobuf:"fixed32,8,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"`
YearlyPrice float32 `protobuf:"fixed32,9,opt,name=yearlyPrice,proto3" json:"yearlyPrice,omitempty"`
TotalServers int32 `protobuf:"varint,11,opt,name=totalServers,proto3" json:"totalServers,omitempty"` // 可以添加的网站数
TotalServerNamesPerServer int32 `protobuf:"varint,12,opt,name=totalServerNamesPerServer,proto3" json:"totalServerNamesPerServer,omitempty"` // 每个网站可以添加的域名数
TotalServerNames int32 `protobuf:"varint,13,opt,name=totalServerNames,proto3" json:"totalServerNames,omitempty"` // 可以添加的域名总数
}
func (x *CreatePlanRequest) Reset() {
@@ -140,6 +143,27 @@ func (x *CreatePlanRequest) GetYearlyPrice() float32 {
return 0
}
func (x *CreatePlanRequest) GetTotalServers() int32 {
if x != nil {
return x.TotalServers
}
return 0
}
func (x *CreatePlanRequest) GetTotalServerNamesPerServer() int32 {
if x != nil {
return x.TotalServerNamesPerServer
}
return 0
}
func (x *CreatePlanRequest) GetTotalServerNames() int32 {
if x != nil {
return x.TotalServerNames
}
return 0
}
type CreatePlanResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -205,6 +229,9 @@ type UpdatePlanRequest struct {
MonthlyPrice float32 `protobuf:"fixed32,9,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
SeasonallyPrice float32 `protobuf:"fixed32,10,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"`
YearlyPrice float32 `protobuf:"fixed32,11,opt,name=yearlyPrice,proto3" json:"yearlyPrice,omitempty"`
TotalServers int32 `protobuf:"varint,13,opt,name=totalServers,proto3" json:"totalServers,omitempty"` // 可以添加的网站数
TotalServerNamesPerServer int32 `protobuf:"varint,14,opt,name=totalServerNamesPerServer,proto3" json:"totalServerNamesPerServer,omitempty"` // 每个网站可以添加的域名数
TotalServerNames int32 `protobuf:"varint,15,opt,name=totalServerNames,proto3" json:"totalServerNames,omitempty"` // 可以添加的域名总数
}
func (x *UpdatePlanRequest) Reset() {
@@ -323,6 +350,27 @@ func (x *UpdatePlanRequest) GetYearlyPrice() float32 {
return 0
}
func (x *UpdatePlanRequest) GetTotalServers() int32 {
if x != nil {
return x.TotalServers
}
return 0
}
func (x *UpdatePlanRequest) GetTotalServerNamesPerServer() int32 {
if x != nil {
return x.TotalServerNamesPerServer
}
return 0
}
func (x *UpdatePlanRequest) GetTotalServerNames() int32 {
if x != nil {
return x.TotalServerNames
}
return 0
}
// 删除套餐
type DeletePlanRequest struct {
state protoimpl.MessageState
@@ -663,7 +711,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, 0xff, 0x02, 0x0a,
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x04, 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, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65,
@@ -687,90 +735,108 @@ var file_service_plan_proto_rawDesc = []byte{
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, 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, 0xab, 0x03, 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, 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, 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, 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,
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, 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, 0xb9, 0x04, 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, 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, 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, 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, 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, 0xd1,
0x03, 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, 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, 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, 0xd1, 0x03, 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, 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,
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,
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 (

File diff suppressed because it is too large Load Diff

View File

@@ -57,7 +57,10 @@ const (
ServerService_FindEnabledServerDNS_FullMethodName = "/pb.ServerService/findEnabledServerDNS"
ServerService_CheckUserServer_FullMethodName = "/pb.ServerService/checkUserServer"
ServerService_FindAllEnabledServerNamesWithUserId_FullMethodName = "/pb.ServerService/findAllEnabledServerNamesWithUserId"
ServerService_CountAllServerNamesWithUserId_FullMethodName = "/pb.ServerService/countAllServerNamesWithUserId"
ServerService_CountServerNames_FullMethodName = "/pb.ServerService/countServerNames"
ServerService_FindAllUserServers_FullMethodName = "/pb.ServerService/findAllUserServers"
ServerService_CountAllUserServers_FullMethodName = "/pb.ServerService/countAllUserServers"
ServerService_ComposeAllUserServersConfig_FullMethodName = "/pb.ServerService/composeAllUserServersConfig"
ServerService_FindEnabledUserServerBasic_FullMethodName = "/pb.ServerService/findEnabledUserServerBasic"
ServerService_UpdateEnabledUserServerBasic_FullMethodName = "/pb.ServerService/updateEnabledUserServerBasic"
@@ -158,8 +161,14 @@ type ServerServiceClient interface {
CheckUserServer(ctx context.Context, in *CheckUserServerRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查找一个用户下的所有域名列表
FindAllEnabledServerNamesWithUserId(ctx context.Context, in *FindAllEnabledServerNamesWithUserIdRequest, opts ...grpc.CallOption) (*FindAllEnabledServerNamesWithUserIdResponse, error)
// 计算一个用户下的所有域名数量
CountAllServerNamesWithUserId(ctx context.Context, in *CountAllServerNamesWithUserIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 计算某个网站下的域名数量
CountServerNames(ctx context.Context, in *CountServerNamesRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 查找一个用户下的所有网站
FindAllUserServers(ctx context.Context, in *FindAllUserServersRequest, opts ...grpc.CallOption) (*FindAllUserServersResponse, error)
// 计算一个用户下的所有网站数量
CountAllUserServers(ctx context.Context, in *CountAllUserServersRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 查找某个用户下的网站配置
ComposeAllUserServersConfig(ctx context.Context, in *ComposeAllUserServersConfigRequest, opts ...grpc.CallOption) (*ComposeAllUserServersConfigResponse, error)
// 查找用户网站基本信息
@@ -548,6 +557,24 @@ func (c *serverServiceClient) FindAllEnabledServerNamesWithUserId(ctx context.Co
return out, nil
}
func (c *serverServiceClient) CountAllServerNamesWithUserId(ctx context.Context, in *CountAllServerNamesWithUserIdRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, ServerService_CountAllServerNamesWithUserId_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serverServiceClient) CountServerNames(ctx context.Context, in *CountServerNamesRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, ServerService_CountServerNames_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serverServiceClient) FindAllUserServers(ctx context.Context, in *FindAllUserServersRequest, opts ...grpc.CallOption) (*FindAllUserServersResponse, error) {
out := new(FindAllUserServersResponse)
err := c.cc.Invoke(ctx, ServerService_FindAllUserServers_FullMethodName, in, out, opts...)
@@ -557,6 +584,15 @@ func (c *serverServiceClient) FindAllUserServers(ctx context.Context, in *FindAl
return out, nil
}
func (c *serverServiceClient) CountAllUserServers(ctx context.Context, in *CountAllUserServersRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, ServerService_CountAllUserServers_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serverServiceClient) ComposeAllUserServersConfig(ctx context.Context, in *ComposeAllUserServersConfigRequest, opts ...grpc.CallOption) (*ComposeAllUserServersConfigResponse, error) {
out := new(ComposeAllUserServersConfigResponse)
err := c.cc.Invoke(ctx, ServerService_ComposeAllUserServersConfig_FullMethodName, in, out, opts...)
@@ -799,8 +835,14 @@ type ServerServiceServer interface {
CheckUserServer(context.Context, *CheckUserServerRequest) (*RPCSuccess, error)
// 查找一个用户下的所有域名列表
FindAllEnabledServerNamesWithUserId(context.Context, *FindAllEnabledServerNamesWithUserIdRequest) (*FindAllEnabledServerNamesWithUserIdResponse, error)
// 计算一个用户下的所有域名数量
CountAllServerNamesWithUserId(context.Context, *CountAllServerNamesWithUserIdRequest) (*RPCCountResponse, error)
// 计算某个网站下的域名数量
CountServerNames(context.Context, *CountServerNamesRequest) (*RPCCountResponse, error)
// 查找一个用户下的所有网站
FindAllUserServers(context.Context, *FindAllUserServersRequest) (*FindAllUserServersResponse, error)
// 计算一个用户下的所有网站数量
CountAllUserServers(context.Context, *CountAllUserServersRequest) (*RPCCountResponse, error)
// 查找某个用户下的网站配置
ComposeAllUserServersConfig(context.Context, *ComposeAllUserServersConfigRequest) (*ComposeAllUserServersConfigResponse, error)
// 查找用户网站基本信息
@@ -957,9 +999,18 @@ func (UnimplementedServerServiceServer) CheckUserServer(context.Context, *CheckU
func (UnimplementedServerServiceServer) FindAllEnabledServerNamesWithUserId(context.Context, *FindAllEnabledServerNamesWithUserIdRequest) (*FindAllEnabledServerNamesWithUserIdResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllEnabledServerNamesWithUserId not implemented")
}
func (UnimplementedServerServiceServer) CountAllServerNamesWithUserId(context.Context, *CountAllServerNamesWithUserIdRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountAllServerNamesWithUserId not implemented")
}
func (UnimplementedServerServiceServer) CountServerNames(context.Context, *CountServerNamesRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountServerNames not implemented")
}
func (UnimplementedServerServiceServer) FindAllUserServers(context.Context, *FindAllUserServersRequest) (*FindAllUserServersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllUserServers not implemented")
}
func (UnimplementedServerServiceServer) CountAllUserServers(context.Context, *CountAllUserServersRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountAllUserServers not implemented")
}
func (UnimplementedServerServiceServer) ComposeAllUserServersConfig(context.Context, *ComposeAllUserServersConfigRequest) (*ComposeAllUserServersConfigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ComposeAllUserServersConfig not implemented")
}
@@ -1710,6 +1761,42 @@ func _ServerService_FindAllEnabledServerNamesWithUserId_Handler(srv interface{},
return interceptor(ctx, in, info, handler)
}
func _ServerService_CountAllServerNamesWithUserId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountAllServerNamesWithUserIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServerServiceServer).CountAllServerNamesWithUserId(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ServerService_CountAllServerNamesWithUserId_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServerServiceServer).CountAllServerNamesWithUserId(ctx, req.(*CountAllServerNamesWithUserIdRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ServerService_CountServerNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountServerNamesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServerServiceServer).CountServerNames(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ServerService_CountServerNames_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServerServiceServer).CountServerNames(ctx, req.(*CountServerNamesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ServerService_FindAllUserServers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllUserServersRequest)
if err := dec(in); err != nil {
@@ -1728,6 +1815,24 @@ func _ServerService_FindAllUserServers_Handler(srv interface{}, ctx context.Cont
return interceptor(ctx, in, info, handler)
}
func _ServerService_CountAllUserServers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountAllUserServersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServerServiceServer).CountAllUserServers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ServerService_CountAllUserServers_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServerServiceServer).CountAllUserServers(ctx, req.(*CountAllUserServersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ServerService_ComposeAllUserServersConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ComposeAllUserServersConfigRequest)
if err := dec(in); err != nil {
@@ -2211,10 +2316,22 @@ var ServerService_ServiceDesc = grpc.ServiceDesc{
MethodName: "findAllEnabledServerNamesWithUserId",
Handler: _ServerService_FindAllEnabledServerNamesWithUserId_Handler,
},
{
MethodName: "countAllServerNamesWithUserId",
Handler: _ServerService_CountAllServerNamesWithUserId_Handler,
},
{
MethodName: "countServerNames",
Handler: _ServerService_CountServerNames_Handler,
},
{
MethodName: "findAllUserServers",
Handler: _ServerService_FindAllUserServers_Handler,
},
{
MethodName: "countAllUserServers",
Handler: _ServerService_CountAllUserServers_Handler,
},
{
MethodName: "composeAllUserServersConfig",
Handler: _ServerService_ComposeAllUserServersConfig_Handler,

View File

@@ -16,4 +16,7 @@ message Plan {
double monthlyPrice = 9;
double seasonallyPrice = 10;
double yearlyPrice = 11;
int32 totalServers = 13; // 可以添加的网站数
int32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数
int32 totalServerNames = 15; // 可以添加的域名总数
}

View File

@@ -19,4 +19,5 @@ message ServerBandwidthStat {
int64 countRequests = 12; // 总请求数
int64 countCachedRequests = 13; // 总缓存请求数
int64 countAttackRequests = 14; // 总攻击请求数
int64 userPlanId = 15; // 绑定的用户套餐ID
}

View File

@@ -8,15 +8,17 @@ import "models/model_plan.proto";
import "models/model_server.proto";
message UserPlan {
int64 id = 1;
int64 userId = 2;
int64 planId = 3;
bool isOn = 4;
string dayTo = 5;
string name = 6;
int64 id = 1; // 套餐ID
int64 userId = 2; // 用户ID
int64 planId = 3; // 套餐定义ID
bool isOn = 4; // 是否启用
string dayTo = 5; // 到期日期Y-m-d
string name = 6; // 自定义备注名称
User user = 30;
Plan plan = 31;
Server server = 32;
User user = 30; // 用户信息
Plan plan = 31; // 套餐定义信息
repeated Server servers = 33; // 绑定的网站列表
Server server = 32 [deprecated = true]; // 绑定的网站,已过期,使用 servers 代替
}

View File

@@ -42,6 +42,9 @@ message CreatePlanRequest {
float monthlyPrice = 7;
float seasonallyPrice = 8;
float yearlyPrice = 9;
int32 totalServers = 11; // 可以添加的网站数
int32 totalServerNamesPerServer = 12; // 每个网站可以添加的域名数
int32 totalServerNames = 13; // 可以添加的域名总数
}
message CreatePlanResponse {
@@ -62,6 +65,9 @@ message UpdatePlanRequest {
float monthlyPrice = 9;
float seasonallyPrice = 10;
float yearlyPrice = 11;
int32 totalServers = 13; // 可以添加的网站数
int32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数
int32 totalServerNames = 15; // 可以添加的域名总数
}
// 删除套餐

View File

@@ -125,9 +125,18 @@ service ServerService {
// 查找一个用户下的所有域名列表
rpc findAllEnabledServerNamesWithUserId (FindAllEnabledServerNamesWithUserIdRequest) returns (FindAllEnabledServerNamesWithUserIdResponse);
// 计算一个用户下的所有域名数量
rpc countAllServerNamesWithUserId (CountAllServerNamesWithUserIdRequest) returns (RPCCountResponse);
// 计算某个网站下的域名数量
rpc countServerNames(CountServerNamesRequest) returns (RPCCountResponse);
// 查找一个用户下的所有网站
rpc findAllUserServers(FindAllUserServersRequest) returns (FindAllUserServersResponse);
// 计算一个用户下的所有网站数量
rpc countAllUserServers(CountAllUserServersRequest) returns (RPCCountResponse);
// 查找某个用户下的网站配置
rpc composeAllUserServersConfig(ComposeAllUserServersConfigRequest) returns (ComposeAllUserServersConfigResponse);
@@ -368,6 +377,7 @@ message CountAllEnabledServersMatchRequest {
int64 nodeClusterId = 4;
int32 auditingFlag = 5;
string protocolFamily = 6;
int64 userPlanId = 7; // 用户套餐ID
}
// 列出单页网站
@@ -519,6 +529,17 @@ message FindAllEnabledServerNamesWithUserIdResponse {
repeated string serverNames = 1;
}
// 计算一个用户下的所有域名数量
message CountAllServerNamesWithUserIdRequest {
int64 userId = 1; // 用户ID
int64 userPlanId = 2; // 用户套餐ID
}
// 计算某个网站下的域名数量
message CountServerNamesRequest {
int64 serverId = 1; // 网站ID
}
// 查找一个用户下的所有网站
message FindAllUserServersRequest {
int64 userId = 1;
@@ -528,6 +549,12 @@ message FindAllUserServersResponse {
repeated Server servers = 1; // 只返回一些简要信息
}
// 计算一个用户下的所有网站数量
message CountAllUserServersRequest {
int64 userId = 1; // 用户ID
int64 userPlanId = 2; // 用户套餐ID
}
// 查找某个用户下的网站配置
message ComposeAllUserServersConfigRequest {
int64 userId = 1;

View File

@@ -8,7 +8,7 @@ import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/shared"
const DefaultTrafficLimitNoticePageBody = `<!DOCTYPE html>
<html>
<head>
<title>Traffic Limit Exceeded Warning/title>
<title>Traffic Limit Exceeded Warning</title>
<body>
<h1>Traffic Limit Exceeded Warning</h1>
@@ -58,3 +58,46 @@ func (this *TrafficLimitConfig) TotalBytes() int64 {
func (this *TrafficLimitConfig) IsEmpty() bool {
return !this.IsOn || (this.DailyBytes() <= 0 && this.MonthlyBytes() <= 0 && this.TotalBytes() <= 0)
}
func (this *TrafficLimitConfig) Equals(another *TrafficLimitConfig) bool {
if another == nil {
return false
}
if this.IsOn != another.IsOn {
return false
}
if !this.equalCapacity(this.DailySize, another.DailySize) {
return false
}
if !this.equalCapacity(this.MonthlySize, another.MonthlySize) {
return false
}
if !this.equalCapacity(this.TotalSize, another.TotalSize) {
return false
}
if this.NoticePageBody != another.NoticePageBody {
return false
}
return true
}
func (this *TrafficLimitConfig) equalCapacity(size1 *shared.SizeCapacity, size2 *shared.SizeCapacity) bool {
if size1 == size2 { // all are nil
return true
}
if size1 != nil {
if size2 == nil {
return false
}
return size1.Bytes() == size2.Bytes()
}
return false
}

View File

@@ -7,6 +7,8 @@ import timeutil "github.com/iwind/TeaGo/utils/time"
// TrafficLimitStatus 流量限制状态
type TrafficLimitStatus struct {
UntilDay string `yaml:"untilDay" json:"untilDay"` // 有效日期格式YYYYMMDD
PlanId int64 `yaml:"planId" json:"planId"` // 套餐ID
DateType string `yaml:"dateType" json:"dateType"` // 日期类型 day|month
}
func (this *TrafficLimitStatus) IsValid() bool {

View File

@@ -20,6 +20,7 @@ const DefaultPlanExpireNoticePageBody = `<!DOCTYPE html>
// UserPlanConfig 用户套餐配置
type UserPlanConfig struct {
Id int64 `yaml:"id" json:"id"` // 用户套餐ID
DayTo string `yaml:"dayTo" json:"dayTo"` // 有效期
Plan *PlanConfig `yaml:"plan" json:"plan"`

View File

@@ -38,6 +38,12 @@ type DatabaseConfig struct {
} `json:"clean"`
} `json:"userBandwidthStat"`
UserPlanBandwidthStat struct {
Clean struct {
Days int `json:"days"`
} `json:"clean"`
} `json:"userPlanBandwidthStat"`
NodeClusterTrafficDailyStat struct {
Clean struct {
Days int `json:"days"`
@@ -77,6 +83,7 @@ func NewDatabaseConfig() *DatabaseConfig {
config.ServerBandwidthStat.Clean.Days = 100
config.ServerDailyStat.Clean.Days = 60
config.UserBandwidthStat.Clean.Days = 100
config.UserPlanBandwidthStat.Clean.Days = 100
config.NodeClusterTrafficDailyStat.Clean.Days = 30
config.NodeTrafficHourlyStat.Clean.Days = 15
config.ServerDomainHourlyStat.Clean.Days = 7