mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 12:20:27 +08:00
套餐增加Websocket连接数限制
This commit is contained in:
@@ -10800,7 +10800,10 @@
|
||||
"responseMessageName": "CheckServerNameInServerResponse",
|
||||
"code": "rpc checkServerNameInServer(CheckServerNameInServerRequest) returns (CheckServerNameInServerResponse);",
|
||||
"doc": "检查域名是否在网站中已经绑定",
|
||||
"roles": [],
|
||||
"roles": [
|
||||
"admin",
|
||||
"user"
|
||||
],
|
||||
"isDeprecated": false
|
||||
},
|
||||
{
|
||||
@@ -15507,7 +15510,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\tint32 totalServers = 11; // 可以添加的网站数\n\tint32 totalServerNamesPerServer = 12; // 每个网站可以添加的域名数\n\tint32 totalServerNames = 13; // 可以添加的域名总数\n\tint64 dailyRequests = 14; // 每日访问量额度\n\tint64 monthlyRequests = 15; // 每月访问量额度\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\tint64 dailyRequests = 14; // 每日访问量额度\n\tint64 monthlyRequests = 15; // 每月访问量额度\n\tint64 dailyWebsocketConnections = 16; // 每日Websocket连接数额度\n\tint64 monthlyWebsocketConnections = 17; // 每月Websocket连接数额度\n}",
|
||||
"doc": "创建套餐"
|
||||
},
|
||||
{
|
||||
@@ -21167,7 +21170,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\tint32 totalServers = 13; // 可以添加的网站数\n\tint32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数\n\tint32 totalServerNames = 15; // 可以添加的域名总数\n\tint64 dailyRequests = 16; // 每日访问量额度\n\tint64 monthlyRequests = 17; // 每月访问量额度\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\tint64 dailyRequests = 16; // 每日访问量额度\n\tint64 monthlyRequests = 17; // 每月访问量额度\n\tint64 dailyWebsocketConnections = 18; // 每日Websocket连接数额度\n\tint64 monthlyWebsocketConnections = 19; // 每月Websocket连接数额度\n}",
|
||||
"doc": ""
|
||||
},
|
||||
{
|
||||
@@ -21432,7 +21435,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\tint64 userPlanId = 15; // 绑定的用户套餐ID\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\tint64 countWebsocketConnections = 16; // Websocket连接数\n}",
|
||||
"doc": "带宽统计数据"
|
||||
},
|
||||
{
|
||||
@@ -22562,7 +22565,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\tint32 totalServers = 13; // 可以添加的网站数\n\tint32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数\n\tint32 totalServerNames = 15; // 可以添加的域名总数\n\tint64 dailyRequests = 16; // 每日访问量额度\n\tint64 monthlyRequests = 17; // 每月访问量额度\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\tint64 dailyRequests = 16; // 每日访问量额度\n\tint64 monthlyRequests = 17; // 每月访问量额度\n\tint64 dailyWebsocketConnections = 18; // 每日Websocket连接数额度\n\tint64 monthlyWebsocketConnections = 19; // 每月Websocket连接数额度\n}",
|
||||
"doc": "修改套餐"
|
||||
},
|
||||
{
|
||||
@@ -23102,7 +23105,7 @@
|
||||
},
|
||||
{
|
||||
"name": "json:http_cache_config",
|
||||
"content": "# HTTP缓存配置\n## 定义\n~~~json\n{\n \"isPrior\": \"是否覆盖上级配置\",\n \"isOn\": \"是否启用配置\",\n \"addStatusHeader\": \"是否增加命中状态Header(X-Cache)\",\n \"addAgeHeader\": \"是否增加Age Header\",\n \"enableCacheControlMaxAge\": \"是否支持Cache-Control: max-age=...\",\n \"disablePolicyRefs\": \"是否停用策略中定义的条件\",\n \"purgeIsOn\": \"是否允许使用Purge方法清理\",\n \"purgeKey\": \"Purge时使用的X-Edge-Purge-Key\",\n \"stale\": \"陈旧缓存使用策略\",\n \"cacheRefs\": [\"缓存条件1\", \"缓存条件2\", ...]\n}\n~~~\n其中:\n* `缓存条件` - 参考 {json:http_cache_ref}\n\n## 示例\n### 无缓存条件\n~~~json\n{\n \"isPrior\": true,\n \"isOn\": true,\n \"addStatusHeader\": true,\n \"addAgeHeader\": true,\n \"enableCacheControlMaxAge\": true,\n \"disablePolicyRefs\": false,\n \"purgeIsOn\": false,\n \"purgeKey\": \"\",\n \"stale\": null,\n \"cacheRefs\": []\n}\n~~~\n\n### 加入缓存条件\n~~~json\n{\n \"isPrior\": true,\n \"isOn\": true,\n \"addStatusHeader\": true,\n \"addAgeHeader\": true,\n \"enableCacheControlMaxAge\": true,\n \"disablePolicyRefs\": false,\n \"purgeIsOn\": false,\n \"purgeKey\": \"\",\n \"stale\": null,\n \"cacheRefs\": [\n {\n\t \"id\": 0,\n\t \"isOn\": true,\n\t \"key\": \"${scheme}://${host}${requestPath}${isArgs}${args}\",\n\t \"life\": {\"count\": 2, \"unit\": \"hour\"},\n\t \"status\": [200],\n \"maxSize\": {\"count\": 32, \"unit\": \"mb\"},\n \"minSize\": {\"count\": 0, \"unit\": \"kb\"},\n \"skipCacheControlValues\": [\"private\", \"no-cache\", \"no-store\"],\n \"skipSetCookie\": true,\n \"enableRequestCachePragma\": false,\n \"conds\": {\n \"isOn\": true,\n \"connector\": \"or\",\n \"groups\": [\n {\n \"isOn\": true,\n \"connector\": \"and\",\n \"conds\": [\n {\n \"type\": \"url-extension\",\n \"isRequest\": true,\n \"param\": \"${requestPathLowerExtension}\",\n \"operator\": \"in\",\n \"value\": \"[\\\".css\\\",\\\".png\\\",\\\".js\\\",\\\".woff2\\\"]\",\n \"isReverse\": false,\n \"isCaseInsensitive\": false,\n \"typeName\": \"URL扩展名\"\n }\n ],\n \"isReverse\": false,\n \"description\": \"\"\n }\n ]\n },\n \"allowChunkedEncoding\": true,\n \"allowPartialContent\": false,\n \"isReverse\": false,\n \"methods\": []\n\t}\n ]\n}\n~~~\n"
|
||||
"content": "# HTTP缓存配置\n## 定义\n~~~json\n{\n \"isPrior\": \"是否覆盖上级配置\",\n \"isOn\": \"是否启用配置\",\n \"addStatusHeader\": \"是否增加命中状态Header(X-Cache)\",\n \"addAgeHeader\": \"是否增加Age Header\",\n \"enableCacheControlMaxAge\": \"是否支持Cache-Control: max-age=...\",\n \"disablePolicyRefs\": \"是否停用策略中定义的条件\",\n \"purgeIsOn\": \"是否允许使用Purge方法清理\",\n \"purgeKey\": \"Purge时使用的X-Edge-Purge-Key\",\n \"stale\": \"陈旧缓存使用策略\",\n \"key\": \"主域名配置\",\n \"cacheRefs\": [\"缓存条件1\", \"缓存条件2\", ...]\n}\n~~~\n其中:\n* `缓存条件` - 参考 {json:http_cache_ref}\n* `主域名配置` 参考本文“主域名”配置部分\n\n## 示例\n### 无缓存条件\n~~~json\n{\n \"isPrior\": true,\n \"isOn\": true,\n \"addStatusHeader\": true,\n \"addAgeHeader\": true,\n \"enableCacheControlMaxAge\": true,\n \"disablePolicyRefs\": false,\n \"purgeIsOn\": false,\n \"purgeKey\": \"\",\n \"stale\": null,\n \"cacheRefs\": []\n}\n~~~\n\n### 加入缓存条件\n~~~json\n{\n \"isPrior\": true,\n \"isOn\": true,\n \"addStatusHeader\": true,\n \"addAgeHeader\": true,\n \"enableCacheControlMaxAge\": true,\n \"disablePolicyRefs\": false,\n \"purgeIsOn\": false,\n \"purgeKey\": \"\",\n \"stale\": null,\n \"cacheRefs\": [\n {\n\t \"id\": 0,\n\t \"isOn\": true,\n\t \"key\": \"${scheme}://${host}${requestPath}${isArgs}${args}\",\n\t \"life\": {\"count\": 2, \"unit\": \"hour\"},\n\t \"status\": [200],\n \"maxSize\": {\"count\": 32, \"unit\": \"mb\"},\n \"minSize\": {\"count\": 0, \"unit\": \"kb\"},\n \"skipCacheControlValues\": [\"private\", \"no-cache\", \"no-store\"],\n \"skipSetCookie\": true,\n \"enableRequestCachePragma\": false,\n \"conds\": {\n \"isOn\": true,\n \"connector\": \"or\",\n \"groups\": [\n {\n \"isOn\": true,\n \"connector\": \"and\",\n \"conds\": [\n {\n \"type\": \"url-extension\",\n \"isRequest\": true,\n \"param\": \"${requestPathLowerExtension}\",\n \"operator\": \"in\",\n \"value\": \"[\\\".css\\\",\\\".png\\\",\\\".js\\\",\\\".woff2\\\"]\",\n \"isReverse\": false,\n \"isCaseInsensitive\": false,\n \"typeName\": \"URL扩展名\"\n }\n ],\n \"isReverse\": false,\n \"description\": \"\"\n }\n ]\n },\n \"allowChunkedEncoding\": true,\n \"allowPartialContent\": false,\n \"isReverse\": false,\n \"methods\": []\n\t}\n ]\n}\n~~~\n\n\n## 主域名配置\n~~~json\n{\n \"isOn\": \"true|false\",\n \"scheme\": \"https|http\",\n \"host\": \"域名,必须是当前网站已绑定的域名\"\n}\n~~~\n\n### 示例\n#### 不使用主域名\n~~~json\n{\n \"isOn\": false\n}\n~~~\n\n#### 使用主域名\n~~~json\n{\n \"isOn\": true,\n \"scheme\": \"https\",\n \"host\": \"example.com\"\n}\n~~~\n\n如果启用主域名,则缓存键值中的域名会被自动换成主域名,清理缓存的时候也需要使用此主域名。"
|
||||
},
|
||||
{
|
||||
"name": "json:http_cache_ref",
|
||||
|
||||
@@ -25,23 +25,25 @@ type Plan struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
||||
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
||||
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
||||
BandwidthPriceJSON []byte `protobuf:"bytes,12,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
|
||||
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"` // 可以添加的域名总数
|
||||
DailyRequests int64 `protobuf:"varint,16,opt,name=dailyRequests,proto3" json:"dailyRequests,omitempty"` // 每日访问量额度
|
||||
MonthlyRequests int64 `protobuf:"varint,17,opt,name=monthlyRequests,proto3" json:"monthlyRequests,omitempty"` // 每月访问量额度
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
||||
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
||||
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
||||
BandwidthPriceJSON []byte `protobuf:"bytes,12,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
|
||||
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"` // 可以添加的域名总数
|
||||
DailyRequests int64 `protobuf:"varint,16,opt,name=dailyRequests,proto3" json:"dailyRequests,omitempty"` // 每日访问量额度
|
||||
MonthlyRequests int64 `protobuf:"varint,17,opt,name=monthlyRequests,proto3" json:"monthlyRequests,omitempty"` // 每月访问量额度
|
||||
DailyWebsocketConnections int64 `protobuf:"varint,18,opt,name=dailyWebsocketConnections,proto3" json:"dailyWebsocketConnections,omitempty"` // 每日Websocket连接数额度
|
||||
MonthlyWebsocketConnections int64 `protobuf:"varint,19,opt,name=monthlyWebsocketConnections,proto3" json:"monthlyWebsocketConnections,omitempty"` // 每月Websocket连接数额度
|
||||
}
|
||||
|
||||
func (x *Plan) Reset() {
|
||||
@@ -195,11 +197,25 @@ func (x *Plan) GetMonthlyRequests() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Plan) GetDailyWebsocketConnections() int64 {
|
||||
if x != nil {
|
||||
return x.DailyWebsocketConnections
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Plan) GetMonthlyWebsocketConnections() int64 {
|
||||
if x != nil {
|
||||
return x.MonthlyWebsocketConnections
|
||||
}
|
||||
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, 0xf4, 0x04,
|
||||
0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xf4, 0x05,
|
||||
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,
|
||||
@@ -239,7 +255,15 @@ var file_models_model_plan_proto_rawDesc = []byte{
|
||||
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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
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,
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,22 @@ type ServerBandwidthStat struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
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
|
||||
ServerId int64 `protobuf:"varint,3,opt,name=serverId,proto3" json:"serverId,omitempty"` //服务ID
|
||||
Day string `protobuf:"bytes,4,opt,name=day,proto3" json:"day,omitempty"` // 日期,格式YYYYMMDD
|
||||
TimeAt string `protobuf:"bytes,5,opt,name=timeAt,proto3" json:"timeAt,omitempty"` // 时间,格式HHII
|
||||
Bytes int64 `protobuf:"varint,6,opt,name=bytes,proto3" json:"bytes,omitempty"` // 峰值带宽字节
|
||||
TotalBytes int64 `protobuf:"varint,9,opt,name=totalBytes,proto3" json:"totalBytes,omitempty"` // 总流量
|
||||
Bits int64 `protobuf:"varint,7,opt,name=bits,proto3" json:"bits,omitempty"` // 峰值带宽比特
|
||||
NodeRegionId int64 `protobuf:"varint,8,opt,name=nodeRegionId,proto3" json:"nodeRegionId,omitempty"` // 节点所在区域ID
|
||||
CachedBytes int64 `protobuf:"varint,10,opt,name=cachedBytes,proto3" json:"cachedBytes,omitempty"` // 总缓存流量
|
||||
AttackBytes int64 `protobuf:"varint,11,opt,name=attackBytes,proto3" json:"attackBytes,omitempty"` // 总攻击流量
|
||||
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
|
||||
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
|
||||
ServerId int64 `protobuf:"varint,3,opt,name=serverId,proto3" json:"serverId,omitempty"` //服务ID
|
||||
Day string `protobuf:"bytes,4,opt,name=day,proto3" json:"day,omitempty"` // 日期,格式YYYYMMDD
|
||||
TimeAt string `protobuf:"bytes,5,opt,name=timeAt,proto3" json:"timeAt,omitempty"` // 时间,格式HHII
|
||||
Bytes int64 `protobuf:"varint,6,opt,name=bytes,proto3" json:"bytes,omitempty"` // 峰值带宽字节
|
||||
TotalBytes int64 `protobuf:"varint,9,opt,name=totalBytes,proto3" json:"totalBytes,omitempty"` // 总流量
|
||||
Bits int64 `protobuf:"varint,7,opt,name=bits,proto3" json:"bits,omitempty"` // 峰值带宽比特
|
||||
NodeRegionId int64 `protobuf:"varint,8,opt,name=nodeRegionId,proto3" json:"nodeRegionId,omitempty"` // 节点所在区域ID
|
||||
CachedBytes int64 `protobuf:"varint,10,opt,name=cachedBytes,proto3" json:"cachedBytes,omitempty"` // 总缓存流量
|
||||
AttackBytes int64 `protobuf:"varint,11,opt,name=attackBytes,proto3" json:"attackBytes,omitempty"` // 总攻击流量
|
||||
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
|
||||
CountWebsocketConnections int64 `protobuf:"varint,16,opt,name=countWebsocketConnections,proto3" json:"countWebsocketConnections,omitempty"` // Websocket连接数
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) Reset() {
|
||||
@@ -180,13 +181,20 @@ func (x *ServerBandwidthStat) GetUserPlanId() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ServerBandwidthStat) GetCountWebsocketConnections() int64 {
|
||||
if x != nil {
|
||||
return x.CountWebsocketConnections
|
||||
}
|
||||
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, 0xdf,
|
||||
0x03, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
|
||||
0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x9d,
|
||||
0x04, 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,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a,
|
||||
@@ -216,7 +224,11 @@ var file_models_model_server_bandwidth_stat_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x12, 0x3c, 0x0a, 0x19, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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 (
|
||||
|
||||
@@ -26,21 +26,23 @@ type CreatePlanRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
ClusterId int64 `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||
TrafficLimitJSON []byte `protobuf:"bytes,3,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
||||
FeaturesJSON []byte `protobuf:"bytes,4,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
||||
PriceType string `protobuf:"bytes,5,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||
TrafficPriceJSON []byte `protobuf:"bytes,6,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
||||
BandwidthPriceJSON []byte `protobuf:"bytes,10,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
|
||||
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"` // 可以添加的域名总数
|
||||
DailyRequests int64 `protobuf:"varint,14,opt,name=dailyRequests,proto3" json:"dailyRequests,omitempty"` // 每日访问量额度
|
||||
MonthlyRequests int64 `protobuf:"varint,15,opt,name=monthlyRequests,proto3" json:"monthlyRequests,omitempty"` // 每月访问量额度
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
ClusterId int64 `protobuf:"varint,2,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||
TrafficLimitJSON []byte `protobuf:"bytes,3,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
||||
FeaturesJSON []byte `protobuf:"bytes,4,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
||||
PriceType string `protobuf:"bytes,5,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||
TrafficPriceJSON []byte `protobuf:"bytes,6,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
||||
BandwidthPriceJSON []byte `protobuf:"bytes,10,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
|
||||
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"` // 可以添加的域名总数
|
||||
DailyRequests int64 `protobuf:"varint,14,opt,name=dailyRequests,proto3" json:"dailyRequests,omitempty"` // 每日访问量额度
|
||||
MonthlyRequests int64 `protobuf:"varint,15,opt,name=monthlyRequests,proto3" json:"monthlyRequests,omitempty"` // 每月访问量额度
|
||||
DailyWebsocketConnections int64 `protobuf:"varint,16,opt,name=dailyWebsocketConnections,proto3" json:"dailyWebsocketConnections,omitempty"` // 每日Websocket连接数额度
|
||||
MonthlyWebsocketConnections int64 `protobuf:"varint,17,opt,name=monthlyWebsocketConnections,proto3" json:"monthlyWebsocketConnections,omitempty"` // 每月Websocket连接数额度
|
||||
}
|
||||
|
||||
func (x *CreatePlanRequest) Reset() {
|
||||
@@ -180,6 +182,20 @@ func (x *CreatePlanRequest) GetMonthlyRequests() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreatePlanRequest) GetDailyWebsocketConnections() int64 {
|
||||
if x != nil {
|
||||
return x.DailyWebsocketConnections
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreatePlanRequest) GetMonthlyWebsocketConnections() int64 {
|
||||
if x != nil {
|
||||
return x.MonthlyWebsocketConnections
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CreatePlanResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -233,23 +249,25 @@ type UpdatePlanRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PlanId int64 `protobuf:"varint,1,opt,name=planId,proto3" json:"planId,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
||||
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
||||
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
||||
BandwidthPriceJSON []byte `protobuf:"bytes,12,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
|
||||
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"` // 可以添加的域名总数
|
||||
DailyRequests int64 `protobuf:"varint,16,opt,name=dailyRequests,proto3" json:"dailyRequests,omitempty"` // 每日访问量额度
|
||||
MonthlyRequests int64 `protobuf:"varint,17,opt,name=monthlyRequests,proto3" json:"monthlyRequests,omitempty"` // 每月访问量额度
|
||||
PlanId int64 `protobuf:"varint,1,opt,name=planId,proto3" json:"planId,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"`
|
||||
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
|
||||
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
|
||||
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
|
||||
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"`
|
||||
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
|
||||
BandwidthPriceJSON []byte `protobuf:"bytes,12,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
|
||||
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"` // 可以添加的域名总数
|
||||
DailyRequests int64 `protobuf:"varint,16,opt,name=dailyRequests,proto3" json:"dailyRequests,omitempty"` // 每日访问量额度
|
||||
MonthlyRequests int64 `protobuf:"varint,17,opt,name=monthlyRequests,proto3" json:"monthlyRequests,omitempty"` // 每月访问量额度
|
||||
DailyWebsocketConnections int64 `protobuf:"varint,18,opt,name=dailyWebsocketConnections,proto3" json:"dailyWebsocketConnections,omitempty"` // 每日Websocket连接数额度
|
||||
MonthlyWebsocketConnections int64 `protobuf:"varint,19,opt,name=monthlyWebsocketConnections,proto3" json:"monthlyWebsocketConnections,omitempty"` // 每月Websocket连接数额度
|
||||
}
|
||||
|
||||
func (x *UpdatePlanRequest) Reset() {
|
||||
@@ -403,6 +421,20 @@ func (x *UpdatePlanRequest) GetMonthlyRequests() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdatePlanRequest) GetDailyWebsocketConnections() int64 {
|
||||
if x != nil {
|
||||
return x.DailyWebsocketConnections
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdatePlanRequest) GetMonthlyWebsocketConnections() int64 {
|
||||
if x != nil {
|
||||
return x.MonthlyWebsocketConnections
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 删除套餐
|
||||
type DeletePlanRequest struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -743,7 +775,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, 0xdd, 0x04, 0x0a,
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x05, 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,
|
||||
@@ -781,10 +813,18 @@ var file_service_plan_proto_rawDesc = []byte{
|
||||
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, 0x22, 0x2c, 0x0a, 0x12,
|
||||
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, 0x89, 0x05, 0x0a, 0x11, 0x55,
|
||||
0x28, 0x03, 0x52, 0x06, 0x70, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x89, 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,
|
||||
@@ -825,7 +865,15 @@ var file_service_plan_proto_rawDesc = []byte{
|
||||
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, 0x22, 0x2b, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 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,
|
||||
|
||||
@@ -21,4 +21,6 @@ message Plan {
|
||||
int32 totalServerNames = 15; // 可以添加的域名总数
|
||||
int64 dailyRequests = 16; // 每日访问量额度
|
||||
int64 monthlyRequests = 17; // 每月访问量额度
|
||||
int64 dailyWebsocketConnections = 18; // 每日Websocket连接数额度
|
||||
int64 monthlyWebsocketConnections = 19; // 每月Websocket连接数额度
|
||||
}
|
||||
@@ -20,4 +20,5 @@ message ServerBandwidthStat {
|
||||
int64 countCachedRequests = 13; // 总缓存请求数
|
||||
int64 countAttackRequests = 14; // 总攻击请求数
|
||||
int64 userPlanId = 15; // 绑定的用户套餐ID
|
||||
int64 countWebsocketConnections = 16; // Websocket连接数
|
||||
}
|
||||
@@ -39,14 +39,16 @@ message CreatePlanRequest {
|
||||
string priceType = 5;
|
||||
bytes trafficPriceJSON = 6;
|
||||
bytes bandwidthPriceJSON = 10;
|
||||
float monthlyPrice = 7;
|
||||
float seasonallyPrice = 8;
|
||||
float yearlyPrice = 9;
|
||||
float monthlyPrice = 7; // 月度价格
|
||||
float seasonallyPrice = 8; // 季度价格
|
||||
float yearlyPrice = 9; // 年度价格
|
||||
int32 totalServers = 11; // 可以添加的网站数
|
||||
int32 totalServerNamesPerServer = 12; // 每个网站可以添加的域名数
|
||||
int32 totalServerNames = 13; // 可以添加的域名总数
|
||||
int64 dailyRequests = 14; // 每日访问量额度
|
||||
int64 monthlyRequests = 15; // 每月访问量额度
|
||||
int64 dailyWebsocketConnections = 16; // 每日Websocket连接数额度
|
||||
int64 monthlyWebsocketConnections = 17; // 每月Websocket连接数额度
|
||||
}
|
||||
|
||||
message CreatePlanResponse {
|
||||
@@ -72,6 +74,8 @@ message UpdatePlanRequest {
|
||||
int32 totalServerNames = 15; // 可以添加的域名总数
|
||||
int64 dailyRequests = 16; // 每日访问量额度
|
||||
int64 monthlyRequests = 17; // 每月访问量额度
|
||||
int64 dailyWebsocketConnections = 18; // 每日Websocket连接数额度
|
||||
int64 monthlyWebsocketConnections = 19; // 每月Websocket连接数额度
|
||||
}
|
||||
|
||||
// 删除套餐
|
||||
|
||||
@@ -7,8 +7,9 @@ import timeutil "github.com/iwind/TeaGo/utils/time"
|
||||
type TrafficLimitTarget = string
|
||||
|
||||
const (
|
||||
TrafficLimitTargetTraffic TrafficLimitTarget = "traffic"
|
||||
TrafficLimitTargetRequest TrafficLimitTarget = "request"
|
||||
TrafficLimitTargetTraffic TrafficLimitTarget = "traffic"
|
||||
TrafficLimitTargetRequest TrafficLimitTarget = "request"
|
||||
TrafficLimitTargetWebsocketConnections TrafficLimitTarget = "websocketConnections"
|
||||
)
|
||||
|
||||
// TrafficLimitStatus 流量限制状态
|
||||
|
||||
Reference in New Issue
Block a user