Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55e2c38cd8 | ||
|
|
534d8e471d | ||
|
|
3c81bd6d5d | ||
|
|
f2d087a6ce | ||
|
|
2497a81e09 | ||
|
|
972b487db8 | ||
|
|
170e6ebfb8 | ||
|
|
9e80750309 | ||
|
|
f056a9c5bd | ||
|
|
6a42827ebd | ||
|
|
2d25c385fa | ||
|
|
8a6c20db01 |
@@ -3486,7 +3486,7 @@
|
||||
"requestMessageName": "FindHTTPWebCCRequest",
|
||||
"responseMessageName": "FindHTTPWebCCResponse",
|
||||
"code": "rpc findHTTPWebCC(FindHTTPWebCCRequest) returns (FindHTTPWebCCResponse);",
|
||||
"doc": "查找UAM设置",
|
||||
"doc": "查找CC设置",
|
||||
"roles": [
|
||||
"admin",
|
||||
"user"
|
||||
@@ -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",
|
||||
@@ -14069,7 +14105,7 @@
|
||||
},
|
||||
{
|
||||
"name": "CopyServerConfigRequest",
|
||||
"code": "message CopyServerConfigRequest {\n\tint64 serverId = 1; // 被复制网站ID\n\tstring configCode = 2; // 要拷贝的配置代号\n\tstring targetType = 3; // 目标类型:servers, groups, cluster(当前集群下所有网站,只有管理员才有权限)、user(当前用户下所有网站)\n\trepeated int64 targetServerIds = 4; // 目标网站ID列表\n\trepeated int64 targetServerGroupIds = 5; // 目标网站分组ID列表\n\tint64 targetClusterId = 6; // 目标集群ID\n\tint64 targetUserId = 7; // 目标用户ID\n}",
|
||||
"code": "message CopyServerConfigRequest {\n\tint64 serverId = 1; // 被复制网站ID\n\tstring configCode = 2; // 要拷贝的配置代号:stat 统计;charset 字符编码;userAgent UA名单;referers 防盗链;webp WebP配置;accessLog 访问日志;cc CC配置;hostRedirects URL跳转;root ROOT配置;remoteAddr 访客设置;requestLimit 请求限制;compression 内容压缩设置;optimization 页面优化设置;cache 缓存设置;uam 五秒盾设置;websocket Websocket设置;pages 自定义页面设置;auth 访问鉴权;reverseProxy 反向代理设置\n\tstring targetType = 3; // 目标类型:servers, groups, cluster(当前集群下所有网站,只有管理员才有权限)、user(当前用户下所有网站)\n\trepeated int64 targetServerIds = 4; // 目标网站ID列表\n\trepeated int64 targetServerGroupIds = 5; // 目标网站分组ID列表\n\tint64 targetClusterId = 6; // 目标集群ID\n\tint64 targetUserId = 7; // 目标用户ID\n}",
|
||||
"doc": "在网站之间复制配置"
|
||||
},
|
||||
{
|
||||
@@ -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\tint64 dailyRequests = 14; // 每日访问量额度\n\tint64 monthlyRequests = 15; // 每月访问量额度\n}",
|
||||
"doc": "创建套餐"
|
||||
},
|
||||
{
|
||||
@@ -18600,7 +18651,7 @@
|
||||
{
|
||||
"name": "FindHTTPWebCCRequest",
|
||||
"code": "message FindHTTPWebCCRequest {\n\tint64 httpWebId = 1;\n}",
|
||||
"doc": "查找服务UAM设置"
|
||||
"doc": "查找网站CC设置"
|
||||
},
|
||||
{
|
||||
"name": "FindHTTPWebCCResponse",
|
||||
@@ -18650,7 +18701,7 @@
|
||||
{
|
||||
"name": "FindHTTPWebUAMRequest",
|
||||
"code": "message FindHTTPWebUAMRequest {\n\tint64 httpWebId = 1;\n}",
|
||||
"doc": "查找服务UAM设置"
|
||||
"doc": "查找网站UAM设置"
|
||||
},
|
||||
{
|
||||
"name": "FindHTTPWebUAMResponse",
|
||||
@@ -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\tint64 dailyRequests = 16; // 每日访问量额度\n\tint64 monthlyRequests = 17; // 每月访问量额度\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": "带宽统计数据"
|
||||
},
|
||||
{
|
||||
@@ -21765,7 +21816,7 @@
|
||||
{
|
||||
"name": "UpdateHTTPWebCCRequest",
|
||||
"code": "message UpdateHTTPWebCCRequest {\n\tint64 httpWebId = 1;\n\tbytes ccJSON = 2;\n}",
|
||||
"doc": "修改服务CC设置"
|
||||
"doc": "修改网站CC设置"
|
||||
},
|
||||
{
|
||||
"name": "UpdateHTTPWebCacheRequest",
|
||||
@@ -21875,7 +21926,7 @@
|
||||
{
|
||||
"name": "UpdateHTTPWebUAMRequest",
|
||||
"code": "message UpdateHTTPWebUAMRequest {\n\tint64 httpWebId = 1;\n\tbytes uamJSON = 2;\n}",
|
||||
"doc": "修改服务UAM设置"
|
||||
"doc": "修改网站UAM设置"
|
||||
},
|
||||
{
|
||||
"name": "UpdateHTTPWebUserAgentRequest",
|
||||
@@ -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\tint64 dailyRequests = 16; // 每日访问量额度\n\tint64 monthlyRequests = 17; // 每月访问量额度\n}",
|
||||
"doc": "修改套餐"
|
||||
},
|
||||
{
|
||||
@@ -22464,7 +22515,7 @@
|
||||
},
|
||||
{
|
||||
"name": "UpdateReverseProxyRequest",
|
||||
"code": "message UpdateReverseProxyRequest {\n\tint64 reverseProxyId = 1;\n\tint32 requestHostType = 6;\n\tstring requestHost = 2;\n\tbool requestHostExcludingPort = 15;\n\tstring requestURI = 3;\n\tstring stripPrefix = 4;\n\tbool autoFlush = 5;\n\trepeated string addHeaders = 7;\n\tbytes connTimeoutJSON = 8;\n\tbytes readTimeoutJSON = 9;\n\tbytes idleTimeoutJSON = 10;\n\tint32 maxConns = 11;\n\tint32 maxIdleConns = 12;\n\tbytes proxyProtocolJSON = 13;\n\tbool followRedirects = 14;\n}",
|
||||
"code": "message UpdateReverseProxyRequest {\n\tint64 reverseProxyId = 1; // 反向代理ID\n\tint32 requestHostType = 6; // 可选参数,回源主机名类型:0 跟随CDN域名,1跟随源站,2自定义\n\tstring requestHost = 2; // 可选参数,自定义回源主机名\n\tbool requestHostExcludingPort = 15; // 可选参数,回源主机名中去除端口\n\tstring requestURI = 3; // 可选参数,请求URI\n\tstring stripPrefix = 4; // 可选参数,去除URI前缀\n\tbool autoFlush = 5; // 可选参数,自动刷新\n\trepeated string addHeaders = 7; // 可选参数,可以添加的请求报头\n\tbytes connTimeoutJSON = 8; // 可选参数,连接超时时间\n\tbytes readTimeoutJSON = 9; // 可选参数,读取超时时间\n\tbytes idleTimeoutJSON = 10; // 可选参数,空闲连接超时时间\n\tint32 maxConns = 11; // 可选参数,最大连接数\n\tint32 maxIdleConns = 12; // 可选参数,最大空闲连接数\n\tbytes proxyProtocolJSON = 13; // 可选参数,PROXY Protocol设置\n\tbool followRedirects = 14; // 可选参数,跳转跟随\n\tbool retry50X = 16; // 可选参数,启用50X重试\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": ""
|
||||
},
|
||||
{
|
||||
|
||||
@@ -53,6 +53,18 @@ func LookupIP(ip string) *QueryResult {
|
||||
return defaultLibrary.LookupIP(ip)
|
||||
}
|
||||
|
||||
// LookupIPSummaries 查询一组IP对应的区域描述
|
||||
func LookupIPSummaries(ipList []string) map[string]string /** ip => summary **/ {
|
||||
var result = map[string]string{}
|
||||
for _, ip := range ipList {
|
||||
var region = LookupIP(ip)
|
||||
if region != nil && region.IsOk() {
|
||||
result[ip] = region.Summary()
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
type IPLibrary struct {
|
||||
reader *Reader
|
||||
}
|
||||
|
||||
@@ -86,6 +86,41 @@ func TestIPLibrary_LookupIP(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIPLibrary_LookupIP_Summary(t *testing.T) {
|
||||
var lib = iplibrary.NewIPLibrary()
|
||||
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
for _, ip := range []string{
|
||||
"66.249.66.69",
|
||||
"123456", // wrong ip
|
||||
"", // empty
|
||||
} {
|
||||
var result = lib.LookupIP(ip)
|
||||
if result.IsOk() {
|
||||
t.Log(ip, "=>", "region summary:", result.RegionSummary(), "summary:", result.Summary())
|
||||
} else {
|
||||
t.Log(ip, "=>", "region summary:", result.RegionSummary(), "summary:", result.Summary())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestIPLibrary_LookupIPSummaries(t *testing.T) {
|
||||
_ = iplibrary.InitDefault()
|
||||
t.Logf("%+v", iplibrary.LookupIPSummaries([]string{
|
||||
"127.0.0.1",
|
||||
"8.8.8.8",
|
||||
"4.4.4.4",
|
||||
"202.96.0.20",
|
||||
"111.197.165.199",
|
||||
"66.249.66.69",
|
||||
"2222", // wrong ip
|
||||
"2406:8c00:0:3401:133:18:168:70", // ipv6
|
||||
}))
|
||||
}
|
||||
|
||||
func BenchmarkIPLibrary_Lookup(b *testing.B) {
|
||||
var lib = iplibrary.NewIPLibrary()
|
||||
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
|
||||
|
||||
@@ -183,6 +183,33 @@ func (this *QueryResult) Summary() string {
|
||||
return strings.Join(pieces, " ")
|
||||
}
|
||||
|
||||
func (this *QueryResult) RegionSummary() string {
|
||||
if this.item == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
var pieces = []string{}
|
||||
var countryName = this.CountryName()
|
||||
var provinceName = this.ProvinceName()
|
||||
var cityName = this.CityName()
|
||||
var townName = this.TownName()
|
||||
|
||||
if len(countryName) > 0 {
|
||||
pieces = append(pieces, countryName)
|
||||
}
|
||||
if len(provinceName) > 0 && !lists.ContainsString(pieces, provinceName) {
|
||||
pieces = append(pieces, provinceName)
|
||||
}
|
||||
if len(cityName) > 0 && !lists.ContainsString(pieces, cityName) && !lists.ContainsString(pieces, strings.TrimSuffix(cityName, "市")) {
|
||||
pieces = append(pieces, cityName)
|
||||
}
|
||||
if len(townName) > 0 && !lists.ContainsString(pieces, townName) && !lists.ContainsString(pieces, strings.TrimSuffix(townName, "县")) {
|
||||
pieces = append(pieces, townName)
|
||||
}
|
||||
|
||||
return strings.Join(pieces, " ")
|
||||
}
|
||||
|
||||
func (this *QueryResult) realCountryId() uint16 {
|
||||
if this.item != nil {
|
||||
switch item := this.item.(type) {
|
||||
|
||||
@@ -25,18 +25,23 @@ 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"`
|
||||
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"` // 每月访问量额度
|
||||
}
|
||||
|
||||
func (x *Plan) Reset() {
|
||||
@@ -155,11 +160,46 @@ 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
|
||||
}
|
||||
|
||||
func (x *Plan) GetDailyRequests() int64 {
|
||||
if x != nil {
|
||||
return x.DailyRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Plan) GetMonthlyRequests() int64 {
|
||||
if x != nil {
|
||||
return x.MonthlyRequests
|
||||
}
|
||||
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, 0xf4, 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 +225,22 @@ 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, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x61, 0x69,
|
||||
0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6f,
|
||||
0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x11, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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() }
|
||||
|
||||
@@ -1934,7 +1934,7 @@ func (x *FindHTTPWebRequestScriptsResponse) GetRequestScriptsJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 修改服务UAM设置
|
||||
// 修改网站UAM设置
|
||||
type UpdateHTTPWebUAMRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -1990,7 +1990,7 @@ func (x *UpdateHTTPWebUAMRequest) GetUamJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 查找服务UAM设置
|
||||
// 查找网站UAM设置
|
||||
type FindHTTPWebUAMRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -2085,7 +2085,7 @@ func (x *FindHTTPWebUAMResponse) GetUamJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 修改服务CC设置
|
||||
// 修改网站CC设置
|
||||
type UpdateHTTPWebCCRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -2141,7 +2141,7 @@ func (x *UpdateHTTPWebCCRequest) GetCcJSON() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 查找服务UAM设置
|
||||
// 查找网站CC设置
|
||||
type FindHTTPWebCCRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
||||
@@ -129,7 +129,7 @@ type HTTPWebServiceClient interface {
|
||||
FindHTTPWebUAM(ctx context.Context, in *FindHTTPWebUAMRequest, opts ...grpc.CallOption) (*FindHTTPWebUAMResponse, error)
|
||||
// 修改CC设置
|
||||
UpdateHTTPWebCC(ctx context.Context, in *UpdateHTTPWebCCRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
// 查找UAM设置
|
||||
// 查找CC设置
|
||||
FindHTTPWebCC(ctx context.Context, in *FindHTTPWebCCRequest, opts ...grpc.CallOption) (*FindHTTPWebCCResponse, error)
|
||||
// 修改防盗链设置
|
||||
UpdateHTTPWebReferers(ctx context.Context, in *UpdateHTTPWebReferersRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
|
||||
@@ -561,7 +561,7 @@ type HTTPWebServiceServer interface {
|
||||
FindHTTPWebUAM(context.Context, *FindHTTPWebUAMRequest) (*FindHTTPWebUAMResponse, error)
|
||||
// 修改CC设置
|
||||
UpdateHTTPWebCC(context.Context, *UpdateHTTPWebCCRequest) (*RPCSuccess, error)
|
||||
// 查找UAM设置
|
||||
// 查找CC设置
|
||||
FindHTTPWebCC(context.Context, *FindHTTPWebCCRequest) (*FindHTTPWebCCResponse, error)
|
||||
// 修改防盗链设置
|
||||
UpdateHTTPWebReferers(context.Context, *UpdateHTTPWebReferersRequest) (*RPCSuccess, error)
|
||||
|
||||
@@ -26,16 +26,21 @@ 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"`
|
||||
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"` // 每月访问量额度
|
||||
}
|
||||
|
||||
func (x *CreatePlanRequest) Reset() {
|
||||
@@ -140,6 +145,41 @@ 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
|
||||
}
|
||||
|
||||
func (x *CreatePlanRequest) GetDailyRequests() int64 {
|
||||
if x != nil {
|
||||
return x.DailyRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreatePlanRequest) GetMonthlyRequests() int64 {
|
||||
if x != nil {
|
||||
return x.MonthlyRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CreatePlanResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -193,18 +233,23 @@ 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"`
|
||||
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"` // 每月访问量额度
|
||||
}
|
||||
|
||||
func (x *UpdatePlanRequest) Reset() {
|
||||
@@ -323,6 +368,41 @@ 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
|
||||
}
|
||||
|
||||
func (x *UpdatePlanRequest) GetDailyRequests() int64 {
|
||||
if x != nil {
|
||||
return x.DailyRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdatePlanRequest) GetMonthlyRequests() int64 {
|
||||
if x != nil {
|
||||
return x.MonthlyRequests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 删除套餐
|
||||
type DeletePlanRequest struct {
|
||||
state protoimpl.MessageState
|
||||
@@ -663,7 +743,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, 0xdd, 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 +767,118 @@ 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, 0x12, 0x24, 0x0a, 0x0d,
|
||||
0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x0e, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x6f, 0x6e,
|
||||
0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 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,
|
||||
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, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64,
|
||||
0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f,
|
||||
0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18,
|
||||
0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 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 (
|
||||
|
||||
@@ -495,21 +495,22 @@ type UpdateReverseProxyRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"`
|
||||
RequestHostType int32 `protobuf:"varint,6,opt,name=requestHostType,proto3" json:"requestHostType,omitempty"`
|
||||
RequestHost string `protobuf:"bytes,2,opt,name=requestHost,proto3" json:"requestHost,omitempty"`
|
||||
RequestHostExcludingPort bool `protobuf:"varint,15,opt,name=requestHostExcludingPort,proto3" json:"requestHostExcludingPort,omitempty"`
|
||||
RequestURI string `protobuf:"bytes,3,opt,name=requestURI,proto3" json:"requestURI,omitempty"`
|
||||
StripPrefix string `protobuf:"bytes,4,opt,name=stripPrefix,proto3" json:"stripPrefix,omitempty"`
|
||||
AutoFlush bool `protobuf:"varint,5,opt,name=autoFlush,proto3" json:"autoFlush,omitempty"`
|
||||
AddHeaders []string `protobuf:"bytes,7,rep,name=addHeaders,proto3" json:"addHeaders,omitempty"`
|
||||
ConnTimeoutJSON []byte `protobuf:"bytes,8,opt,name=connTimeoutJSON,proto3" json:"connTimeoutJSON,omitempty"`
|
||||
ReadTimeoutJSON []byte `protobuf:"bytes,9,opt,name=readTimeoutJSON,proto3" json:"readTimeoutJSON,omitempty"`
|
||||
IdleTimeoutJSON []byte `protobuf:"bytes,10,opt,name=idleTimeoutJSON,proto3" json:"idleTimeoutJSON,omitempty"`
|
||||
MaxConns int32 `protobuf:"varint,11,opt,name=maxConns,proto3" json:"maxConns,omitempty"`
|
||||
MaxIdleConns int32 `protobuf:"varint,12,opt,name=maxIdleConns,proto3" json:"maxIdleConns,omitempty"`
|
||||
ProxyProtocolJSON []byte `protobuf:"bytes,13,opt,name=proxyProtocolJSON,proto3" json:"proxyProtocolJSON,omitempty"`
|
||||
FollowRedirects bool `protobuf:"varint,14,opt,name=followRedirects,proto3" json:"followRedirects,omitempty"`
|
||||
ReverseProxyId int64 `protobuf:"varint,1,opt,name=reverseProxyId,proto3" json:"reverseProxyId,omitempty"` // 反向代理ID
|
||||
RequestHostType int32 `protobuf:"varint,6,opt,name=requestHostType,proto3" json:"requestHostType,omitempty"` // 可选参数,回源主机名类型:0 跟随CDN域名,1跟随源站,2自定义
|
||||
RequestHost string `protobuf:"bytes,2,opt,name=requestHost,proto3" json:"requestHost,omitempty"` // 可选参数,自定义回源主机名
|
||||
RequestHostExcludingPort bool `protobuf:"varint,15,opt,name=requestHostExcludingPort,proto3" json:"requestHostExcludingPort,omitempty"` // 可选参数,回源主机名中去除端口
|
||||
RequestURI string `protobuf:"bytes,3,opt,name=requestURI,proto3" json:"requestURI,omitempty"` // 可选参数,请求URI
|
||||
StripPrefix string `protobuf:"bytes,4,opt,name=stripPrefix,proto3" json:"stripPrefix,omitempty"` // 可选参数,去除URI前缀
|
||||
AutoFlush bool `protobuf:"varint,5,opt,name=autoFlush,proto3" json:"autoFlush,omitempty"` // 可选参数,自动刷新
|
||||
AddHeaders []string `protobuf:"bytes,7,rep,name=addHeaders,proto3" json:"addHeaders,omitempty"` // 可选参数,可以添加的请求报头
|
||||
ConnTimeoutJSON []byte `protobuf:"bytes,8,opt,name=connTimeoutJSON,proto3" json:"connTimeoutJSON,omitempty"` // 可选参数,连接超时时间
|
||||
ReadTimeoutJSON []byte `protobuf:"bytes,9,opt,name=readTimeoutJSON,proto3" json:"readTimeoutJSON,omitempty"` // 可选参数,读取超时时间
|
||||
IdleTimeoutJSON []byte `protobuf:"bytes,10,opt,name=idleTimeoutJSON,proto3" json:"idleTimeoutJSON,omitempty"` // 可选参数,空闲连接超时时间
|
||||
MaxConns int32 `protobuf:"varint,11,opt,name=maxConns,proto3" json:"maxConns,omitempty"` // 可选参数,最大连接数
|
||||
MaxIdleConns int32 `protobuf:"varint,12,opt,name=maxIdleConns,proto3" json:"maxIdleConns,omitempty"` // 可选参数,最大空闲连接数
|
||||
ProxyProtocolJSON []byte `protobuf:"bytes,13,opt,name=proxyProtocolJSON,proto3" json:"proxyProtocolJSON,omitempty"` // 可选参数,PROXY Protocol设置
|
||||
FollowRedirects bool `protobuf:"varint,14,opt,name=followRedirects,proto3" json:"followRedirects,omitempty"` // 可选参数,跳转跟随
|
||||
Retry50X bool `protobuf:"varint,16,opt,name=retry50X,proto3" json:"retry50X,omitempty"` // 可选参数,启用50X重试
|
||||
}
|
||||
|
||||
func (x *UpdateReverseProxyRequest) Reset() {
|
||||
@@ -649,6 +650,13 @@ func (x *UpdateReverseProxyRequest) GetFollowRedirects() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *UpdateReverseProxyRequest) GetRetry50X() bool {
|
||||
if x != nil {
|
||||
return x.Retry50X
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_service_reverse_proxy_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_service_reverse_proxy_proto_rawDesc = []byte{
|
||||
@@ -715,7 +723,7 @@ var file_service_reverse_proxy_proto_rawDesc = []byte{
|
||||
0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e,
|
||||
0x22, 0xe1, 0x04, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72,
|
||||
0x22, 0xfd, 0x04, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72,
|
||||
0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26,
|
||||
0x0a, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x49, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50,
|
||||
@@ -753,50 +761,52 @@ var file_service_reverse_proxy_proto_rawDesc = []byte{
|
||||
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x6f,
|
||||
0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x18, 0x0e, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x64, 0x69, 0x72,
|
||||
0x65, 0x63, 0x74, 0x73, 0x32, 0xa2, 0x05, 0x0a, 0x13, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65,
|
||||
0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x12,
|
||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f,
|
||||
0x78, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76,
|
||||
0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x22, 0x2e, 0x70,
|
||||
0x65, 0x63, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x74, 0x72, 0x79, 0x35, 0x30, 0x58,
|
||||
0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x74, 0x72, 0x79, 0x35, 0x30, 0x58,
|
||||
0x32, 0xa2, 0x05, 0x0a, 0x13, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78,
|
||||
0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1d,
|
||||
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73,
|
||||
0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e,
|
||||
0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65,
|
||||
0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a,
|
||||
0x17, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65,
|
||||
0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
|
||||
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65,
|
||||
0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76,
|
||||
0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
|
||||
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72,
|
||||
0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x1c, 0x75,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78,
|
||||
0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x2e, 0x70, 0x62,
|
||||
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72,
|
||||
0x6f, 0x78, 0x79, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x12, 0x5f, 0x0a, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72,
|
||||
0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79,
|
||||
0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65,
|
||||
0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x74, 0x0a, 0x1d, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
|
||||
0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x12, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x64, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70,
|
||||
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x76,
|
||||
0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x1c, 0x75, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x63, 0x68,
|
||||
0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53,
|
||||
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x12, 0x5f, 0x0a, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73,
|
||||
0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x69,
|
||||
0x67, 0x69, 0x6e, 0x73, 0x12, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x69, 0x6d,
|
||||
0x61, 0x72, 0x79, 0x4f, 0x72, 0x69, 0x67, 0x69, 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, 0x12, 0x5d, 0x0a, 0x1f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72,
|
||||
0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69,
|
||||
0x67, 0x69, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b,
|
||||
0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 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,
|
||||
0x12, 0x43, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73,
|
||||
0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
|
||||
0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x5d, 0x0a, 0x1f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52,
|
||||
0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x75,
|
||||
0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79,
|
||||
0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x4f, 0x72, 0x69, 0x67, 0x69, 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, 0x12, 0x43, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f,
|
||||
0x78, 0x79, 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,
|
||||
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
@@ -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,
|
||||
|
||||
@@ -16,4 +16,9 @@ message Plan {
|
||||
double monthlyPrice = 9;
|
||||
double seasonallyPrice = 10;
|
||||
double yearlyPrice = 11;
|
||||
int32 totalServers = 13; // 可以添加的网站数
|
||||
int32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数
|
||||
int32 totalServerNames = 15; // 可以添加的域名总数
|
||||
int64 dailyRequests = 16; // 每日访问量额度
|
||||
int64 monthlyRequests = 17; // 每月访问量额度
|
||||
}
|
||||
@@ -19,4 +19,5 @@ message ServerBandwidthStat {
|
||||
int64 countRequests = 12; // 总请求数
|
||||
int64 countCachedRequests = 13; // 总缓存请求数
|
||||
int64 countAttackRequests = 14; // 总攻击请求数
|
||||
int64 userPlanId = 15; // 绑定的用户套餐ID
|
||||
}
|
||||
@@ -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 代替
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ service HTTPWebService {
|
||||
// 修改CC设置
|
||||
rpc updateHTTPWebCC(UpdateHTTPWebCCRequest) returns (RPCSuccess);
|
||||
|
||||
// 查找UAM设置
|
||||
// 查找CC设置
|
||||
rpc findHTTPWebCC(FindHTTPWebCCRequest) returns (FindHTTPWebCCResponse);
|
||||
|
||||
// 修改防盗链设置
|
||||
@@ -321,13 +321,13 @@ message FindHTTPWebRequestScriptsResponse {
|
||||
bytes requestScriptsJSON = 1;
|
||||
}
|
||||
|
||||
// 修改服务UAM设置
|
||||
// 修改网站UAM设置
|
||||
message UpdateHTTPWebUAMRequest {
|
||||
int64 httpWebId = 1;
|
||||
bytes uamJSON = 2;
|
||||
}
|
||||
|
||||
// 查找服务UAM设置
|
||||
// 查找网站UAM设置
|
||||
message FindHTTPWebUAMRequest {
|
||||
int64 httpWebId = 1;
|
||||
}
|
||||
@@ -336,13 +336,13 @@ message FindHTTPWebUAMResponse {
|
||||
bytes uamJSON = 1;
|
||||
}
|
||||
|
||||
// 修改服务CC设置
|
||||
// 修改网站CC设置
|
||||
message UpdateHTTPWebCCRequest {
|
||||
int64 httpWebId = 1;
|
||||
bytes ccJSON = 2;
|
||||
}
|
||||
|
||||
// 查找服务UAM设置
|
||||
// 查找网站CC设置
|
||||
message FindHTTPWebCCRequest {
|
||||
int64 httpWebId = 1;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,11 @@ message CreatePlanRequest {
|
||||
float monthlyPrice = 7;
|
||||
float seasonallyPrice = 8;
|
||||
float yearlyPrice = 9;
|
||||
int32 totalServers = 11; // 可以添加的网站数
|
||||
int32 totalServerNamesPerServer = 12; // 每个网站可以添加的域名数
|
||||
int32 totalServerNames = 13; // 可以添加的域名总数
|
||||
int64 dailyRequests = 14; // 每日访问量额度
|
||||
int64 monthlyRequests = 15; // 每月访问量额度
|
||||
}
|
||||
|
||||
message CreatePlanResponse {
|
||||
@@ -62,6 +67,11 @@ message UpdatePlanRequest {
|
||||
float monthlyPrice = 9;
|
||||
float seasonallyPrice = 10;
|
||||
float yearlyPrice = 11;
|
||||
int32 totalServers = 13; // 可以添加的网站数
|
||||
int32 totalServerNamesPerServer = 14; // 每个网站可以添加的域名数
|
||||
int32 totalServerNames = 15; // 可以添加的域名总数
|
||||
int64 dailyRequests = 16; // 每日访问量额度
|
||||
int64 monthlyRequests = 17; // 每月访问量额度
|
||||
}
|
||||
|
||||
// 删除套餐
|
||||
|
||||
@@ -79,19 +79,20 @@ message UpdateReverseProxyBackupOriginsRequest {
|
||||
|
||||
// 修改反向代理设置
|
||||
message UpdateReverseProxyRequest {
|
||||
int64 reverseProxyId = 1;
|
||||
int32 requestHostType = 6;
|
||||
string requestHost = 2;
|
||||
bool requestHostExcludingPort = 15;
|
||||
string requestURI = 3;
|
||||
string stripPrefix = 4;
|
||||
bool autoFlush = 5;
|
||||
repeated string addHeaders = 7;
|
||||
bytes connTimeoutJSON = 8;
|
||||
bytes readTimeoutJSON = 9;
|
||||
bytes idleTimeoutJSON = 10;
|
||||
int32 maxConns = 11;
|
||||
int32 maxIdleConns = 12;
|
||||
bytes proxyProtocolJSON = 13;
|
||||
bool followRedirects = 14;
|
||||
int64 reverseProxyId = 1; // 反向代理ID
|
||||
int32 requestHostType = 6; // 可选参数,回源主机名类型:0 跟随CDN域名,1跟随源站,2自定义
|
||||
string requestHost = 2; // 可选参数,自定义回源主机名
|
||||
bool requestHostExcludingPort = 15; // 可选参数,回源主机名中去除端口
|
||||
string requestURI = 3; // 可选参数,请求URI
|
||||
string stripPrefix = 4; // 可选参数,去除URI前缀
|
||||
bool autoFlush = 5; // 可选参数,自动刷新
|
||||
repeated string addHeaders = 7; // 可选参数,可以添加的请求报头
|
||||
bytes connTimeoutJSON = 8; // 可选参数,连接超时时间
|
||||
bytes readTimeoutJSON = 9; // 可选参数,读取超时时间
|
||||
bytes idleTimeoutJSON = 10; // 可选参数,空闲连接超时时间
|
||||
int32 maxConns = 11; // 可选参数,最大连接数
|
||||
int32 maxIdleConns = 12; // 可选参数,最大空闲连接数
|
||||
bytes proxyProtocolJSON = 13; // 可选参数,PROXY Protocol设置
|
||||
bool followRedirects = 14; // 可选参数,跳转跟随
|
||||
bool retry50X = 16; // 可选参数,启用50X重试
|
||||
}
|
||||
@@ -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;
|
||||
@@ -718,7 +745,7 @@ message UpdateServerNameRequest {
|
||||
// 在网站之间复制配置
|
||||
message CopyServerConfigRequest {
|
||||
int64 serverId = 1; // 被复制网站ID
|
||||
string configCode = 2; // 要拷贝的配置代号
|
||||
string configCode = 2; // 要拷贝的配置代号:stat 统计;charset 字符编码;userAgent UA名单;referers 防盗链;webp WebP配置;accessLog 访问日志;cc CC配置;hostRedirects URL跳转;root ROOT配置;remoteAddr 访客设置;requestLimit 请求限制;compression 内容压缩设置;optimization 页面优化设置;cache 缓存设置;uam 五秒盾设置;websocket Websocket设置;pages 自定义页面设置;auth 访问鉴权;reverseProxy 反向代理设置
|
||||
string targetType = 3; // 目标类型:servers, groups, cluster(当前集群下所有网站,只有管理员才有权限)、user(当前用户下所有网站)
|
||||
repeated int64 targetServerIds = 4; // 目标网站ID列表
|
||||
repeated int64 targetServerGroupIds = 5; // 目标网站分组ID列表
|
||||
|
||||
@@ -457,7 +457,7 @@ func HTTPFirewallTemplate() *HTTPFirewallPolicy {
|
||||
IsOn: true,
|
||||
Param: "${userAgent}",
|
||||
Operator: HTTPFirewallRuleOperatorMatch,
|
||||
Value: `python|pycurl|http-client|httpclient|apachebench|nethttp|http_request|java|perl|ruby|scrapy|php|rust`,
|
||||
Value: `python|pycurl|http-client|httpclient|apachebench|nethttp|http_request|java|perl|ruby|scrapy|php\b|rust`,
|
||||
IsCaseInsensitive: true,
|
||||
})
|
||||
set.AddRule(&HTTPFirewallRule{
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package firewallconfigs_test
|
||||
|
||||
import (
|
||||
"github.com/iwind/TeaGo/assert"
|
||||
"regexp"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestUserAgentMatch_PHP(t *testing.T) {
|
||||
var a = assert.NewAssertion(t)
|
||||
|
||||
var expr = `python|pycurl|http-client|httpclient|apachebench|nethttp|http_request|java|perl|ruby|scrapy|php\b|rust`
|
||||
var reg = regexp.MustCompile(expr)
|
||||
a.IsTrue(reg.MatchString("php"))
|
||||
a.IsTrue(reg.MatchString("php/5.0"))
|
||||
a.IsFalse(reg.MatchString("php110"))
|
||||
}
|
||||
@@ -2,9 +2,19 @@
|
||||
|
||||
package serverconfigs
|
||||
|
||||
type LnRequestSchedulingMethod = string
|
||||
|
||||
const (
|
||||
LnRequestSchedulingMethodRandom LnRequestSchedulingMethod = "random"
|
||||
LnRequestSchedulingMethodURLMapping LnRequestSchedulingMethod = "urlMapping"
|
||||
)
|
||||
|
||||
func NewGlobalServerConfig() *GlobalServerConfig {
|
||||
var config = &GlobalServerConfig{}
|
||||
|
||||
config.HTTPAll.SupportsLowVersionHTTP = true
|
||||
config.HTTPAll.EnableServerAddrVariable = true
|
||||
config.HTTPAll.LnRequestSchedulingMethod = LnRequestSchedulingMethodURLMapping
|
||||
|
||||
config.HTTPAccessLog.IsOn = true
|
||||
config.HTTPAccessLog.EnableRequestHeaders = true
|
||||
@@ -35,10 +45,12 @@ type GlobalServerConfig struct {
|
||||
DefaultDomain string `yaml:"defaultDomain" json:"defaultDomain"` // 默认的域名
|
||||
DomainMismatchAction *DomainMismatchAction `yaml:"domainMismatchAction" json:"domainMismatchAction"` // 不匹配时采取的动作
|
||||
|
||||
SupportsLowVersionHTTP bool `yaml:"supportsLowVersionHTTP" json:"supportsLowVersionHTTP"` // 是否启用低版本HTTP
|
||||
MatchCertFromAllServers bool `yaml:"matchCertFromAllServers" json:"matchCertFromAllServers"` // 从所有服务中匹配证书(不要轻易开启!)
|
||||
ForceLnRequest bool `yaml:"forceLnRequest" json:"forceLnRequest"` // 强制从Ln请求内容
|
||||
ServerName string `yaml:"serverName" json:"serverName"` // Server名称
|
||||
SupportsLowVersionHTTP bool `yaml:"supportsLowVersionHTTP" json:"supportsLowVersionHTTP"` // 是否启用低版本HTTP
|
||||
MatchCertFromAllServers bool `yaml:"matchCertFromAllServers" json:"matchCertFromAllServers"` // 从所有服务中匹配证书(不要轻易开启!)
|
||||
ForceLnRequest bool `yaml:"forceLnRequest" json:"forceLnRequest"` // 强制从Ln请求内容
|
||||
LnRequestSchedulingMethod LnRequestSchedulingMethod `yaml:"lnRequestSchedulingMethod" json:"lnRequestSchedulingMethod"` // Ln请求调度方法
|
||||
ServerName string `yaml:"serverName" json:"serverName"` // Server名称
|
||||
EnableServerAddrVariable bool `yaml:"enableServerAddrVariable" json:"enableServerAddrVariable"` // 是否支持${serverAddr}变量
|
||||
} `yaml:"httpAll" json:"httpAll"` // HTTP统一配置
|
||||
|
||||
HTTPAccessLog struct {
|
||||
|
||||
@@ -7,26 +7,57 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
type HTTPRemoteAddrType = string
|
||||
|
||||
const (
|
||||
HTTPRemoteAddrTypeDefault HTTPRemoteAddrType = "default" // 默认(直连)
|
||||
HTTPRemoteAddrTypeProxy HTTPRemoteAddrType = "proxy" // 代理
|
||||
HTTPRemoteAddrTypeRequestHeader HTTPRemoteAddrType = "requestHeader" // 请求报头
|
||||
HTTPRemoteAddrTypeVariable HTTPRemoteAddrType = "variable" // 变量
|
||||
)
|
||||
|
||||
// HTTPRemoteAddrConfig HTTP获取客户端IP地址方式
|
||||
type HTTPRemoteAddrConfig struct {
|
||||
IsPrior bool `yaml:"isPrior" json:"isPrior"`
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
Value string `yaml:"value" json:"value"` // 值变量
|
||||
IsCustomized bool `yaml:"isCustomized" json:"isCustomized"` // 是否自定义
|
||||
IsPrior bool `yaml:"isPrior" json:"isPrior"`
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
Value string `yaml:"value" json:"value"` // 值变量
|
||||
Type HTTPRemoteAddrType `yaml:"type" json:"type"` // 类型
|
||||
|
||||
isEmpty bool
|
||||
RequestHeaderName string `yaml:"requestHeaderName" json:"requestHeaderName"` // 请求报头名称(type = requestHeader时生效)
|
||||
|
||||
isEmpty bool
|
||||
values []string
|
||||
hasValues bool
|
||||
}
|
||||
|
||||
// Init 初始化
|
||||
func (this *HTTPRemoteAddrConfig) Init() error {
|
||||
this.Value = strings.TrimSpace(this.Value)
|
||||
this.isEmpty = false
|
||||
if len(this.Value) == 0 {
|
||||
this.isEmpty = true
|
||||
} else if regexp.MustCompile(`\s+`).ReplaceAllString(this.Value, "") == "${remoteAddr}" {
|
||||
this.isEmpty = true
|
||||
}
|
||||
|
||||
this.Value = strings.ReplaceAll(this.Value, "${remoteAddr}", "${remoteAddrValue}")
|
||||
// values
|
||||
this.values = []string{}
|
||||
var headerVarReg = regexp.MustCompile(`(\$\{header\.)([\w-,]+)(})`)
|
||||
if headerVarReg.MatchString(this.Value) {
|
||||
var subMatches = headerVarReg.FindStringSubmatch(this.Value)
|
||||
if len(subMatches) > 3 {
|
||||
var prefix = subMatches[1]
|
||||
var headerNamesString = subMatches[2]
|
||||
var suffix = subMatches[3]
|
||||
for _, headerName := range strings.Split(headerNamesString, ",") {
|
||||
headerName = strings.TrimSpace(headerName)
|
||||
if len(headerName) > 0 {
|
||||
this.values = append(this.values, prefix+headerName+suffix)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.hasValues = len(this.values) > 1 // MUST be 1, not 0
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -35,3 +66,13 @@ func (this *HTTPRemoteAddrConfig) Init() error {
|
||||
func (this *HTTPRemoteAddrConfig) IsEmpty() bool {
|
||||
return this.isEmpty
|
||||
}
|
||||
|
||||
// Values 可能的值变量
|
||||
func (this *HTTPRemoteAddrConfig) Values() []string {
|
||||
return this.values
|
||||
}
|
||||
|
||||
// HasValues 检查是否有一组值
|
||||
func (this *HTTPRemoteAddrConfig) HasValues() bool {
|
||||
return this.hasValues
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func TestHTTPRemoteAddrConfig_IsEmpty(t *testing.T) {
|
||||
a := assert.NewAssertion(t)
|
||||
var a = assert.NewAssertion(t)
|
||||
|
||||
{
|
||||
var config = &HTTPRemoteAddrConfig{}
|
||||
@@ -52,3 +52,14 @@ func TestHTTPRemoteAddrConfig_IsEmpty(t *testing.T) {
|
||||
a.IsFalse(config.IsEmpty())
|
||||
}
|
||||
}
|
||||
|
||||
func TestHTTPRemoteAddrConfig_Values(t *testing.T) {
|
||||
for _, value := range []string{"${remoteAddr}", "${header.x-real-ip}", "${header.x-client-ip,x-real-ip,x-forwarded-for}"} {
|
||||
var config = &HTTPRemoteAddrConfig{Value: value}
|
||||
err := config.Init()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(value, "=>", config.Values())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,3 +39,20 @@ func CheckRegionProvinceIsInChinaMainland(regionProvinceId RegionProvinceId) boo
|
||||
regionProvinceId != RegionChinaProvinceIdMO &&
|
||||
regionProvinceId != RegionChinaProvinceIdTW
|
||||
}
|
||||
|
||||
func MatchUserRegion(userCountryId int64, userProvinceId int64, regionId int64) bool {
|
||||
if userCountryId == RegionChinaId {
|
||||
switch regionId {
|
||||
case RegionChinaIdMainland: // china.mainland
|
||||
return CheckRegionProvinceIsInChinaMainland(userProvinceId)
|
||||
case RegionChinaIdHK: // china.hk
|
||||
return userProvinceId == RegionChinaProvinceIdHK
|
||||
case RegionChinaIdMO: // china.mo
|
||||
return userProvinceId == RegionChinaProvinceIdMO
|
||||
case RegionChinaIdTW: // china.tw
|
||||
return userProvinceId == RegionChinaProvinceIdTW
|
||||
}
|
||||
}
|
||||
|
||||
return userCountryId == regionId
|
||||
}
|
||||
|
||||
20
pkg/serverconfigs/regionconfigs/china_test.go
Normal file
20
pkg/serverconfigs/regionconfigs/china_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package regionconfigs_test
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/regionconfigs"
|
||||
"github.com/iwind/TeaGo/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMatchUserRegion(t *testing.T) {
|
||||
var a = assert.NewAssertion(t)
|
||||
a.IsTrue(regionconfigs.MatchUserRegion(regionconfigs.RegionChinaId, 1, 1))
|
||||
a.IsTrue(regionconfigs.MatchUserRegion(regionconfigs.RegionChinaId, 1, regionconfigs.RegionChinaIdMainland))
|
||||
a.IsTrue(regionconfigs.MatchUserRegion(regionconfigs.RegionChinaId, regionconfigs.RegionChinaProvinceIdHK, regionconfigs.RegionChinaIdHK))
|
||||
a.IsTrue(regionconfigs.MatchUserRegion(regionconfigs.RegionChinaId, regionconfigs.RegionChinaProvinceIdMO, regionconfigs.RegionChinaIdMO))
|
||||
a.IsTrue(regionconfigs.MatchUserRegion(regionconfigs.RegionChinaId, regionconfigs.RegionChinaProvinceIdTW, regionconfigs.RegionChinaIdTW))
|
||||
a.IsFalse(regionconfigs.MatchUserRegion(regionconfigs.RegionChinaId, 0, regionconfigs.RegionChinaIdHK))
|
||||
a.IsFalse(regionconfigs.MatchUserRegion(regionconfigs.RegionChinaId, 1, regionconfigs.RegionChinaIdHK))
|
||||
}
|
||||
@@ -16,6 +16,12 @@ const (
|
||||
RequestHostTypeCustomized RequestHostType = 2
|
||||
)
|
||||
|
||||
func NewReverseProxyConfig() *ReverseProxyConfig {
|
||||
return &ReverseProxyConfig{
|
||||
Retry50X: true,
|
||||
}
|
||||
}
|
||||
|
||||
// ReverseProxyConfig 反向代理设置
|
||||
type ReverseProxyConfig struct {
|
||||
Id int64 `yaml:"id" json:"id"` // ID
|
||||
@@ -38,6 +44,7 @@ type ReverseProxyConfig struct {
|
||||
RequestHost string `yaml:"requestHost" json:"requestHost"` // 请求Host,支持变量
|
||||
RequestURI string `yaml:"requestURI" json:"requestURI"` // 请求URI,支持变量,如果同时定义了StripPrefix,则先执行StripPrefix
|
||||
RequestHostExcludingPort bool `yaml:"requestHostExcludingPort" json:"requestHostExcludingPort"` // 请求Host不包括端口
|
||||
Retry50X bool `yaml:"retry50X" json:"retry50X"` // 50x 错误重试
|
||||
|
||||
AddHeaders []string `yaml:"addHeaders" json:"addHeaders"` // 自动添加的Header
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -4,9 +4,19 @@ package serverconfigs
|
||||
|
||||
import timeutil "github.com/iwind/TeaGo/utils/time"
|
||||
|
||||
type TrafficLimitTarget = string
|
||||
|
||||
const (
|
||||
TrafficLimitTargetTraffic TrafficLimitTarget = "traffic"
|
||||
TrafficLimitTargetRequest TrafficLimitTarget = "request"
|
||||
)
|
||||
|
||||
// TrafficLimitStatus 流量限制状态
|
||||
type TrafficLimitStatus struct {
|
||||
UntilDay string `yaml:"untilDay" json:"untilDay"` // 有效日期,格式YYYYMMDD
|
||||
UntilDay string `yaml:"untilDay" json:"untilDay"` // 有效日期,格式YYYYMMDD
|
||||
PlanId int64 `yaml:"planId" json:"planId"` // 套餐ID
|
||||
DateType string `yaml:"dateType" json:"dateType"` // 日期类型 day|month
|
||||
TargetType string `yaml:"targetType" json:"targetType"` // 限制类型:traffic|request|...
|
||||
}
|
||||
|
||||
func (this *TrafficLimitStatus) IsValid() bool {
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user