Compare commits

...

97 Commits

Author SHA1 Message Date
刘祥超
c3c3261579 缓存策略默认不启用MMAP 2024-05-01 12:51:31 +08:00
刘祥超
97c6776809 可以在集群设置中修改节点最大并发读/写数 2024-04-30 19:08:51 +08:00
刘祥超
4e4acc327d 用户平台界面设置中增加“使用的DNS解析库”选项 2024-04-29 15:16:42 +08:00
刘祥超
f73251f57d 管理平台界面设置中增加“使用的DNS解析库”选项 2024-04-29 15:06:55 +08:00
刘祥超
d9350839f3 更新依赖库 2024-04-21 20:27:38 +08:00
刘祥超
25269adaae 网站全局设置中增加“自动gzip回源”选项 2024-04-18 16:15:53 +08:00
刘祥超
351337fcbc 防盗链功能增加“例外URL“和“限制URL”设置 2024-04-17 15:45:17 +08:00
刘祥超
505b6b6c9e UA名单功能增加“例外URL“和“限制URL”设置 2024-04-17 15:10:36 +08:00
刘祥超
1b6a5001e8 例外和限制URL中增加常见图片、常见音频、常见视频等规则 2024-04-17 14:46:30 +08:00
刘祥超
443a3f3ec3 内容压缩功能增加“例外URL“和“限制URL”设置 2024-04-17 13:55:10 +08:00
刘祥超
e4861c3fa1 删除一直未实现的Unix协议相关内容 2024-04-14 17:15:38 +08:00
刘祥超
8ba8528c98 源站增加快速停用/启用功能 2024-04-14 16:27:35 +08:00
刘祥超
4d0b1c7e0c 简化IP名单中创建IP操作/支持IP以CIDR方式显示 2024-04-13 16:45:56 +08:00
刘祥超
3de4223023 增加网站每日独立IP统计 2024-04-12 18:52:15 +08:00
刘祥超
5f29576049 更新依赖库 2024-04-12 16:48:15 +08:00
刘祥超
4adb8117f8 节点配置中增加集群的密钥 2024-04-11 14:18:52 +08:00
刘祥超
2d304b19b8 优化测试用例 2024-04-09 09:46:13 +08:00
刘祥超
8e605cce67 系统安全设置中增加“仅从自定义报头中获取IP”选项 2024-04-08 11:22:04 +08:00
刘祥超
0d53785620 WAF策略增加JSCookie动作选项 2024-04-07 14:21:29 +08:00
刘祥超
73ee81da78 优化防火墙相关代码 2024-04-06 20:32:48 +08:00
刘祥超
a600fc9cd3 增强IP相关函数 2024-04-06 14:57:18 +08:00
刘祥超
cc0b2fd74f 优化代码 2024-04-06 10:07:47 +08:00
刘祥超
e54cfa7765 更好地支持IPv6 2024-04-06 09:12:17 +08:00
刘祥超
7c5c600e31 集群设置增加自动硬盘TRIM选项 2024-04-04 17:05:09 +08:00
刘祥超
c6f9126ae2 节点上传指标数据时只上传变更的部分 2024-04-03 08:15:32 +08:00
刘祥超
5478e6a956 使用MMAP提升缓存读取性能 2024-03-29 18:31:53 +08:00
刘祥超
3945e94f71 DNS服务商中的密钥数据以掩码方式显示 2024-03-18 10:18:38 +08:00
刘祥超
9cd3618d9b 部分API文档 2024-03-18 09:29:54 +08:00
刘祥超
4389ffb397 集群设置--网站设置中“处理未绑定域名方式”支持跳转到网址 2024-03-16 08:59:37 +08:00
刘祥超
debb72c2d3 智能DNS中国家/地区线路下支持省/州的细分 2024-03-14 20:12:24 +08:00
刘祥超
b314f7e96c 优化“页面优化”功能相关代码 2024-03-14 14:24:22 +08:00
刘祥超
823e519d58 优化代码 2024-03-10 16:25:52 +08:00
刘祥超
5a54390f1d 在缓存任务键值中增加集群信息 2024-03-10 11:24:50 +08:00
刘祥超
704d3af982 增加单体应用初始化标识 2024-01-29 18:56:28 +08:00
刘祥超
96b48f2bbc 增加通过管理员用户名查找管理员信息的API 2024-01-29 18:55:23 +08:00
刘祥超
4a1c9be931 优化IP库加载速度 2024-01-23 10:04:01 +08:00
刘祥超
f0dc9e0577 增加修改节点停用/启用状态API 2024-01-21 17:43:28 +08:00
刘祥超
1cf38864de 查询集群列表API增加ID排序 2024-01-21 16:57:22 +08:00
刘祥超
5f9e7e981c 部分部分API文档 2024-01-21 14:40:07 +08:00
刘祥超
7073467128 WAF允许ALLOW动作增加有效范围 2024-01-20 21:26:21 +08:00
刘祥超
adc4b945e7 WAF策略增加显示页面动作默认设置 2024-01-20 16:18:49 +08:00
刘祥超
12f6a1e3ce 默认不支持${serverAddr}变量 2024-01-20 10:04:51 +08:00
刘祥超
4f89360902 优化HLS相关API角色 2024-01-20 10:03:51 +08:00
刘祥超
d422dc6b85 WAF操作符增加“包含SQL注入-严格模式” 2024-01-16 20:42:13 +08:00
刘祥超
0dc678e38a 配置代码增加多媒体 2024-01-14 21:10:52 +08:00
刘祥超
05de67318b 网站设置增加HLS加密功能(商业版本) 2024-01-14 20:32:30 +08:00
刘祥超
575e916088 套餐增加文件最大上传尺寸设置 2024-01-13 19:32:41 +08:00
刘祥超
489795dba0 字符编码设置增加“强制替换”选项 2024-01-13 16:28:45 +08:00
刘祥超
3e8fc126b8 5秒盾增加匹配条件 2024-01-12 17:13:34 +08:00
刘祥超
64c3d76fb2 添加快捷添加和删除网站源站API 2024-01-12 11:48:47 +08:00
刘祥超
3bd3ef5f78 套餐API增加查找套餐基本信息API 2024-01-11 18:41:17 +08:00
刘祥超
827eeeb506 实现批量删除网站功能 2024-01-11 18:41:04 +08:00
刘祥超
36cf357984 变量表达式支持修饰符 2024-01-11 16:41:08 +08:00
刘祥超
46140bbdb5 套餐可以设置带宽限制 2024-01-11 15:22:37 +08:00
刘祥超
6a671f67bc 增加用户系统门户页、文章相关管理 2024-01-09 10:20:29 +08:00
刘祥超
ea991f5a97 TLS选项中取出SSL3.0(golang已经不再支持) 2024-01-06 20:47:48 +08:00
刘祥超
5bcbf29fc6 WAF操作符增加“包含XSS注入-严格模式” 2024-01-04 14:52:47 +08:00
刘祥超
e70d6bb33b 增加列出IP名单中的IP ID列表的API 2023-12-24 10:51:03 +08:00
刘祥超
8a8803cee9 优化WAF“阻止”动作的文字提示 2023-12-24 10:13:37 +08:00
刘祥超
184fbd384e WAF参数中增加“请求来源” 2023-12-24 10:03:01 +08:00
刘祥超
fc3c607c8d 优化IP库GC性能 2023-12-24 09:24:37 +08:00
刘祥超
1760e8b9c8 增加请求脚本审核机制 2023-12-23 20:55:01 +08:00
刘祥超
deea02b1ab 优化编译脚本 2023-12-23 10:04:37 +08:00
刘祥超
7f0822000c 增加多语言编译说明 2023-12-23 09:59:29 +08:00
刘祥超
6a36625bc2 增加多处英文菜单 2023-12-23 09:42:24 +08:00
刘祥超
eca0b997f8 增加套餐相关API/给套餐相关API添加更多注释 2023-12-21 15:09:28 +08:00
刘祥超
8746107b73 增加若干功能代号 2023-12-20 17:35:07 +08:00
刘祥超
729311f605 增加若干API/增加多个网站功能项 2023-12-20 15:09:09 +08:00
刘祥超
99a2801591 修改套餐菜单名 2023-12-19 16:20:07 +08:00
刘祥超
8a045c77c9 套餐增加Websocket连接数限制 2023-12-19 14:57:03 +08:00
刘祥超
619ae043e2 修复多语言消息无法读取参数的问题 2023-12-19 08:29:41 +08:00
刘祥超
9ee5c896d1 缓存设置中可以设置缓存主域名,用来复用多域名下的缓存 2023-12-13 18:41:24 +08:00
刘祥超
4209969214 增加保存管理员语言选择的API 2023-12-12 22:40:16 +08:00
刘祥超
a59c84ef0d 增加多处英文翻译 2023-12-12 12:11:33 +08:00
刘祥超
988aca8d84 部分菜单实现中英文切换 2023-12-12 11:48:19 +08:00
刘祥超
310875f8ec WebP策略变化时只更新相关配置 2023-12-11 11:08:48 +08:00
刘祥超
615fdc24d8 WebP转换质量转移到WebP策略配置 2023-12-11 10:17:46 +08:00
刘祥超
acd78085fa 增加“修改用户界面设置”语言消息 2023-12-10 11:08:11 +08:00
刘祥超
0d90dde90b 用户系统界面设置增加“自定义客户端IP报头” 2023-12-10 10:59:51 +08:00
刘祥超
3996a051ff 修复一处消息提示参数 2023-12-10 10:59:16 +08:00
刘祥超
dd14b4ab3d 管理系统安全设置增加“自定义客户端IP报头” 2023-12-10 10:46:55 +08:00
刘祥超
e50bcdf181 WAF策略模板将部分拦截动作(block)改为显示网页(page) 2023-12-09 19:25:06 +08:00
刘祥超
a145b799a2 优化WAF规则模板 2023-12-09 18:15:27 +08:00
刘祥超
cad0fd5ff2 WAF规则模板中XSS注入检测规则使用“包含XSS注入”操作符替代以往的正则表达式 2023-12-09 17:02:01 +08:00
刘祥超
57c249b791 将WAF策略模板SQL注入默认动作修改为“显示页面” 2023-12-09 15:54:57 +08:00
刘祥超
7ee1cc9cf4 WAF规则模板中SQL注入规则使用“包含SQL注入”操作符替代以往的正则表达式 2023-12-09 15:28:55 +08:00
刘祥超
605b01db64 WAF检查项增加“所有报头名称” 2023-12-08 15:38:21 +08:00
刘祥超
bbe76743b1 将WAF checkpoint中名称和描述部分的Header改为“报头” 2023-12-08 15:15:46 +08:00
刘祥超
53563f040f 优化WAF checkpoint参数文字提示 2023-12-08 15:09:32 +08:00
刘祥超
9226001362 优化部分WAF操作符文字提示 2023-12-08 10:18:38 +08:00
刘祥超
4270c08ab7 WAF增加“包含XSS注入”操作符 2023-12-08 10:15:29 +08:00
刘祥超
671fd5dcc2 WAF增加“包含SQL注入”操作符 2023-12-07 20:24:55 +08:00
刘祥超
e8a3dfba71 修复一处单词拼写错误 2023-12-07 12:14:21 +08:00
刘祥超
ba41c16123 WAF操作符增加包含任一单词、包含所有单词、不包含任一单词 2023-12-07 11:43:34 +08:00
刘祥超
490a17558c 进一步缩短WAF Request Body检查尺寸 2023-12-05 16:53:43 +08:00
刘祥超
61f7a14428 页面优化增加例外URL和限制URL 2023-11-30 15:49:19 +08:00
刘祥超
a7336fafbf 增加“极验-行为验”验证码集成支持 2023-11-29 16:58:24 +08:00
200 changed files with 18844 additions and 6461 deletions

View File

@@ -2,27 +2,27 @@
echo "starting ..."
function assert() {
RESULT=$?
if [ "${RESULT}" != "0" ]; then
exit
fi
}
#rm -f ../pkg/rpc/pb/*.pb.go
protoc --go_out=../pkg/rpc --proto_path=../pkg/rpc/protos ../pkg/rpc/protos/*.proto
RESULT=$?
if [ "${RESULT}" != "0" ]; then
exit
fi
assert
protoc --go-grpc_out=../pkg/rpc --go-grpc_opt=require_unimplemented_servers=false --proto_path=../pkg/rpc/protos ../pkg/rpc/protos/*.proto
RESULT=$?
if [ "${RESULT}" != "0" ]; then
exit
fi
assert
protoc --go_out=../pkg/rpc --proto_path=../pkg/rpc/protos ../pkg/rpc/protos/models/*.proto
RESULT=$?
if [ "${RESULT}" != "0" ]; then
exit
fi
assert
# generate rpc.json
./proto-json.sh --quiet
assert
echo "ok"

File diff suppressed because it is too large Load Diff

View File

@@ -285,9 +285,9 @@ func init() {
}
}
messageMapJSON, err := json.Marshal(filteredMessages)
if err != nil {
fmt.Println("[ERROR]marshal message map failed: " + err.Error())
messageMapJSON, jsonErr := json.Marshal(filteredMessages)
if jsonErr != nil {
fmt.Println("[ERROR]marshal message map failed: " + jsonErr.Error())
return
}
err = os.WriteFile(targetFile, []byte(`// generated by 'langs generate'
@@ -296,6 +296,17 @@ window.LANG_MESSAGES = `+string(messageMapJSON)+";\n"), 0666)
fmt.Println("[ERROR]write file '" + targetFile + "' failed: " + err.Error())
return
}
// base.js
if lang == "zh-cn" {
var baseJSFile = filepath.Dir(targetFile) + "/base.js"
err = os.WriteFile(baseJSFile, []byte(`// generated by 'langs generate'
window.LANG_MESSAGES_BASE = `+string(messageMapJSON)+";\n"), 0666)
if err != nil {
fmt.Println("[ERROR]write file '" + baseJSFile + "' failed: " + err.Error())
return
}
}
}
}
}

18
go.mod
View File

@@ -1,21 +1,19 @@
module github.com/TeaOSLab/EdgeCommon
go 1.18
go 1.21
require (
github.com/golang/protobuf v1.5.2
github.com/iwind/TeaGo v0.0.0-20230623080147-cd1e53b4915f
github.com/tdewolff/minify/v2 v2.12.7
golang.org/x/net v0.8.0
google.golang.org/grpc v1.45.0
google.golang.org/protobuf v1.27.1
golang.org/x/net v0.24.0
google.golang.org/grpc v1.62.0
google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v3 v3.0.1
)
require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/tdewolff/parse/v2 v2.6.6 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 // indirect
)

164
go.sum
View File

@@ -1,156 +1,38 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/iwind/TeaGo v0.0.0-20230623080147-cd1e53b4915f h1:xo6XmXLtveKcwcZAXV6VMxkWNzy/2dStfHEnyowsGAE=
github.com/iwind/TeaGo v0.0.0-20230623080147-cd1e53b4915f/go.mod h1:fi/Pq+/5m2HZoseM+39dMF57ANXRt6w4PkGu3NXPc5s=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/tdewolff/minify/v2 v2.12.7 h1:pBzz2tAfz5VghOXiQIsSta6srhmTeinQPjRDHWoumCA=
github.com/tdewolff/minify/v2 v2.12.7/go.mod h1:ZRKTheiOGyLSK8hOZWWv+YoJAECzDivNgAlVYDHp/Ws=
github.com/tdewolff/parse/v2 v2.6.6 h1:Yld+0CrKUJaCV78DL1G2nk3C9lKrxyRTux5aaK/AkDo=
github.com/tdewolff/parse/v2 v2.6.6/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs=
github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tdewolff/test v1.0.9 h1:SswqJCmeN4B+9gEAi/5uqT0qpi1y2/2O47V/1hhGZT0=
github.com/tdewolff/test v1.0.9/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e h1:fNKDNuUyC4WH+inqDMpfXDdfvwfYILbsX+oskGZ8hxg=
google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641 h1:DKU1r6Tj5s1vlU/moGhuGz7E3xRfwjdAfDzbsaQJtEY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240228224816-df926f6c8641/go.mod h1:UCOku4NytXMJuLQE5VuqA5lX3PcHCBo8pxNyvkf4xBs=
google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk=
google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

View File

@@ -1,41 +1,10 @@
package configutils
import (
"encoding/binary"
"math/big"
"net"
"strings"
)
// IPString2Long 将IP转换为整型
// 注意IPv6没有顺序
func IPString2Long(ip string) uint64 {
if len(ip) == 0 {
return 0
}
var netIP = net.ParseIP(ip)
if len(netIP) == 0 {
return 0
}
return IP2Long(netIP)
}
// IP2Long 将IP对象转换为整型
func IP2Long(netIP net.IP) uint64 {
if len(netIP) == 0 {
return 0
}
var b4 = netIP.To4()
if b4 != nil {
return uint64(binary.BigEndian.Uint32(b4.To4()))
}
var i = big.NewInt(0)
i.SetBytes(netIP.To16())
return i.Uint64()
}
// IsIPv4 检查是否为IPv4
func IsIPv4(netIP net.IP) bool {
if len(netIP) == 0 {
@@ -69,28 +38,6 @@ func IPVersion(netIP net.IP) int {
return 0
}
// ParseCIDR 计算CIDR最大值
func ParseCIDR(cidr string) (ipFrom string, ipTo string, err error) {
_, ipNet, err := net.ParseCIDR(cidr)
if err != nil {
return "", "", err
}
ipFrom = ipNet.IP.String()
Loop:
for i := len(ipNet.Mask) - 1; i >= 0; i-- {
for j := 7; j >= 0; j-- {
var m = ipNet.Mask[i] >> (7 - j) & 1 // 读取某位bit
if m == 0 {
ipNet.IP[i] |= 1 << j // 将此位置为1
} else {
break Loop
}
}
}
ipTo = ipNet.IP.String()
return
}
// QuoteIP 为IPv6加上括号
func QuoteIP(ip string) string {
if len(ip) == 0 {

View File

@@ -3,25 +3,12 @@
package configutils_test
import (
"fmt"
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
"github.com/iwind/TeaGo/assert"
"net"
"testing"
)
func TestParseCIDR(t *testing.T) {
t.Log(configutils.ParseCIDR("192.168.1.1/32"))
t.Log(configutils.ParseCIDR("192.168.1.1/24"))
t.Log(configutils.ParseCIDR("192.168.1.1/16"))
}
func TestIPString2Long(t *testing.T) {
for _, ip := range []string{"127.0.0.1", "192.168.1.100", "::1", "fd00:6868:6868:0:10ac:d056:3bf6:7452", "fd00:6868:6868:0:10ac:d056:3bf6:7453", "2001:0db8:85a3:0000:0000:8a2e:0370:7334", "wrong ip"} {
t.Log(fmt.Sprintf("%42s", ip), "=>", configutils.IPString2Long(ip))
}
}
func TestIsIPv4(t *testing.T) {
t.Log(configutils.IsIPv4(net.ParseIP("192.168.1.100")))
t.Log(configutils.IsIPv4(net.ParseIP("::1")))
@@ -40,7 +27,6 @@ func TestIPVersion(t *testing.T) {
a.IsTrue(configutils.IPVersion(net.ParseIP("2001:0db8:85a3:0000:0000:8a2e:0370:7334")) == 6)
}
func TestQuoteIP(t *testing.T) {
t.Log(configutils.QuoteIP(configutils.QuoteIP("2001:da8:22::10")))
}
}

View File

@@ -1,21 +1,30 @@
package configutils
import (
"crypto/sha1"
"crypto/sha256"
"encoding/base64"
"fmt"
stringutil "github.com/iwind/TeaGo/utils/string"
"net/url"
"regexp"
"strings"
"sync"
)
// VariableHolder 变量信息存储类型
type VariableHolder string
type VariableHolders = []interface{}
type VariableHolder struct {
Param string
Modifiers []string
}
type VariableHolders = []any
var variableMapping = map[string][]interface{}{} // source => [holder1, ...]
var variableLocker = sync.RWMutex{}
var regexpNamedVariable = regexp.MustCompile(`\${[@\w.-]+}`)
var variableMapping = map[string][]any{} // source => [holder1, ...]
var variableLocker = &sync.RWMutex{}
var regexpNamedVariable = regexp.MustCompile(`\${[@\w.|-]+}`)
var stringBuilderPool = sync.Pool{
New: func() interface{} {
New: func() any {
return &strings.Builder{}
},
}
@@ -46,7 +55,11 @@ func ParseVariables(source string, replacer func(varName string) (value string))
var h = holders[0]
holder, ok := h.(VariableHolder)
if ok {
return replacer(string(holder))
var value = replacer(holder.Param)
if holder.Modifiers != nil {
value = doStringModifiers(value, holder.Modifiers)
}
return replacer(value)
}
return source
}
@@ -58,7 +71,11 @@ func ParseVariables(source string, replacer func(varName string) (value string))
for _, h := range holders {
holder, ok := h.(VariableHolder)
if ok {
builder.WriteString(replacer(string(holder)))
var value = replacer(holder.Param)
if holder.Modifiers != nil {
value = doStringModifiers(value, holder.Modifiers)
}
builder.WriteString(value)
} else {
builder.Write(h.([]byte))
}
@@ -86,11 +103,15 @@ func ParseVariablesFromHolders(holders VariableHolders, replacer func(varName st
}
// replace
result := strings.Builder{}
var result = strings.Builder{}
for _, h := range holders {
holder, ok := h.(VariableHolder)
if ok {
result.WriteString(replacer(string(holder)))
var value = replacer(holder.Param)
if holder.Modifiers != nil {
value = doStringModifiers(value, holder.Modifiers)
}
result.WriteString(value)
} else {
result.Write(h.([]byte))
}
@@ -100,12 +121,24 @@ func ParseVariablesFromHolders(holders VariableHolders, replacer func(varName st
// ParseHolders 分析占位
func ParseHolders(source string) (holders VariableHolders) {
indexes := regexpNamedVariable.FindAllStringIndex(source, -1)
before := 0
var indexes = regexpNamedVariable.FindAllStringIndex(source, -1)
var before = 0
for _, loc := range indexes {
holders = append(holders, []byte(source[before:loc[0]]))
holder := source[loc[0]+2 : loc[1]-1]
holders = append(holders, VariableHolder(holder))
var holder = source[loc[0]+2 : loc[1]-1]
if strings.Contains(holder, "|") {
var holderPieces = strings.Split(holder, "|")
holders = append(holders, VariableHolder{
Param: holderPieces[0],
Modifiers: holderPieces[1:],
})
} else {
holders = append(holders, VariableHolder{
Param: holder,
Modifiers: nil,
})
}
before = loc[1]
}
if before < len(source) {
@@ -121,3 +154,36 @@ func HasVariables(source string) bool {
}
return regexpNamedVariable.MatchString(source)
}
// 执行变量后的修饰符
func doStringModifiers(value string, modifiers []string) string {
for _, modifier := range modifiers {
switch modifier {
case "urlEncode":
value = url.QueryEscape(value)
case "urlDecode":
value2, err := url.QueryUnescape(value)
if err == nil {
value = value2
}
case "base64Encode":
value = base64.StdEncoding.EncodeToString([]byte(value))
case "base64Decode":
value2, err := base64.StdEncoding.DecodeString(value)
if err == nil {
value = string(value2)
}
case "md5":
value = stringutil.Md5(value)
case "sha1":
value = fmt.Sprintf("%x", sha1.Sum([]byte(value)))
case "sha256":
value = fmt.Sprintf("%x", sha256.Sum256([]byte(value)))
case "toLowerCase":
value = strings.ToLower(value)
case "toUpperCase":
value = strings.ToUpper(value)
}
}
return value
}

View File

@@ -1,6 +1,8 @@
package configutils
package configutils_test
import (
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
"github.com/iwind/TeaGo/assert"
"github.com/iwind/TeaGo/types"
"runtime"
"strconv"
@@ -8,48 +10,128 @@ import (
)
func TestParseVariables(t *testing.T) {
var a = assert.NewAssertion(t)
{
v := ParseVariables("hello, ${name}, world", func(s string) string {
var v = configutils.ParseVariables("hello, ${name}, world", func(s string) string {
return "Lu"
})
t.Log(v)
a.IsTrue(v == "hello, Lu, world")
}
{
v := ParseVariables("hello, world", func(s string) string {
var v = configutils.ParseVariables("hello, world", func(s string) string {
return "Lu"
})
t.Log(v)
a.IsTrue(v == "hello, world")
}
{
v := ParseVariables("${name}", func(s string) string {
var v = configutils.ParseVariables("${name}", func(s string) string {
return "Lu"
})
t.Log(v)
a.IsTrue(v == "Lu")
}
}
func TestParseNoVariables(t *testing.T) {
for i := 0; i < 2; i++ {
v := ParseVariables("hello, world", func(s string) string {
var v = configutils.ParseVariables("hello, world", func(s string) string {
return "Lu"
})
t.Log(v)
}
}
func TestParseVariables_Modifier(t *testing.T) {
t.Log(configutils.ParseVariables("${url|urlEncode}", func(varName string) (value string) {
switch varName {
case "url":
return "/hello/world?a=1"
}
return "${" + varName + "}"
}))
t.Log(configutils.ParseVariables("${url|urlDecode}", func(varName string) (value string) {
switch varName {
case "url":
return "%2Fhello%2Fworld%3Fa%3D1"
}
return "${" + varName + "}"
}))
t.Log(configutils.ParseVariables("${url|urlDecode|urlEncode}", func(varName string) (value string) {
switch varName {
case "url":
return "%2Fhello%2Fworld%3Fa%3D1"
}
return "${" + varName + "}"
}))
t.Log(configutils.ParseVariables("${var|base64Encode}", func(varName string) (value string) {
switch varName {
case "var":
return "123456"
}
return "${" + varName + "}"
}))
t.Log(configutils.ParseVariables("${var|base64Encode|base64Decode}", func(varName string) (value string) {
switch varName {
case "var":
return "123456"
}
return "${" + varName + "}"
}))
t.Log(configutils.ParseVariables("${var|md5}", func(varName string) (value string) {
switch varName {
case "var":
return "123456"
}
return "${" + varName + "}"
}))
t.Log(configutils.ParseVariables("${var|sha1}", func(varName string) (value string) {
switch varName {
case "var":
return "123456"
}
return "${" + varName + "}"
}))
t.Log(configutils.ParseVariables("${var|sha256}", func(varName string) (value string) {
switch varName {
case "var":
return "123456"
}
return "${" + varName + "}"
}))
t.Log(configutils.ParseVariables("${var|toLowerCase}", func(varName string) (value string) {
switch varName {
case "var":
return "ABC"
}
return "${" + varName + "}"
}))
t.Log(configutils.ParseVariables("${var|toUpperCase}", func(varName string) (value string) {
switch varName {
case "var":
return "abc"
}
return "${" + varName + "}"
}))
}
func TestParseHolders(t *testing.T) {
var holders = ParseHolders("hello, ${name}, world")
var holders = configutils.ParseHolders("hello, ${name|urlencode}, world")
t.Log("===holders begin===")
for _, h := range holders {
t.Log(types.String(h))
}
t.Log("===holders end===")
t.Log("parse result:", ParseVariablesFromHolders(holders, func(s string) string {
t.Log("parse result:", configutils.ParseVariablesFromHolders(holders, func(s string) string {
return "[" + s + "]"
}))
}
func BenchmarkParseVariables(b *testing.B) {
_ = ParseVariables("hello, ${name}, ${age}, ${gender}, ${home}, world", func(s string) string {
_ = configutils.ParseVariables("hello, ${name}, ${age}, ${gender}, ${home}, world", func(s string) string {
return "Lu"
})
@@ -57,7 +139,7 @@ func BenchmarkParseVariables(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
_ = ParseVariables("hello, ${name}, ${age}, ${gender}, ${home}, world", func(s string) string {
_ = configutils.ParseVariables("hello, ${name}, ${age}, ${gender}, ${home}, world", func(s string) string {
return "Lu"
})
}
@@ -65,10 +147,10 @@ func BenchmarkParseVariables(b *testing.B) {
}
func BenchmarkParseVariablesFromHolders(b *testing.B) {
var holders = ParseHolders("hello, ${name}, ${age}, ${gender}, ${home}, world")
var holders = configutils.ParseHolders("hello, ${name}, ${age}, ${gender}, ${home}, world")
for i := 0; i < b.N; i++ {
_ = ParseVariablesFromHolders(holders, func(s string) string {
_ = configutils.ParseVariablesFromHolders(holders, func(s string) string {
return "Lu"
})
}
@@ -76,7 +158,7 @@ func BenchmarkParseVariablesFromHolders(b *testing.B) {
func BenchmarkParseVariablesUnique(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = ParseVariables("hello, ${name} "+strconv.Itoa(i), func(s string) string {
_ = configutils.ParseVariables("hello, ${name} "+strconv.Itoa(i%100_000), func(s string) string {
return "Lu"
})
}
@@ -86,7 +168,7 @@ func BenchmarkParseVariablesUnique_Single(b *testing.B) {
runtime.GOMAXPROCS(1)
for i := 0; i < b.N; i++ {
_ = ParseVariables("${name}", func(s string) string {
_ = configutils.ParseVariables("${name}", func(s string) string {
return "Lu"
})
}
@@ -94,7 +176,7 @@ func BenchmarkParseVariablesUnique_Single(b *testing.B) {
func BenchmarkParseNoVariables(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = ParseVariables("hello, world", func(s string) string {
_ = configutils.ParseVariables("hello, world", func(s string) string {
return "Lu"
})
}
@@ -102,7 +184,7 @@ func BenchmarkParseNoVariables(b *testing.B) {
func BenchmarkParseEmpty(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = ParseVariables("", func(s string) string {
_ = configutils.ParseVariables("", func(s string) string {
return "Lu"
})
}

View File

@@ -1 +1,2 @@
*-plus.db
*-plus.db
internal-ip-library-test.db

View File

@@ -33,7 +33,7 @@ func InitDefault() error {
}
var library = NewIPLibrary()
err := library.InitFromData(ipLibraryData, "")
err := library.InitFromData(ipLibraryData, "", ReaderVersionV1)
if err != nil {
return err
}
@@ -66,18 +66,18 @@ func LookupIPSummaries(ipList []string) map[string]string /** ip => summary **/
}
type IPLibrary struct {
reader *Reader
reader ReaderInterface
}
func NewIPLibrary() *IPLibrary {
return &IPLibrary{}
}
func NewIPLibraryWithReader(reader *Reader) *IPLibrary {
func NewIPLibraryWithReader(reader ReaderInterface) *IPLibrary {
return &IPLibrary{reader: reader}
}
func (this *IPLibrary) InitFromData(data []byte, password string) error {
func (this *IPLibrary) InitFromData(data []byte, password string, version ReaderVersion) error {
if len(data) == 0 || this.reader != nil {
return nil
}
@@ -99,7 +99,12 @@ func (this *IPLibrary) InitFromData(data []byte, password string) error {
_ = gzipReader.Close()
}()
libReader, err := NewReader(gzipReader)
var libReader ReaderInterface
if version == ReaderVersionV2 {
libReader, err = NewReaderV2(gzipReader)
} else {
libReader, err = NewReaderV1(gzipReader)
}
if err != nil {
return err
}

View File

@@ -15,7 +15,7 @@ import (
func TestIPLibrary_Init(t *testing.T) {
var lib = iplibrary.NewIPLibrary()
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "", iplibrary.ReaderVersionV1)
if err != nil {
t.Fatal(err)
}
@@ -38,7 +38,7 @@ func TestIPLibrary_Lookup(t *testing.T) {
var before = time.Now()
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "", iplibrary.ReaderVersionV1)
if err != nil {
t.Fatal(err)
}
@@ -69,7 +69,7 @@ func TestIPLibrary_Lookup(t *testing.T) {
func TestIPLibrary_LookupIP(t *testing.T) {
var lib = iplibrary.NewIPLibrary()
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "", iplibrary.ReaderVersionV1)
if err != nil {
t.Fatal(err)
}
@@ -88,7 +88,7 @@ func TestIPLibrary_LookupIP(t *testing.T) {
func TestIPLibrary_LookupIP_Summary(t *testing.T) {
var lib = iplibrary.NewIPLibrary()
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "", iplibrary.ReaderVersionV1)
if err != nil {
t.Fatal(err)
}
@@ -123,7 +123,7 @@ func TestIPLibrary_LookupIPSummaries(t *testing.T) {
func BenchmarkIPLibrary_Lookup(b *testing.B) {
var lib = iplibrary.NewIPLibrary()
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "")
err := lib.InitFromData(iplibrary.DefaultIPLibraryData(), "", iplibrary.ReaderVersionV1)
if err != nil {
b.Fatal(err)
}

View File

@@ -6,20 +6,34 @@ import (
"github.com/iwind/TeaGo/types"
)
type ipv4Item struct {
type ipv4ItemV1 struct {
IPFrom uint32
IPTo uint32
Region *ipRegion
}
type ipv6Item struct {
type ipv6ItemV1 struct {
IPFrom uint64
IPTo uint64
Region *ipRegion
}
type ipv4ItemV2 struct {
IPFrom [4]byte
IPTo [4]byte
Region *ipRegion
}
type ipv6ItemV2 struct {
IPFrom [16]byte
IPTo [16]byte
Region *ipRegion
}
type ipRegion struct {
CountryId uint16
ProvinceId uint16

View File

@@ -4,11 +4,14 @@ package iplibrary
import (
"bytes"
"encoding/binary"
"encoding/json"
"errors"
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
"io"
"math/big"
"net"
"runtime"
"sort"
"strconv"
"strings"
@@ -20,8 +23,8 @@ type Reader struct {
regionMap map[string]*ipRegion // 缓存重复的区域用来节约内存
ipV4Items []*ipv4Item
ipV6Items []*ipv6Item
ipV4Items []ipv4ItemV1
ipV6Items []ipv6ItemV1
lastIPFrom uint64
lastCountryId uint16
@@ -31,11 +34,18 @@ type Reader struct {
lastProviderId uint16
}
// NewReader 创建新Reader对象
func NewReader(reader io.Reader) (*Reader, error) {
// NewReaderV1 创建新Reader对象
func NewReaderV1(reader io.Reader) (*Reader, error) {
var libReader = &Reader{
regionMap: map[string]*ipRegion{},
}
if runtime.NumCPU() >= 4 /** CPU数量较多的通常有着大内存 **/ {
libReader.ipV4Items = make([]ipv4ItemV1, 0, 6_000_000)
} else {
libReader.ipV4Items = make([]ipv4ItemV1, 0, 600_000)
}
err := libReader.load(reader)
if err != nil {
return nil, err
@@ -123,7 +133,7 @@ func (this *Reader) Lookup(ip net.IP) *QueryResult {
return &QueryResult{}
}
var ipLong = configutils.IP2Long(ip)
var ipLong = this.ip2long(ip)
var isV4 = configutils.IsIPv4(ip)
var resultItem any
if isV4 {
@@ -162,11 +172,11 @@ func (this *Reader) Meta() *Meta {
return this.meta
}
func (this *Reader) IPv4Items() []*ipv4Item {
func (this *Reader) IPv4Items() []ipv4ItemV1 {
return this.ipV4Items
}
func (this *Reader) IPv6Items() []*ipv6Item {
func (this *Reader) IPv6Items() []ipv6ItemV1 {
return this.ipV6Items
}
@@ -296,13 +306,13 @@ func (this *Reader) parseLine(line []byte) error {
}
if version == "4" {
this.ipV4Items = append(this.ipV4Items, &ipv4Item{
this.ipV4Items = append(this.ipV4Items, ipv4ItemV1{
IPFrom: uint32(ipFrom),
IPTo: uint32(ipTo),
Region: region,
})
} else {
this.ipV6Items = append(this.ipV6Items, &ipv6Item{
this.ipV6Items = append(this.ipV6Items, ipv6ItemV1{
IPFrom: ipFrom,
IPTo: ipTo,
Region: region,
@@ -320,3 +330,18 @@ func (this *Reader) decodeUint64(s string) uint64 {
i, _ := strconv.ParseUint(s, 10, 64)
return i
}
func (this *Reader) ip2long(netIP net.IP) uint64 {
if len(netIP) == 0 {
return 0
}
var b4 = netIP.To4()
if b4 != nil {
return uint64(binary.BigEndian.Uint32(b4.To4()))
}
var i = big.NewInt(0)
i.SetBytes(netIP.To16())
return i.Uint64()
}

View File

@@ -9,10 +9,12 @@ import (
"io"
"net"
"os"
"path/filepath"
"strings"
)
type FileReader struct {
rawReader *Reader
rawReader ReaderInterface
//password string
}
@@ -25,10 +27,15 @@ func NewFileReader(path string, password string) (*FileReader, error) {
_ = fp.Close()
}()
return NewFileDataReader(fp, password)
var version = ReaderVersionV1
if strings.HasSuffix(filepath.Base(path), ".v2.db") {
version = ReaderVersionV2
}
return NewFileDataReader(fp, password, version)
}
func NewFileDataReader(dataReader io.Reader, password string) (*FileReader, error) {
func NewFileDataReader(dataReader io.Reader, password string, readerVersion ReaderVersion) (*FileReader, error) {
if len(password) > 0 {
data, err := io.ReadAll(dataReader)
if err != nil {
@@ -48,7 +55,12 @@ func NewFileDataReader(dataReader io.Reader, password string) (*FileReader, erro
return nil, fmt.Errorf("create gzip reader failed: %w", err)
}
reader, err := NewReader(gzReader)
var reader ReaderInterface
if readerVersion == ReaderVersionV2 {
reader, err = NewReaderV2(gzReader)
} else {
reader, err = NewReaderV1(gzReader)
}
if err != nil {
return nil, err
}
@@ -59,13 +71,13 @@ func NewFileDataReader(dataReader io.Reader, password string) (*FileReader, erro
}
func (this *FileReader) Meta() *Meta {
return this.rawReader.meta
return this.rawReader.Meta()
}
func (this *FileReader) Lookup(ip net.IP) *QueryResult {
return this.rawReader.Lookup(ip)
}
func (this *FileReader) RawReader() *Reader {
func (this *FileReader) RawReader() ReaderInterface {
return this.rawReader
}

View File

@@ -6,12 +6,13 @@ import (
"encoding/json"
"github.com/TeaOSLab/EdgeCommon/pkg/iplibrary"
"github.com/iwind/TeaGo/maps"
stringutil "github.com/iwind/TeaGo/utils/string"
"net"
"testing"
)
func TestNewFileReader(t *testing.T) {
reader, err := iplibrary.NewFileReader("./ip-20c1461c.db", "123456")
reader, err := iplibrary.NewFileReader("./default_ip_library_plus_test.go", stringutil.Md5("123456"))
if err != nil {
t.Fatal(err)
}

View File

@@ -0,0 +1,18 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package iplibrary
import "net"
type ReaderVersion = int
const (
ReaderVersionV1 ReaderVersion = 0
ReaderVersionV2 ReaderVersion = 2
)
type ReaderInterface interface {
Meta() *Meta
Lookup(ip net.IP) *QueryResult
Destroy()
}

View File

@@ -213,9 +213,21 @@ func (this *QueryResult) RegionSummary() string {
func (this *QueryResult) realCountryId() uint16 {
if this.item != nil {
switch item := this.item.(type) {
case *ipv4Item:
case *ipv4ItemV1:
return item.Region.CountryId
case *ipv6Item:
case ipv4ItemV1:
return item.Region.CountryId
case *ipv6ItemV1:
return item.Region.CountryId
case ipv6ItemV1:
return item.Region.CountryId
case *ipv4ItemV2:
return item.Region.CountryId
case ipv4ItemV2:
return item.Region.CountryId
case *ipv6ItemV2:
return item.Region.CountryId
case ipv6ItemV2:
return item.Region.CountryId
}
@@ -226,9 +238,21 @@ func (this *QueryResult) realCountryId() uint16 {
func (this *QueryResult) realProvinceId() uint16 {
if this.item != nil {
switch item := this.item.(type) {
case *ipv4Item:
case *ipv4ItemV1:
return item.Region.ProvinceId
case *ipv6Item:
case ipv4ItemV1:
return item.Region.ProvinceId
case *ipv6ItemV1:
return item.Region.ProvinceId
case ipv6ItemV1:
return item.Region.ProvinceId
case *ipv4ItemV2:
return item.Region.ProvinceId
case ipv4ItemV2:
return item.Region.ProvinceId
case *ipv6ItemV2:
return item.Region.ProvinceId
case ipv6ItemV2:
return item.Region.ProvinceId
}
@@ -239,9 +263,21 @@ func (this *QueryResult) realProvinceId() uint16 {
func (this *QueryResult) realCityId() uint32 {
if this.item != nil {
switch item := this.item.(type) {
case *ipv4Item:
case *ipv4ItemV1:
return item.Region.CityId
case *ipv6Item:
case ipv4ItemV1:
return item.Region.CityId
case *ipv6ItemV1:
return item.Region.CityId
case ipv6ItemV1:
return item.Region.CityId
case *ipv4ItemV2:
return item.Region.CityId
case ipv4ItemV2:
return item.Region.CityId
case *ipv6ItemV2:
return item.Region.CityId
case ipv6ItemV2:
return item.Region.CityId
}
@@ -252,9 +288,21 @@ func (this *QueryResult) realCityId() uint32 {
func (this *QueryResult) realTownId() uint32 {
if this.item != nil {
switch item := this.item.(type) {
case *ipv4Item:
case *ipv4ItemV1:
return item.Region.TownId
case *ipv6Item:
case ipv4ItemV1:
return item.Region.TownId
case *ipv6ItemV1:
return item.Region.TownId
case ipv6ItemV1:
return item.Region.TownId
case *ipv4ItemV2:
return item.Region.TownId
case ipv4ItemV2:
return item.Region.TownId
case *ipv6ItemV2:
return item.Region.TownId
case ipv6ItemV2:
return item.Region.TownId
}
@@ -265,9 +313,21 @@ func (this *QueryResult) realTownId() uint32 {
func (this *QueryResult) realProviderId() uint16 {
if this.item != nil {
switch item := this.item.(type) {
case *ipv4Item:
case *ipv4ItemV1:
return item.Region.ProviderId
case *ipv6Item:
case ipv4ItemV1:
return item.Region.ProviderId
case *ipv6ItemV1:
return item.Region.ProviderId
case ipv6ItemV1:
return item.Region.ProviderId
case *ipv4ItemV2:
return item.Region.ProviderId
case ipv4ItemV2:
return item.Region.ProviderId
case *ipv6ItemV2:
return item.Region.ProviderId
case ipv6ItemV2:
return item.Region.ProviderId
}

View File

@@ -16,7 +16,7 @@ import (
func TestNewReader(t *testing.T) {
var buf = &bytes.Buffer{}
var writer = iplibrary.NewWriter(buf, &iplibrary.Meta{
var writer = iplibrary.NewWriterV1(buf, &iplibrary.Meta{
Author: "GoEdge <https://goedge.cn>",
})
@@ -63,7 +63,7 @@ func TestNewReader(t *testing.T) {
var stat = &runtime.MemStats{}
runtime.ReadMemStats(stat)
reader, err := iplibrary.NewReader(buf)
reader, err := iplibrary.NewReaderV2(buf)
var stat2 = &runtime.MemStats{}
runtime.ReadMemStats(stat2)
@@ -115,7 +115,7 @@ func BenchmarkNewReader(b *testing.B) {
runtime.GOMAXPROCS(1)
var buf = &bytes.Buffer{}
var writer = iplibrary.NewWriter(buf, &iplibrary.Meta{
var writer = iplibrary.NewWriterV1(buf, &iplibrary.Meta{
Author: "GoEdge <https://goedge.cn>",
})
@@ -135,7 +135,7 @@ func BenchmarkNewReader(b *testing.B) {
}
}
reader, err := iplibrary.NewReader(buf)
reader, err := iplibrary.NewReaderV2(buf)
if err != nil {
b.Fatal(err)
}

360
pkg/iplibrary/reader_v2.go Normal file
View File

@@ -0,0 +1,360 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
package iplibrary
import (
"bytes"
"encoding/json"
"errors"
"io"
"net"
"runtime"
"sort"
"strconv"
"strings"
)
// ReaderV2 IP库Reader V2
type ReaderV2 struct {
meta *Meta
regionMap map[string]*ipRegion // 缓存重复的区域用来节约内存
ipV4Items []ipv4ItemV2
ipV6Items []ipv6ItemV2
lastCountryId uint16
lastProvinceId uint16
lastCityId uint32
lastTownId uint32
lastProviderId uint16
}
// NewReaderV2 创建新Reader对象
func NewReaderV2(reader io.Reader) (*ReaderV2, error) {
var libReader = &ReaderV2{
regionMap: map[string]*ipRegion{},
}
if runtime.NumCPU() >= 4 /** CPU数量较多的通常有着大内存 **/ {
libReader.ipV4Items = make([]ipv4ItemV2, 0, 6_000_000)
} else {
libReader.ipV4Items = make([]ipv4ItemV2, 0, 600_000)
}
err := libReader.load(reader)
if err != nil {
return nil, err
}
return libReader, nil
}
// 从Reader中加载数据
func (this *ReaderV2) load(reader io.Reader) error {
var buf = make([]byte, 1024)
var metaLine []byte
var metaLineFound = false
var dataBuf = []byte{}
for {
n, err := reader.Read(buf)
if n > 0 {
var data = buf[:n]
dataBuf = append(dataBuf, data...)
if metaLineFound {
left, err := this.parse(dataBuf)
if err != nil {
return err
}
dataBuf = left
} else {
var index = bytes.IndexByte(dataBuf, '\n')
if index > 0 {
metaLine = dataBuf[:index]
dataBuf = dataBuf[index+1:]
metaLineFound = true
var meta = &Meta{}
err = json.Unmarshal(metaLine, &meta)
if err != nil {
return err
}
meta.Init()
this.meta = meta
left, err := this.parse(dataBuf)
if err != nil {
return err
}
dataBuf = left
}
}
}
if err != nil {
if err != io.EOF {
return err
}
break
}
}
sort.Slice(this.ipV4Items, func(i, j int) bool {
var from0 = this.ipV4Items[i].IPFrom
var to0 = this.ipV4Items[i].IPTo
var from1 = this.ipV4Items[j].IPFrom
var to1 = this.ipV4Items[j].IPTo
if from0 == from1 {
return bytes.Compare(to0[:], to1[:]) < 0
}
return bytes.Compare(from0[:], from1[:]) < 0
})
sort.Slice(this.ipV6Items, func(i, j int) bool {
var from0 = this.ipV6Items[i].IPFrom
var to0 = this.ipV6Items[i].IPTo
var from1 = this.ipV6Items[j].IPFrom
var to1 = this.ipV6Items[j].IPTo
if from0 == from1 {
return bytes.Compare(to0[:], to1[:]) < 0
}
return bytes.Compare(from0[:], from1[:]) < 0
})
// 清理内存
this.regionMap = nil
return nil
}
func (this *ReaderV2) Lookup(ip net.IP) *QueryResult {
if ip == nil {
return &QueryResult{}
}
var isV4 = ip.To4() != nil
var resultItem any
if isV4 {
sort.Search(len(this.ipV4Items), func(i int) bool {
var item = this.ipV4Items[i]
if bytes.Compare(item.IPFrom[:], ip) <= 0 {
if bytes.Compare(item.IPTo[:], ip) >= 0 {
resultItem = item
return false
}
return false
}
return true
})
} else {
sort.Search(len(this.ipV6Items), func(i int) bool {
var item = this.ipV6Items[i]
if bytes.Compare(item.IPFrom[:], ip) <= 0 {
if bytes.Compare(item.IPTo[:], ip) >= 0 {
resultItem = item
return false
}
return false
}
return true
})
}
return &QueryResult{
item: resultItem,
meta: this.meta,
}
}
func (this *ReaderV2) Meta() *Meta {
return this.meta
}
func (this *ReaderV2) IPv4Items() []ipv4ItemV2 {
return this.ipV4Items
}
func (this *ReaderV2) IPv6Items() []ipv6ItemV2 {
return this.ipV6Items
}
func (this *ReaderV2) Destroy() {
this.meta = nil
this.regionMap = nil
this.ipV4Items = nil
this.ipV6Items = nil
}
// 分析数据
func (this *ReaderV2) parse(data []byte) (left []byte, err error) {
if len(data) == 0 {
return
}
for {
if len(data) == 0 {
break
}
var offset int
if data[0] == '|' {
offset = 1 + 8 + 1
} else if data[0] == '4' {
offset = 2 + 8 + 1
} else if data[0] == '6' {
offset = 2 + 32 + 1
}
var index = bytes.IndexByte(data[offset:], '\n')
if index >= 0 {
index += offset
var line = data[:index]
err = this.parseLine(line)
if err != nil {
return nil, err
}
data = data[index+1:]
} else {
left = data
break
}
}
return
}
// 单行分析
func (this *ReaderV2) parseLine(line []byte) error {
if len(line) == 0 {
return nil
}
const maxPieces = 8
var pieces []string
var offset int
if line[0] == '|' {
offset = 1 + 8 + 1
pieces = append(pieces, "", string(line[1:5]), string(line[5:9]))
} else if line[0] == '4' {
offset = 2 + 8 + 1
pieces = append(pieces, "", string(line[2:6]), string(line[6:10]))
} else if line[0] == '6' {
offset = 2 + 32 + 1
pieces = append(pieces, "6", string(line[2:18]), string(line[18:34]))
}
pieces = append(pieces, strings.Split(string(line[offset:]), "|")...)
var countPieces = len(pieces)
if countPieces < maxPieces { // 补足一行
for i := 0; i < maxPieces-countPieces; i++ {
pieces = append(pieces, "")
}
} else if countPieces > maxPieces {
return errors.New("invalid ip definition '" + string(line) + "'")
}
var version = pieces[0]
if len(version) == 0 {
version = "4"
}
if version != "4" && version != "6" {
return errors.New("invalid ip version '" + string(line) + "'")
}
// ip range
var ipFromV4 [4]byte
var ipToV4 [4]byte
var ipFromV6 [16]byte
var ipToV6 [16]byte
if version == "6" {
ipFromV6 = [16]byte([]byte(pieces[1]))
ipToV6 = [16]byte([]byte(pieces[2]))
} else {
ipFromV4 = [4]byte([]byte(pieces[1]))
ipToV4 = [4]byte([]byte(pieces[2]))
}
// country
var countryId uint16
if pieces[3] == "+" {
countryId = this.lastCountryId
} else {
countryId = uint16(this.decodeUint64(pieces[3]))
}
this.lastCountryId = countryId
var provinceId uint16
if pieces[4] == "+" {
provinceId = this.lastProvinceId
} else {
provinceId = uint16(this.decodeUint64(pieces[4]))
}
this.lastProvinceId = provinceId
// city
var cityId uint32
if pieces[5] == "+" {
cityId = this.lastCityId
} else {
cityId = uint32(this.decodeUint64(pieces[5]))
}
this.lastCityId = cityId
// town
var townId uint32
if pieces[6] == "+" {
townId = this.lastTownId
} else {
townId = uint32(this.decodeUint64(pieces[6]))
}
this.lastTownId = townId
// provider
var providerId uint16
if pieces[7] == "+" {
providerId = this.lastProviderId
} else {
providerId = uint16(this.decodeUint64(pieces[7]))
}
this.lastProviderId = providerId
var hash = HashRegion(countryId, provinceId, cityId, townId, providerId)
region, ok := this.regionMap[hash]
if !ok {
region = &ipRegion{
CountryId: countryId,
ProvinceId: provinceId,
CityId: cityId,
TownId: townId,
ProviderId: providerId,
}
this.regionMap[hash] = region
}
if version == "4" {
this.ipV4Items = append(this.ipV4Items, ipv4ItemV2{
IPFrom: ipFromV4,
IPTo: ipToV4,
Region: region,
})
} else {
this.ipV6Items = append(this.ipV6Items, ipv6ItemV2{
IPFrom: ipFromV6,
IPTo: ipToV6,
Region: region,
})
}
return nil
}
func (this *ReaderV2) decodeUint64(s string) uint64 {
if this.meta != nil && this.meta.Version == Version2 {
i, _ := strconv.ParseUint(s, 32, 64)
return i
}
i, _ := strconv.ParseUint(s, 10, 64)
return i
}

View File

@@ -214,7 +214,12 @@ func (this *Updater) Loop() error {
func (this *Updater) loadFile(fp *os.File) error {
this.source.LogInfo("load ip library from '" + fp.Name() + "' ...")
fileReader, err := NewFileDataReader(fp, "")
var version = ReaderVersionV1
if strings.HasSuffix(fp.Name(), ".v2.db") {
version = ReaderVersionV2
}
fileReader, err := NewFileDataReader(fp, "", version)
if err != nil {
return fmt.Errorf("load ip library from reader failed: %w", err)
}

View File

@@ -3,42 +3,19 @@
package iplibrary
import (
"crypto/md5"
"encoding/binary"
"encoding/json"
"errors"
"fmt"
"github.com/TeaOSLab/EdgeCommon/pkg/configutils"
"hash"
"io"
"math/big"
"net"
"strconv"
"strings"
"time"
)
type hashWriter struct {
rawWriter io.Writer
hash hash.Hash
}
func newHashWriter(writer io.Writer) *hashWriter {
return &hashWriter{
rawWriter: writer,
hash: md5.New(),
}
}
func (this *hashWriter) Write(p []byte) (n int, err error) {
n, err = this.rawWriter.Write(p)
this.hash.Write(p)
return
}
func (this *hashWriter) Sum() string {
return fmt.Sprintf("%x", this.hash.Sum(nil))
}
type Writer struct {
type WriterV1 struct {
writer *hashWriter
meta *Meta
@@ -50,21 +27,21 @@ type Writer struct {
lastProviderId int64
}
func NewWriter(writer io.Writer, meta *Meta) *Writer {
func NewWriterV1(writer io.Writer, meta *Meta) *WriterV1 {
if meta == nil {
meta = &Meta{}
}
meta.Version = Version2
meta.CreatedAt = time.Now().Unix()
var libWriter = &Writer{
var libWriter = &WriterV1{
writer: newHashWriter(writer),
meta: meta,
}
return libWriter
}
func (this *Writer) WriteMeta() error {
func (this *WriterV1) WriteMeta() error {
metaJSON, err := json.Marshal(this.meta)
if err != nil {
return err
@@ -77,7 +54,7 @@ func (this *Writer) WriteMeta() error {
return err
}
func (this *Writer) Write(ipFrom string, ipTo string, countryId int64, provinceId int64, cityId int64, townId int64, providerId int64) error {
func (this *WriterV1) Write(ipFrom string, ipTo string, countryId int64, provinceId int64, cityId int64, townId int64, providerId int64) error {
// validate IP
var fromIP = net.ParseIP(ipFrom)
if fromIP == nil {
@@ -100,11 +77,14 @@ func (this *Writer) Write(ipFrom string, ipTo string, countryId int64, provinceI
pieces = append(pieces, "")
} else {
pieces = append(pieces, "6")
// we do NOT support v6 yet
return nil
}
// 1
var fromIPLong = configutils.IP2Long(fromIP)
var toIPLong = configutils.IP2Long(toIP)
var fromIPLong = this.ip2long(fromIP)
var toIPLong = this.ip2long(toIP)
if toIPLong < fromIPLong {
fromIPLong, toIPLong = toIPLong, fromIPLong
@@ -193,10 +173,25 @@ func (this *Writer) Write(ipFrom string, ipTo string, countryId int64, provinceI
return err
}
func (this *Writer) Sum() string {
func (this *WriterV1) Sum() string {
return this.writer.Sum()
}
func (this *Writer) formatUint64(i uint64) string {
func (this *WriterV1) formatUint64(i uint64) string {
return strconv.FormatUint(i, 32)
}
func (this *WriterV1) ip2long(netIP net.IP) uint64 {
if len(netIP) == 0 {
return 0
}
var b4 = netIP.To4()
if b4 != nil {
return uint64(binary.BigEndian.Uint32(b4.To4()))
}
var i = big.NewInt(0)
i.SetBytes(netIP.To16())
return i.Uint64()
}

View File

@@ -12,7 +12,7 @@ type FileWriter struct {
gzWriter *gzip.Writer
password string
rawWriter *Writer
rawWriter WriterInterface
}
func NewFileWriter(path string, meta *Meta, password string) (*FileWriter, error) {
@@ -29,7 +29,7 @@ func NewFileWriter(path string, meta *Meta, password string) (*FileWriter, error
var writer = &FileWriter{
fp: fp,
gzWriter: gzWriter,
rawWriter: NewWriter(gzWriter, meta),
rawWriter: NewWriterV1(gzWriter, meta),
password: password,
}
return writer, nil
@@ -64,11 +64,13 @@ func (this *FileWriter) Close() error {
if err != nil {
return err
}
if len(data) > 0 {
encodedData, err := NewEncrypt().Encode(data, this.password)
if err != nil {
return err
encodedData, encodeErr := NewEncrypt().Encode(data, this.password)
if encodeErr != nil {
return encodeErr
}
_ = os.Remove(filePath)
err = os.WriteFile(filePath, encodedData, 0666)
if err != nil {
return err

View File

@@ -6,13 +6,14 @@ import (
"github.com/TeaOSLab/EdgeCommon/pkg/iplibrary"
"github.com/iwind/TeaGo/rands"
"github.com/iwind/TeaGo/types"
stringutil "github.com/iwind/TeaGo/utils/string"
"testing"
)
func TestNewFileWriter(t *testing.T) {
writer, err := iplibrary.NewFileWriter("./internal-ip-library-test.db", &iplibrary.Meta{
Author: "GoEdge",
}, "")
}, stringutil.Md5("123456"))
if err != nil {
t.Fatal(err)
}

View File

@@ -0,0 +1,9 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package iplibrary
type WriterInterface interface {
WriteMeta() error
Write(ipFrom string, ipTo string, countryId int64, provinceId int64, cityId int64, townId int64, providerId int64) error
Sum() string
}

190
pkg/iplibrary/writer_v2.go Normal file
View File

@@ -0,0 +1,190 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
package iplibrary
import (
"bytes"
"crypto/md5"
"encoding/json"
"errors"
"fmt"
"hash"
"io"
"net"
"strconv"
"strings"
"time"
)
type hashWriter struct {
rawWriter io.Writer
hash hash.Hash
}
func newHashWriter(writer io.Writer) *hashWriter {
return &hashWriter{
rawWriter: writer,
hash: md5.New(),
}
}
func (this *hashWriter) Write(p []byte) (n int, err error) {
n, err = this.rawWriter.Write(p)
this.hash.Write(p)
return
}
func (this *hashWriter) Sum() string {
return fmt.Sprintf("%x", this.hash.Sum(nil))
}
type WriterV2 struct {
writer *hashWriter
meta *Meta
lastCountryId int64
lastProvinceId int64
lastCityId int64
lastTownId int64
lastProviderId int64
}
func NewWriterV2(writer io.Writer, meta *Meta) *WriterV2 {
if meta == nil {
meta = &Meta{}
}
meta.Version = Version2
meta.CreatedAt = time.Now().Unix()
var libWriter = &WriterV2{
writer: newHashWriter(writer),
meta: meta,
}
return libWriter
}
func (this *WriterV2) WriteMeta() error {
metaJSON, err := json.Marshal(this.meta)
if err != nil {
return err
}
_, err = this.writer.Write(metaJSON)
if err != nil {
return err
}
_, err = this.writer.Write([]byte("\n"))
return err
}
func (this *WriterV2) Write(ipFrom string, ipTo string, countryId int64, provinceId int64, cityId int64, townId int64, providerId int64) error {
// validate IP
var fromIP = net.ParseIP(ipFrom)
if fromIP == nil {
return errors.New("invalid 'ipFrom': '" + ipFrom + "'")
}
var fromIsIPv4 = fromIP.To4() != nil
var toIP = net.ParseIP(ipTo)
if toIP == nil {
return errors.New("invalid 'ipTo': " + ipTo)
}
var toIsIPv4 = toIP.To4() != nil
if fromIsIPv4 != toIsIPv4 {
return errors.New("'ipFrom(" + ipFrom + ")' and 'ipTo(" + ipTo + ")' should have the same IP version")
}
var pieces = []string{}
// 0
if fromIsIPv4 {
pieces = append(pieces, "")
} else {
pieces = append(pieces, "6")
}
// 1
if bytes.Compare(fromIP, toIP) > 0 {
fromIP, toIP = toIP, fromIP
}
if fromIsIPv4 {
pieces = append(pieces, string(fromIP.To4())+string(toIP.To4()))
} else {
pieces = append(pieces, string(fromIP.To16())+string(toIP.To16()))
}
// 2
if countryId > 0 {
if countryId == this.lastCountryId {
pieces = append(pieces, "+")
} else {
pieces = append(pieces, this.formatUint64(uint64(countryId)))
}
} else {
pieces = append(pieces, "")
}
this.lastCountryId = countryId
// 3
if provinceId > 0 {
if provinceId == this.lastProvinceId {
pieces = append(pieces, "+")
} else {
pieces = append(pieces, this.formatUint64(uint64(provinceId)))
}
} else {
pieces = append(pieces, "")
}
this.lastProvinceId = provinceId
// 4
if cityId > 0 {
if cityId == this.lastCityId {
pieces = append(pieces, "+")
} else {
pieces = append(pieces, this.formatUint64(uint64(cityId)))
}
} else {
pieces = append(pieces, "")
}
this.lastCityId = cityId
// 5
if townId > 0 {
if townId == this.lastTownId {
pieces = append(pieces, "+")
} else {
pieces = append(pieces, this.formatUint64(uint64(townId)))
}
} else {
pieces = append(pieces, "")
}
this.lastTownId = townId
// 6
if providerId > 0 {
if providerId == this.lastProviderId {
pieces = append(pieces, "+")
} else {
pieces = append(pieces, this.formatUint64(uint64(providerId)))
}
} else {
pieces = append(pieces, "")
}
this.lastProviderId = providerId
_, err := this.writer.Write([]byte(strings.TrimRight(strings.Join(pieces, "|"), "|")))
if err != nil {
return err
}
_, err = this.writer.Write([]byte("\n"))
return err
}
func (this *WriterV2) Sum() string {
return this.writer.Sum()
}
func (this *WriterV2) formatUint64(i uint64) string {
return strconv.FormatUint(i, 32)
}

View File

@@ -5,12 +5,14 @@ package iplibrary_test
import (
"bytes"
"github.com/TeaOSLab/EdgeCommon/pkg/iplibrary"
"github.com/iwind/TeaGo/logs"
"testing"
)
func TestNewWriter(t *testing.T) {
//write
var buf = &bytes.Buffer{}
var writer = iplibrary.NewWriter(buf, &iplibrary.Meta{
var writer = iplibrary.NewWriterV1(buf, &iplibrary.Meta{
Author: "GoEdge <https://goedge.cn>",
})
@@ -39,6 +41,27 @@ func TestNewWriter(t *testing.T) {
t.Fatal(err)
}
err = writer.Write("10.0.0.1", "10.0.0.2", 101, 201, 301, 401, 501)
if err != nil {
t.Fatal(err)
}
err = writer.Write("10.0.0.3", "10.0.0.4", 101, 201, 301, 401, 501)
if err != nil {
t.Fatal(err)
}
t.Log(buf.String())
t.Log("sum:", writer.Sum())
// read
reader, err := iplibrary.NewReaderV2(buf)
if err != nil {
t.Fatal(err)
}
logs.PrintAsJSON(reader.IPv4Items(), t)
logs.PrintAsJSON(reader.IPv6Items(), t)
_ = reader
}

78
pkg/iputils/cidr.go Normal file
View File

@@ -0,0 +1,78 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package iputils
import (
"net"
)
type CIDR struct {
rawIPNet *net.IPNet
}
func ParseCIDR(s string) (*CIDR, error) {
_, ipNet, err := net.ParseCIDR(s)
if err != nil {
return nil, err
}
return &CIDR{
rawIPNet: ipNet,
}, nil
}
func (this *CIDR) IsIPv4() bool {
return this.rawIPNet.IP.To4() != nil
}
func (this *CIDR) IsIPv6() bool {
return this.rawIPNet.IP.To4() == nil
}
func (this *CIDR) From() net.IP {
return this.rawIPNet.IP
}
func (this *CIDR) To() net.IP {
var start = this.rawIPNet.IP.To4()
if start != nil {
return bitsOr(bitsAnd(start, this.rawIPNet.Mask), bitsXor(this.rawIPNet.Mask[:4], []byte{0xff, 0xff, 0xff, 0xff}))
}
start = this.rawIPNet.IP.To16()
return bitsOr(bitsAnd(start, this.rawIPNet.Mask), bitsXor(this.rawIPNet.Mask[:16], []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}))
}
func (this *CIDR) Contains(ip net.IP) bool {
return this.rawIPNet.Contains(ip)
}
func (this *CIDR) String() string {
return this.rawIPNet.String()
}
func bitsAnd(x []byte, y []byte) []byte {
var l = len(x)
var z = make([]byte, l)
for i := 0; i < l; i++ {
z[i] = x[i] & y[i]
}
return z
}
func bitsOr(x []byte, y []byte) []byte {
var l = len(x)
var z = make([]byte, l)
for i := 0; i < l; i++ {
z[i] = x[i] | y[i]
}
return z
}
func bitsXor(x []byte, y []byte) []byte {
var l = len(x)
var z = make([]byte, l)
for i := 0; i < l; i++ {
z[i] = x[i] ^ y[i]
}
return z
}

21
pkg/iputils/cidr_test.go Normal file
View File

@@ -0,0 +1,21 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package iputils_test
import (
"github.com/TeaOSLab/EdgeCommon/pkg/iputils"
"testing"
)
func TestParseCIDR(t *testing.T) {
for _, cidrString := range []string{
"192.168.2.100/24",
"2607:5300:203:afac::/125",
} {
cidr, err := iputils.ParseCIDR(cidrString)
if err != nil {
t.Fatal(err)
}
t.Log(cidr, "=> [", cidr.From(), "-", cidr.To(), "]")
}
}

260
pkg/iputils/ip.go Normal file
View File

@@ -0,0 +1,260 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package iputils
import (
"bytes"
"encoding/binary"
"encoding/hex"
"math"
"math/big"
"net"
"strconv"
"sync"
)
type IP struct {
rawIP net.IP
bigInt *big.Int
}
var uint32BigInt = big.NewInt(int64(math.MaxUint32))
func ParseIP(ipString string) IP {
return NewIP(net.ParseIP(ipString))
}
func NewIP(rawIP net.IP) IP {
if rawIP == nil {
return IP{}
}
if rawIP.To4() == nil {
var bigInt = big.NewInt(0)
bigInt.SetBytes(rawIP.To16())
bigInt.Add(bigInt, uint32BigInt)
return IP{
rawIP: rawIP,
bigInt: bigInt,
}
}
return IP{
rawIP: rawIP,
}
}
func IsIPv4(ipString string) bool {
var rawIP = net.ParseIP(ipString)
return rawIP != nil && rawIP.To4() != nil
}
func IsIPv6(ipString string) bool {
var rawIP = net.ParseIP(ipString)
return rawIP != nil && rawIP.To4() == nil && rawIP.To16() != nil
}
func IsSameVersion(ip1 string, ip2 string) bool {
return IsIPv4(ip1) == IsIPv4(ip2)
}
func IsValid(ipString string) bool {
return net.ParseIP(ipString) != nil
}
func CompareLong(i1 string, i2 string) int {
if i1 == "" {
i1 = "0"
}
if i2 == "" {
i2 = "0"
}
var l = len(i1) - len(i2)
if l > 0 {
return 1
}
if l < 0 {
return -1
}
if i1 > i2 {
return 1
}
if i1 < i2 {
return -1
}
return 0
}
var bigIntPool = &sync.Pool{
New: func() any {
return big.NewInt(0)
},
}
func ToLong(ip string) string {
var rawIP = net.ParseIP(ip)
if rawIP == nil {
return "0"
}
var i4 = rawIP.To4()
if i4 != nil {
return strconv.FormatUint(uint64(binary.BigEndian.Uint32(i4)), 10)
}
var bigInt = bigIntPool.Get().(*big.Int)
bigInt.SetBytes(rawIP.To16())
bigInt.Add(bigInt, uint32BigInt)
var s = bigInt.String()
bigIntPool.Put(bigInt)
return s
}
func ToHex(ip string) string {
if len(ip) == 0 {
return ""
}
var rawIP = net.ParseIP(ip)
if rawIP == nil {
return ""
}
if rawIP.To4() != nil {
return hex.EncodeToString(rawIP.To4())
}
return hex.EncodeToString(rawIP.To16())
}
func ToBytes(ip string) []byte {
if len(ip) == 0 {
return nil
}
var rawIP = net.ParseIP(ip)
if rawIP == nil {
return nil
}
if rawIP.To4() != nil {
return rawIP.To4()
}
return rawIP.To16()
}
func CompareBytes(b1 []byte, b2 []byte) int {
var l1 = len(b1)
var l2 = len(b2)
if l1 < l2 {
return -1
}
if l1 > l2 {
return 1
}
return bytes.Compare(b1, b2)
}
func CompareIP(ip1 string, ip2 string) int {
return CompareBytes(ToBytes(ip1), ToBytes(ip2))
}
func ToLittleLong(ip string) string {
var rawIP = net.ParseIP(ip)
if rawIP == nil {
return "0"
}
var i4 = rawIP.To4()
if i4 != nil {
return strconv.FormatUint(uint64(binary.BigEndian.Uint32(i4)), 10)
}
var bigInt = bigIntPool.Get().(*big.Int)
bigInt.SetBytes(rawIP.To16())
var s = bigInt.String()
bigIntPool.Put(bigInt)
return s
}
func (this IP) ToLong() string {
if this.rawIP == nil {
return "0"
}
if this.bigInt != nil {
return this.bigInt.String()
}
return strconv.FormatUint(uint64(binary.BigEndian.Uint32(this.rawIP.To4())), 10)
}
func (this IP) Mod(d int) int {
if this.rawIP == nil {
return 0
}
if this.bigInt != nil {
return int(this.bigInt.Mod(this.bigInt, big.NewInt(int64(d))).Int64())
}
return int(binary.BigEndian.Uint32(this.rawIP.To4()) % uint32(d))
}
func (this IP) Compare(anotherIP IP) int {
if this.rawIP == nil {
if anotherIP.rawIP == nil {
return 0
}
return -1
} else if anotherIP.rawIP == nil {
return 1
}
if this.bigInt != nil {
if anotherIP.bigInt == nil {
return 1 // IPv6 always greater than IPv4
}
return this.bigInt.Cmp(anotherIP.bigInt)
}
if anotherIP.bigInt == nil {
var i1 = binary.BigEndian.Uint32(this.rawIP.To4())
var i2 = binary.BigEndian.Uint32(anotherIP.rawIP.To4())
if i1 > i2 {
return 1
}
if i1 < i2 {
return -1
}
return 0
}
return -1
}
func (this IP) Between(ipFrom IP, ipTo IP) bool {
return ipFrom.Compare(this) <= 0 && ipTo.Compare(this) >= 0
}
func (this IP) IsIPv4() bool {
return this.rawIP != nil && this.bigInt == nil
}
func (this IP) IsIPv6() bool {
return this.bigInt != nil
}
func (this IP) IsValid() bool {
return this.rawIP != nil
}
func (this IP) Raw() net.IP {
return this.rawIP
}
func (this IP) String() string {
if this.rawIP == nil {
return ""
}
return this.rawIP.String()
}

258
pkg/iputils/ip_test.go Normal file
View File

@@ -0,0 +1,258 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package iputils_test
import (
"github.com/TeaOSLab/EdgeCommon/pkg/iputils"
"github.com/iwind/TeaGo/assert"
"runtime"
"testing"
)
func TestIP_ParseIP(t *testing.T) {
var a = assert.NewAssertion(t)
{
var i = iputils.ParseIP("127.0.0.1")
a.IsTrue(i.IsIPv4())
a.IsFalse(i.IsIPv6())
a.IsTrue(i.IsValid())
a.IsTrue(iputils.IsIPv4("127.0.0.1"))
a.IsFalse(iputils.IsIPv6("127.0.0.1"))
t.Log(i.String(), i.ToLong())
t.Log("raw:", i.Raw())
a.IsTrue(iputils.IsValid("127.0.0.1"))
}
{
var i = iputils.ParseIP("0.0.0.1")
a.IsTrue(i.IsIPv4())
a.IsFalse(i.IsIPv6())
t.Log(i.String(), i.ToLong())
}
for j := 0; j < 3; j++ /** repeat test **/ {
var i = iputils.ParseIP("::1")
a.IsFalse(i.IsIPv4())
a.IsTrue(i.IsIPv6())
a.IsTrue(i.IsValid())
t.Log(i.String(), i.ToLong())
}
{
{
var i = iputils.ParseIP("2001:db8:0:1::1:101")
t.Log(i.String(), i.ToLong())
a.IsFalse(i.IsIPv4())
a.IsTrue(i.IsIPv6())
a.IsFalse(iputils.IsIPv4("2001:db8:0:1::1:101"))
a.IsTrue(iputils.IsIPv6("2001:db8:0:1::1:101"))
a.IsTrue(i.IsValid())
}
{
var i = iputils.ParseIP("2001:db8:0:1::1:102")
t.Log(i.String(), i.ToLong())
a.IsFalse(i.IsIPv4())
a.IsTrue(i.IsIPv6())
a.IsTrue(i.IsValid())
}
{
var i = iputils.ParseIP("2001:db8:0:1::2:101")
t.Log(i.String(), i.ToLong())
a.IsFalse(i.IsIPv4())
a.IsTrue(i.IsIPv6())
a.IsTrue(i.IsValid())
a.IsTrue(iputils.IsValid("2001:db8:0:1::2:101"))
}
}
{
var i = iputils.ParseIP("WRONG IP")
t.Log(i.String(), i.ToLong())
a.IsFalse(i.IsIPv4())
a.IsFalse(i.IsIPv6())
a.IsFalse(i.IsValid())
a.IsFalse(iputils.IsValid("WRONG IP"))
a.IsFalse(iputils.IsIPv4("WRONG IP"))
a.IsFalse(iputils.IsIPv6("WRONG IP"))
}
}
func TestIP_Mod(t *testing.T) {
for _, ip := range []string{
"127.0.0.1",
"::1",
"2001:db8:0:1::1:101",
"2001:db8:0:1::1:102",
"WRONG IP",
} {
var i = iputils.ParseIP(ip)
t.Log(ip, "=>", i.ToLong(), "=>", i.Mod(5))
}
}
func TestIP_Compare(t *testing.T) {
var a = assert.NewAssertion(t)
{
var i1 = iputils.ParseIP("127.0.0.1")
var i2 = iputils.ParseIP("127.0.0.1")
a.IsTrue(i1.Compare(i2) == 0)
}
{
var i1 = iputils.ParseIP("127.0.0.1")
var i2 = iputils.ParseIP("127.0.0.2")
a.IsTrue(i1.Compare(i2) == -1)
}
{
var i1 = iputils.ParseIP("127.0.0.2")
var i2 = iputils.ParseIP("127.0.0.1")
a.IsTrue(i1.Compare(i2) == 1)
}
{
var i1 = iputils.ParseIP("2001:db8:0:1::101")
var i2 = iputils.ParseIP("127.0.0.1")
a.IsTrue(i1.Compare(i2) == 1)
}
{
var i1 = iputils.ParseIP("127.0.0.1")
var i2 = iputils.ParseIP("2001:db8:0:1::101")
a.IsTrue(i1.Compare(i2) == -1)
}
{
var i1 = iputils.ParseIP("2001:db8:0:1::101")
var i2 = iputils.ParseIP("2001:db8:0:1::101")
a.IsTrue(i1.Compare(i2) == 0)
}
{
var i1 = iputils.ParseIP("2001:db8:0:1::101")
var i2 = iputils.ParseIP("2001:db8:0:1::102")
a.IsTrue(i1.Compare(i2) == -1)
}
{
var i1 = iputils.ParseIP("2001:db8:0:1::102")
var i2 = iputils.ParseIP("2001:db8:0:1::101")
a.IsTrue(i1.Compare(i2) == 1)
}
{
var i1 = iputils.ParseIP("2001:db8:0:1::2:100")
var i2 = iputils.ParseIP("2001:db8:0:1::1:101")
a.IsTrue(i1.Compare(i2) == 1)
}
}
func TestIP_Between(t *testing.T) {
var a = assert.NewAssertion(t)
a.IsTrue(iputils.ParseIP("127.0.0.2").Between(iputils.ParseIP("127.0.0.1"), iputils.ParseIP("127.0.0.3")))
a.IsTrue(iputils.ParseIP("127.0.0.1").Between(iputils.ParseIP("127.0.0.1"), iputils.ParseIP("127.0.0.3")))
a.IsFalse(iputils.ParseIP("127.0.0.2").Between(iputils.ParseIP("127.0.0.3"), iputils.ParseIP("127.0.0.4")))
a.IsFalse(iputils.ParseIP("127.0.0.5").Between(iputils.ParseIP("127.0.0.3"), iputils.ParseIP("127.0.0.4")))
a.IsFalse(iputils.ParseIP("127.0.0.2").Between(iputils.ParseIP("127.0.0.3"), iputils.ParseIP("127.0.0.1")))
}
func TestIP_ToLong(t *testing.T) {
for _, ip := range []string{
"127.0.0.1",
"192.168.1.100",
"::1",
"fd00:6868:6868:0:10ac:d056:3bf6:7452",
"fd00:6868:6868:0:10ac:d056:3bf6:7453",
"2001:0db8:85a3:0000:0000:8a2e:0370:7334",
"2001:db8:0:1::101",
"2001:db8:0:2::101",
"wrong ip",
} {
var goIP = iputils.ParseIP(ip)
t.Log(ip, "=>", "\n", goIP.String(), "\n", "=>", "\n", "long1:", goIP.ToLong(), "\n", "long2:", iputils.ToLong(ip), "\n", "little long:", iputils.ToLittleLong(ip))
}
}
func TestIP_CompareLong(t *testing.T) {
var a = assert.NewAssertion(t)
a.IsTrue(iputils.CompareLong("1", "2") == -1)
a.IsTrue(iputils.CompareLong("11", "2") == 1)
a.IsTrue(iputils.CompareLong("11", "22") == -1)
a.IsTrue(iputils.CompareLong("22", "101") == -1)
a.IsTrue(iputils.CompareLong("33", "22") == 1)
a.IsTrue(iputils.CompareLong("101", "22") == 1)
a.IsTrue(iputils.CompareLong("22", "22") == 0)
}
func TestIP_Memory(t *testing.T) {
var list []iputils.IP
var stat1 = &runtime.MemStats{}
runtime.ReadMemStats(stat1)
for i := 0; i < 1_000_000; i++ {
list = append(list, iputils.ParseIP("fd00:6868:6868:0:10ac:d056:3bf6:7452"))
}
//runtime.GC()
var stat2 = &runtime.MemStats{}
runtime.ReadMemStats(stat2)
t.Log((stat2.Alloc-stat1.Alloc)>>10, "KB", (stat2.HeapInuse-stat1.HeapInuse)>>10, "KB")
// hold the memory
for _, v := range list {
_ = v
}
}
func TestToBytes(t *testing.T) {
var a = assert.NewAssertion(t)
a.IsTrue(len(iputils.ToBytes("a")) == 0)
a.IsTrue(len(iputils.ToBytes("192.168.1.100")) == 4)
a.IsTrue(len(iputils.ToBytes("::1")) == 16)
}
func TestCompareIP(t *testing.T) {
var a = assert.NewAssertion(t)
a.IsTrue(iputils.CompareIP("a", "b") == 0)
a.IsTrue(iputils.CompareIP("192.168.1.100", "192.168.1.1") > 0)
a.IsTrue(iputils.CompareIP("192.168.1.100", "10.168.1.1") > 0)
a.IsTrue(iputils.CompareIP("192.168.1.100", "192.168.2.1") < 0)
a.IsTrue(iputils.CompareIP("192.168.1.100", "::1") < 0)
a.IsTrue(iputils.CompareIP("::1", "192.168.1.100") > 0)
a.IsTrue(iputils.CompareIP("192.168.1.100", "192.168.1.100") == 0)
}
func TestIsSameVersion(t *testing.T) {
var a = assert.NewAssertion(t)
a.IsTrue(iputils.IsSameVersion("192.168.1.1", "10.0.0.1"))
a.IsTrue(iputils.IsSameVersion("::1", "::5"))
a.IsFalse(iputils.IsSameVersion("192.168.1.1", "::5"))
}
func BenchmarkParse(b *testing.B) {
for i := 0; i < b.N; i++ {
iputils.ParseIP("fd00:6868:6868:0:10ac:d056:3bf6:7452")
}
}
func BenchmarkToLongV4(b *testing.B) {
for i := 0; i < b.N; i++ {
iputils.ToLong("192.168.2.100")
}
}
func BenchmarkToLongV6(b *testing.B) {
runtime.GOMAXPROCS(1)
b.ReportAllocs()
for i := 0; i < b.N; i++ {
iputils.ToLong("fd00:6868:6868:0:10ac:d056:3bf6:7452")
}
}

View File

@@ -46,6 +46,7 @@ const (
AdminCommon_MenuSettingSecurityPolicy langs.MessageCode = "admin_common@menu_setting_security_policy" // 网络安全
AdminCommon_MenuSettingWAFPolicy langs.MessageCode = "admin_common@menu_setting_waf_policy" // WAF策略
AdminCommon_MenuSettingWebP langs.MessageCode = "admin_common@menu_setting_webp" // WebP
AdminCommon_MenuSettingWebPPolicy langs.MessageCode = "admin_common@menu_setting_webp_policy" // WebP策略
AdminCommon_ServerError langs.MessageCode = "admin_common@server_error" // 服务器出了点小问题,请联系技术人员处理。
AdminCommon_System langs.MessageCode = "admin_common@system" // 系统
AdminDashboard_DiskUsageWarning langs.MessageCode = "admin_dashboard@disk_usage_warning" // 当前服务器磁盘空间不足,请立即扩充容量,文件路径:%s已使用%dG已使用比例%.2f%%,仅剩余空间:%.2f%%。<br/>如果是因为本机数据库数据过多,你可以:<a href="/settings/database/clean">[清理访问日志]</a> &nbsp; &nbsp; <a href="https://goedge.cn/docs/APINode/QA.md" target="_blank">[调整数据库binlog设置]</a>
@@ -95,6 +96,7 @@ const (
AdminMenu_NSRoutes langs.MessageCode = "admin_menu@ns_routes" // 线路管理
AdminMenu_NSSettings langs.MessageCode = "admin_menu@ns_settings" // 全局配置
AdminMenu_NSUserPlans langs.MessageCode = "admin_menu@ns_user_plans" // 用户套餐
AdminMenu_PlanList langs.MessageCode = "admin_menu@plan_list" // 套餐列表
AdminMenu_PlanUserPlans langs.MessageCode = "admin_menu@plan_user_plans" // 已购套餐
AdminMenu_Plans langs.MessageCode = "admin_menu@plans" // 套餐管理
AdminMenu_ServerAccessLogPolicies langs.MessageCode = "admin_menu@server_access_log_policies" // 日志策略
@@ -117,6 +119,7 @@ const (
AdminMenu_TicketCategory langs.MessageCode = "admin_menu@ticket_category" // 分类
AdminMenu_Tickets langs.MessageCode = "admin_menu@tickets" // 工单系统
AdminMenu_UserList langs.MessageCode = "admin_menu@user_list" // 用户列表
AdminMenu_UserScripts langs.MessageCode = "admin_menu@user_scripts" // 用户脚本
AdminMenu_UserSettings langs.MessageCode = "admin_menu@user_settings" // 用户设置
AdminMenu_Users langs.MessageCode = "admin_menu@users" // 平台用户
AdminProfile_LogUpdateProfile langs.MessageCode = "admin_profile@log_update_profile" // 修改个人资料
@@ -147,6 +150,7 @@ const (
AdminUpdate_LogIgnoreVersion langs.MessageCode = "admin_update@log_ignore_version" // 忽略升级版本 %s
AdminUpdate_LogResetIgnoreVersion langs.MessageCode = "admin_update@log_reset_ignore_version" // 重置忽略升级版本
AdminUpdate_LogUpdateCheckSettings langs.MessageCode = "admin_update@log_update_check_settings" // 修改检查更新设置
AdminUserUI_LogUpdateUISettings langs.MessageCode = "admin_user_ui@log_update_ui_settings" // 修改用户界面设置
APINode_LogCreateAPINode langs.MessageCode = "api_node@log_create_api_node" // 创建API节点 %d
APINode_LogDeleteAPINode langs.MessageCode = "api_node@log_delete_api_node" // 删除API节点 %d
APINode_LogUpdateAPINode langs.MessageCode = "api_node@log_update_api_node" // 修改API节点 %d
@@ -265,6 +269,8 @@ const (
Node_LogUpNode langs.MessageCode = "node@log_up_node" // 手动上线节点 %d
Node_LogUpdateNode langs.MessageCode = "node@log_update_node" // 修改节点 %d 基本信息
Node_LogUpdateNodeInstallationStatus langs.MessageCode = "node@log_update_node_installation_status" // 修改节点安装状态 %d
Node_LogUpdateNodeOff langs.MessageCode = "node@log_update_node_off" // 停用节点 %d
Node_LogUpdateNodeOn langs.MessageCode = "node@log_update_node_on" // 启用节点 %d
Node_LogUpgradeNodeRemotely langs.MessageCode = "node@log_upgrade_node_remotely" // 远程升级节点 %d
Node_UngroupedLabel langs.MessageCode = "node@ungrouped_label" // 未分组
NodeAction_LogCopyNodeActionsToCluster langs.MessageCode = "node_action@log_copy_node_actions_to_cluster" // 复制节点 %d 调度动作到集群
@@ -300,7 +306,7 @@ const (
NodeClusterMenu_SettingUAM langs.MessageCode = "node_cluster_menu@setting_uam" // 5秒盾
NodeClusterMenu_SettingWAFActions langs.MessageCode = "node_cluster_menu@setting_waf_actions" // WAF动作
NodeClusterMenu_SettingWAFPolicy langs.MessageCode = "node_cluster_menu@setting_waf_policy" // WAF策略
NodeClusterMenu_SettingWebP langs.MessageCode = "node_cluster_menu@setting_webp" // WebP
NodeClusterMenu_SettingWebP langs.MessageCode = "node_cluster_menu@setting_webp" // WebP策略
NodeClusterMenu_TabClusterDashboard langs.MessageCode = "node_cluster_menu@tab_cluster_dashboard" // 集群看板
NodeClusterMenu_TabClusterDelete langs.MessageCode = "node_cluster_menu@tab_cluster_delete" // 删除集群
NodeClusterMenu_TabClusterNodes langs.MessageCode = "node_cluster_menu@tab_cluster_nodes" // 节点列表
@@ -445,6 +451,11 @@ const (
Plan_LogDeletePlan langs.MessageCode = "plan@log_delete_plan" // 删除套餐 %d
Plan_LogSortPlans langs.MessageCode = "plan@log_sort_plans" // 对套餐进行排序
Plan_LogUpdatePlan langs.MessageCode = "plan@log_update_plan" // 修改套餐 %d
Post_LogCreatePost langs.MessageCode = "post@log_create_post" // 创建文章 %d
Post_LogDeletePost langs.MessageCode = "post@log_delete_post" // 删除文章 %d
Post_LogPublishPost langs.MessageCode = "post@log_publish_post" // 发布文章 %d
Post_LogUpdatePost langs.MessageCode = "post@log_update_post" // 修改文章 %d
Post_ProductGlobal langs.MessageCode = "post@product_global" // 全站
RegionCity_LogAddRegionCityCode langs.MessageCode = "region_city@log_add_region_city_code" // 添加城市/市 %d 别名 %s
RegionCity_LogUpdateRegionCityCustom langs.MessageCode = "region_city@log_update_region_city_custom" // 定制城市 %d 信息
RegionCountry_LogAddRegionCountryCode langs.MessageCode = "region_country@log_add_region_country_code" // 添加国家/地区 %d 别名 %s
@@ -482,6 +493,7 @@ const (
Server_LogCopyServerConfigs langs.MessageCode = "server@log_copy_server_configs" // 从网站 %d 中同步配置 %s
Server_LogCreateServer langs.MessageCode = "server@log_create_server" // 创建网站 %d
Server_LogDeleteServer langs.MessageCode = "server@log_delete_server" // 删除网站 %d
Server_LogDeleteServers langs.MessageCode = "server@log_delete_servers" // 批量删除网站
Server_LogDisableServer langs.MessageCode = "server@log_disable_server" // 停用网站 %d
Server_LogEnableServer langs.MessageCode = "server@log_enable_server" // 启用网站 %d
Server_LogSubmitAuditingServer langs.MessageCode = "server@log_submit_auditing_server" // 提交网站 %d 域名审核
@@ -489,7 +501,7 @@ const (
Server_LogUpdateServerBasic langs.MessageCode = "server@log_update_server_basic" // 修改网站 %d 基本信息
Server_LogUpdateServerGroups langs.MessageCode = "server@log_update_server_groups" // 修改网站 %d 所属分组
Server_LogUpdateServerIsOn langs.MessageCode = "server@log_update_server_is_on" // 修改网站 %d 启用状态
Server_LogUpdateServerName langs.MessageCode = "server@log_update_server_name" // 修改网站名称
Server_LogUpdateServerName langs.MessageCode = "server@log_update_server_name" // 修改网站 %d 名称
Server_MenuAccesslogHistory langs.MessageCode = "server@menu_accesslog_history" // 历史
Server_MenuAccesslogRealtime langs.MessageCode = "server@menu_accesslog_realtime" // 实时
Server_MenuAccesslogToday langs.MessageCode = "server@menu_accesslog_today" // 今天
@@ -512,6 +524,7 @@ const (
Server_MenuSettingHTTPProxy langs.MessageCode = "server@menu_setting_http_proxy" // HTTP代理
Server_MenuSettingHTTPS langs.MessageCode = "server@menu_setting_https" // HTTPS
Server_MenuSettingLocations langs.MessageCode = "server@menu_setting_locations" // 路由规则
Server_MenuSettingMultimedia langs.MessageCode = "server@menu_setting_multimedia" // 音视频设置
Server_MenuSettingOptimization langs.MessageCode = "server@menu_setting_optimization" // 页面优化
Server_MenuSettingOrigins langs.MessageCode = "server@menu_setting_origins" // 源站
Server_MenuSettingOthers langs.MessageCode = "server@menu_setting_others" // 其他设置
@@ -531,7 +544,6 @@ const (
Server_MenuSettingUAM langs.MessageCode = "server@menu_setting_uam" // 5秒盾
Server_MenuSettingUDP langs.MessageCode = "server@menu_setting_udp" // UDP
Server_MenuSettingUDPProxy langs.MessageCode = "server@menu_setting_udp_proxy" // UDP代理
Server_MenuSettingUnix langs.MessageCode = "server@menu_setting_unix" // Unix
Server_MenuSettingUserAgents langs.MessageCode = "server@menu_setting_user_agents" // UA名单
Server_MenuSettingWAF langs.MessageCode = "server@menu_setting_waf" // WAF
Server_MenuSettingWebP langs.MessageCode = "server@menu_setting_webp" // WebP
@@ -577,6 +589,7 @@ const (
ServerGroup_LogDeleteServerGroup langs.MessageCode = "server_group@log_delete_server_group" // 删除网站分组 %d
ServerGroup_LogSortServerGroups langs.MessageCode = "server_group@log_sort_server_groups" // 修改网站分组排序
ServerGroup_LogUpdateServerGroup langs.MessageCode = "server_group@log_update_server_group" // 修改网站分组 %d
ServerHls_LogUpdateHls langs.MessageCode = "server_hls@log_update_hls" // 修改Web %d 的HLS设置
ServerHTTP3_LogUpdateClusterHTTP3Policy langs.MessageCode = "server_http3@log_update_cluster_http3_policy" // 修改集群 %d 的HTTP3策略设置
ServerHTTP_LogUpdateHTTPSettings langs.MessageCode = "server_http@log_update_http_settings" // 修改网站 %d 的HTTP设置
ServerHTTPHeader_LogCreateDeletingHeader langs.MessageCode = "server_http_header@log_create_deleting_header" // 添加删除的报头 HeaderPolicyId: %d, Name: %s
@@ -593,6 +606,7 @@ const (
ServerOrigin_LogCreateOrigin langs.MessageCode = "server_origin@log_create_origin" // 创建源站 %d
ServerOrigin_LogDeleteOrigin langs.MessageCode = "server_origin@log_delete_origin" // 删除源站 %d
ServerOrigin_LogUpdateOrigin langs.MessageCode = "server_origin@log_update_origin" // 修改源站 %d
ServerOrigin_LogUpdateOriginIsOn langs.MessageCode = "server_origin@log_update_origin_is_on" // 修改源站 %d 启用状态
ServerPage_LogCreatePage langs.MessageCode = "server_page@log_create_page" // 创建自定义页面 %d
ServerPage_LogUpdateClusterPages langs.MessageCode = "server_page@log_update_cluster_pages" // 修改集群 %d 自定义页面策略
ServerPage_LogUpdatePage langs.MessageCode = "server_page@log_update_page" // 修改自定义页面 %d
@@ -615,6 +629,8 @@ const (
ServerUAM_LogUpdateUAMSettings langs.MessageCode = "server_uam@log_update_uam_settings" // 修改Web %d 全站防护模式
ServerUDP_LogUpdateUDPSettings langs.MessageCode = "server_udp@log_update_udp_settings" // 修改网站 %d UDP设置
ServerUserAgent_LogUpdateUserAgents langs.MessageCode = "server_user_agent@log_update_user_agents" // 修改Web %d User-Agent设置
ServerUserScript_LogPassUserScript langs.MessageCode = "server_user_script@log_pass_user_script" // 通过用户脚本 %d
ServerUserScript_LogRejectUserScript langs.MessageCode = "server_user_script@log_reject_user_script" // 驳回用户脚本 %d
ServerWAF_LogUpdateWAFSettings langs.MessageCode = "server_waf@log_update_waf_settings" // 修改Web %d 的WAF设置
ServerWebP_LogUpdateClusterWebPPolicy langs.MessageCode = "server_webp@log_update_cluster_webp_policy" // 修改集群 %d 的WebP设置
ServerWebsocket_LogUpdateWebsocketSettings langs.MessageCode = "server_websocket@log_update_websocket_settings" // 修改Web %d 的Websocket设置

View File

@@ -90,7 +90,12 @@ func (this *Manager) GetMessage(langCode string, messageCode MessageCode, args .
if lang.code != this.defaultLangCode {
var defaultLang = this.langMap[this.defaultLangCode]
if defaultLang != nil {
return defaultLang.Get(messageCode)
message = defaultLang.Get(messageCode)
if len(args) == 0 {
return message
}
return fmt.Sprintf(message, args...)
}
}

View File

@@ -0,0 +1,734 @@
// generated by run 'langs generate'
package messages
import (
"github.com/TeaOSLab/EdgeCommon/pkg/langs"
)
func init() {
langs.Load("en-us", map[langs.MessageCode]string{
"acme_provider_account@log_create_acme_provider_account": "",
"acme_provider_account@log_delete_acme_provider_account": "",
"acme_provider_account@log_update_acme_provider_account": "",
"acme_task@log_create_acme_task": "",
"acme_task@log_delete_acme_task": "",
"acme_task@log_run_acme_task": "",
"acme_task@log_update_acme_task": "",
"acme_user@log_create_acme_user": "",
"acme_user@log_delete_acme_user": "",
"acme_user@log_update_acme_user": "",
"ad_network@log_create_ad_network": "",
"ad_network@log_delete_ad_network": "",
"ad_network@log_update_ad_network": "",
"ad_package@log_create_ad_package": "",
"ad_package@log_delete_ad_package": "",
"ad_package@log_update_ad_package": "",
"ad_package_instance@log_create_ad_package_instance": "",
"ad_package_instance@log_delete_ad_package_instance": "",
"ad_package_instance@log_update_ad_package_instance": "",
"ad_package_period@log_create_ad_package_period": "",
"ad_package_period@log_delete_ad_package_period": "",
"ad_package_period@log_update_ad_package_period": "",
"ad_package_price@log_create_ad_package_price": "",
"ad_package_price@log_update_ad_package_price": "",
"admin@log_create_admin": "",
"admin@log_delete_admin": "",
"admin@log_update_admin": "",
"admin_common@canceled": "Canceled",
"admin_common@log_system_error": "system error: %s",
"admin_common@menu_setting_basic": "Basic Settings",
"admin_common@menu_setting_cache": "Cache Settings",
"admin_common@menu_setting_cache_policy": "Cache Policy",
"admin_common@menu_setting_ddos_protection": "DDoS Protection",
"admin_common@menu_setting_dns": "DNS Settings",
"admin_common@menu_setting_health_check": "Health Check",
"admin_common@menu_setting_metrics": "Metrics",
"admin_common@menu_setting_security_policy": "Networking Security",
"admin_common@menu_setting_waf_policy": "WAF Policy",
"admin_common@menu_setting_webp": "WebP",
"admin_common@menu_setting_webp_policy": "WebP Policy",
"admin_common@server_error": "There is a internal error, please report to administrator.",
"admin_common@system": "System",
"admin_dashboard@disk_usage_warning": "当前服务器磁盘空间不足,请立即扩充容量,文件路径:%s已使用%dG已使用比例%.2f%%,仅剩余空间:%.2f%%。<br/>如果是因为本机数据库数据过多,你可以:<a href=\"/settings/database/clean\">[清理访问日志]</a> &nbsp; &nbsp; <a href=\"https://goedge.cn/docs/APINode/QA.md\" target=\"_blank\">[调整数据库binlog设置]</a>",
"admin_dashboard@ui_dns": "DNS",
"admin_dashboard@ui_events": "Events",
"admin_dashboard@ui_overview": "Overview",
"admin_dashboard@ui_user": "Users",
"admin_dashboard@ui_waf": "WAF",
"admin_login@log_failed": "",
"admin_login@log_otp_verified_success": "",
"admin_login@log_success": "",
"admin_login@log_system_error": "",
"admin_login@log_update_login": "",
"admin_menu@admin_recipients": "Notification Medias",
"admin_menu@admins": "System Users",
"admin_menu@dashboard": "Dashboard",
"admin_menu@dns": "DNS Service",
"admin_menu@dns_clusters": "Clusters",
"admin_menu@dns_issues": "Issues",
"admin_menu@dns_providers": "DNS Providers",
"admin_menu@finance": "Finance",
"admin_menu@finance_accounts": "Accounts",
"admin_menu@finance_bills": "Bills",
"admin_menu@finance_fee": "Fee Settings",
"admin_menu@finance_income": "Reports",
"admin_menu@finance_logs": "Logs",
"admin_menu@finance_orders": "Orders",
"admin_menu@finance_packages": "Traffic Packages",
"admin_menu@logs": "Audit Logs",
"admin_menu@node_anti_ddos_products": "Anti-DDoS Product",
"admin_menu@node_clusters": "Clusters",
"admin_menu@node_distributed_monitors": "Distributed Monitors",
"admin_menu@node_ip_list": "Node IPs",
"admin_menu@node_logs": "Node Logs",
"admin_menu@node_regions": "Regions",
"admin_menu@node_ssh_grants": "SSH Grants",
"admin_menu@nodes": "Edge Nodes",
"admin_menu@ns": "Edge DNS",
"admin_menu@ns_access_logs": "Access Logs",
"admin_menu@ns_clusters": "Clusters",
"admin_menu@ns_domain_batch_operations": "Batch",
"admin_menu@ns_domain_groups": "Domain Groups",
"admin_menu@ns_domains": "Domains",
"admin_menu@ns_node_logs": "Node Logs",
"admin_menu@ns_plans": "Plans",
"admin_menu@ns_resolve_test": "Testing",
"admin_menu@ns_routes": "Routes",
"admin_menu@ns_settings": "Settings",
"admin_menu@ns_user_plans": "User Plans",
"admin_menu@plan_list": "Plans",
"admin_menu@plan_user_plans": "User Plans",
"admin_menu@plans": "Plans",
"admin_menu@server_access_log_policies": "Access Log Policies",
"admin_menu@server_access_logs": "Access Logs",
"admin_menu@server_cache_policies": "Cache Policies",
"admin_menu@server_certs": "Certificates",
"admin_menu@server_global_settings": "Global Settings",
"admin_menu@server_groups": "Site Groups",
"admin_menu@server_ip_lists": "IP List",
"admin_menu@server_metrics": "Metrics",
"admin_menu@server_purge_fetch_caches": "Cache Management",
"admin_menu@server_scripts": "Script Libraries",
"admin_menu@server_traffic_stats": "Traffic Statistics",
"admin_menu@server_waf_policies": "WAF Policies",
"admin_menu@servers": "Sites",
"admin_menu@setting_advanced_settings": "Advanced Settings",
"admin_menu@setting_authority": "Commercial Authority",
"admin_menu@setting_basic_settings": "Basic Settings",
"admin_menu@settings": "Settings",
"admin_menu@ticket_category": "Categories",
"admin_menu@tickets": "Tickets",
"admin_menu@user_list": "Users",
"admin_menu@user_scripts": "User Scripts",
"admin_menu@user_settings": "User Settings",
"admin_menu@users": "Users",
"admin_profile@log_update_profile": "",
"admin_security@log_update_security_settings": "",
"admin_server@log_update_server_http_settings": "",
"admin_server@log_update_server_https_settings": "",
"admin_setting@tab_access_log_databases": "Log Databases",
"admin_setting@tab_admin_security_settings": "Security Settings",
"admin_setting@tab_admin_server": "Admin Server Settings",
"admin_setting@tab_admin_ui": "Admin System UI",
"admin_setting@tab_api_nodes": "API Nodes",
"admin_setting@tab_authority": "Commercial Authority",
"admin_setting@tab_backup": "Backup",
"admin_setting@tab_client_browsers": "Browser Management",
"admin_setting@tab_client_operation_systems": "OS Management",
"admin_setting@tab_database": "Database",
"admin_setting@tab_ip_library": "IP Library",
"admin_setting@tab_login": "My Login",
"admin_setting@tab_monitor_nodes": "Monitor Nodes",
"admin_setting@tab_profile": "My Profile",
"admin_setting@tab_transfer": "Transfer",
"admin_setting@tab_updates": "Updates",
"admin_setting@tab_user_nodes": "User Nodes",
"admin_setting@tab_user_ui": "User System UI",
"admin_ui@default_product_name": "",
"admin_ui@default_system_name": "",
"admin_ui@log_update_ui_settings": "",
"admin_update@log_ignore_version": "",
"admin_update@log_reset_ignore_version": "",
"admin_update@log_update_check_settings": "",
"admin_user_ui@log_update_ui_settings": "",
"api_node@log_create_api_node": "",
"api_node@log_delete_api_node": "",
"api_node@log_update_api_node": "",
"client_browser@log_create_browser": "",
"client_browser@log_update_client_browser": "",
"client_system@log_create_system": "",
"client_system@log_update_client_system": "",
"database@log_delete_table": "",
"database@log_truncate_table": "",
"database@log_update_api_node_database_config": "",
"database@log_update_clean_days": "",
"db_node@log_create_db_node": "",
"db_node@log_delete_db_node": "",
"db_node@log_delete_table": "",
"db_node@log_truncate_table": "",
"db_node@log_update_db_node": "",
"db_node@tab_nodes": "",
"ddos_protection@log_update_cluster_ddos_protection": "",
"ddos_protection@log_update_node_ddos_protection": "",
"dns@log_create_domain": "",
"dns@log_delete_domain": "",
"dns@log_recover_domain": "",
"dns@log_sync_cluster": "",
"dns@log_sync_domain": "",
"dns@log_update_cluster_dns": "",
"dns@log_update_domain": "",
"dns@log_update_node_dns": "",
"dns_provider@log_create_dns_provider": "",
"dns_provider@log_delete_dns_provider": "",
"dns_provider@log_update_dns_provider": "",
"dns_task@log_delete_all_dns_tasks": "",
"dns_task@log_delete_dns_task": "",
"finance@log_bill_generate_manually": "",
"finance@log_update_user_order_config": "",
"finance_fee@log_update_fee_setting": "",
"http_access_log_policy@log_create_http_access_log_policy": "",
"http_access_log_policy@log_delete_http_access_log_policy": "",
"http_access_log_policy@log_test_http_access_log_policy": "",
"http_access_log_policy@log_update_http_access_log_policy": "",
"http_auth_policy@log_create_http_auth_policy": "",
"http_auth_policy@log_update_http_auth_policy": "",
"http_cache_task@log_create_http_cache_task_fetch": "",
"http_cache_task@log_create_http_cache_task_purge": "",
"http_cache_task@log_delete_http_cache_task": "",
"http_cache_task@log_reset_http_cache_task": "",
"http_fastcgi@log_create_http_fastcgi": "",
"http_fastcgi@log_update_http_fastcgi": "",
"http_location@log_create_http_location": "",
"http_location@log_update_http_location": "",
"http_rewrite_rule@log_create_rewrite_rule": "",
"http_rewrite_rule@log_delete_rewrite_rule": "",
"http_rewrite_rule@log_sort_rewrite_rules": "",
"http_rewrite_rule@log_update_rewrite_rule": "",
"ip_item@log_create_ip_item": "",
"ip_item@log_delete_ip_item": "",
"ip_item@log_read_all_ip_items": "",
"ip_item@log_update_ip_item": "",
"ip_library@log_finish_ip_library": "",
"ip_library_artifact@log_cancel_ip_library_artifact": "",
"ip_library_artifact@log_delete_ip_library_artifact": "",
"ip_library_artifact@log_use_ip_library_artifact": "",
"ip_library_file@log_delete_ip_library_file": "",
"ip_library_file@log_generate_ip_library_file": "",
"ip_library_file@log_upload_ip_library_file": "",
"ip_list@log_bind_ip_list_waf_policy": "",
"ip_list@log_create_ip_items_batch": "",
"ip_list@log_create_ip_list": "",
"ip_list@log_delete_ip_batch": "",
"ip_list@log_delete_ip_list": "",
"ip_list@log_export_ip_list": "",
"ip_list@log_import_ip_list": "",
"ip_list@log_unbind_ip_list_waf_policy": "",
"ip_list@log_update_ip_list": "",
"level@error": "",
"level@info": "",
"level@warn": "",
"log@log_clean_all_logs": "",
"log@log_clean_logs_days_before": "",
"log@log_delete_log": "",
"log@log_update_settings": "",
"log@tag_access_log": "",
"log@tag_listener": "",
"log@tag_script": "",
"log@tag_waf": "",
"message@log_read_all": "",
"message@log_read_messages": "",
"message_media_instance@log_create_message_media_instance": "",
"message_media_instance@log_delete_message_media_instance": "",
"message_media_instance@log_update_message_media_instance": "",
"message_receiver@log_delete_receiver": "",
"message_receiver@log_update_cluster_message_receivers": "",
"message_recipient@log_create_message_recipient": "",
"message_recipient@log_delete_message_recipient": "",
"message_recipient@log_update_message_recipient": "",
"message_task@log_create_testing_message_task": "",
"message_task@log_delete_message_task": "",
"message_task@log_update_message_task_status": "",
"metric_chart@log_create_metric_chart": "",
"metric_chart@log_delete_metric_chart": "",
"metric_chart@log_update_metric_chart": "",
"metric_item@log_add_metric_item_to_cluster": "",
"metric_item@log_create_metric_item": "",
"metric_item@log_delete_metric_item": "",
"metric_item@log_delete_metric_item_from_cluster": "",
"metric_item@log_update_metric_item": "",
"monitor_node@log_create_monitor_node": "",
"monitor_node@log_delete_monitor_node": "",
"monitor_node@log_update_monitor_node": "",
"node@log_create_node": "",
"node@log_create_node_batch": "",
"node@log_delete_node_from_cluster": "",
"node@log_install_node": "",
"node@log_install_node_remotely": "",
"node@log_start_node_remotely": "",
"node@log_stop_node_remotely": "",
"node@log_up_node": "",
"node@log_update_node": "",
"node@log_update_node_installation_status": "",
"node@log_update_node_off": "",
"node@log_update_node_on": "",
"node@log_upgrade_node_remotely": "",
"node@ungrouped_label": "",
"node_action@log_copy_node_actions_to_cluster": "",
"node_action@log_copy_node_actions_to_group": "",
"node_action@log_create_node_action": "",
"node_action@log_delete_node_action": "",
"node_action@log_sort_node_actions": "",
"node_action@log_update_node_action": "",
"node_cache@log_update_node_cache_settings": "",
"node_cluster@log_create_cluster": "",
"node_cluster@log_delete_cluster": "",
"node_cluster@log_pin_cluster": "",
"node_cluster@log_run_cluster_health_check": "",
"node_cluster@log_unpin_cluster": "",
"node_cluster@log_update_cluster_basic_settings": "",
"node_cluster@log_update_cluster_health_check": "",
"node_cluster_menu@setting_basic": "Basic Settings",
"node_cluster_menu@setting_cache_policy": "Cache Policy",
"node_cluster_menu@setting_cc": "CC Policy",
"node_cluster_menu@setting_ddos_protection": "DDoS Protection",
"node_cluster_menu@setting_dns": "DNS Settings",
"node_cluster_menu@setting_health_check": "Health Check",
"node_cluster_menu@setting_http3": "HTTP/3",
"node_cluster_menu@setting_metrics": "Metrics",
"node_cluster_menu@setting_notification": "Notifications",
"node_cluster_menu@setting_pages": "Pages",
"node_cluster_menu@setting_schedule": "Scheduling",
"node_cluster_menu@setting_security_policy": "Networking Security",
"node_cluster_menu@setting_service_global": "Site Settings",
"node_cluster_menu@setting_system_service": "System Service",
"node_cluster_menu@setting_thresholds": "Thresholds",
"node_cluster_menu@setting_toa": "TOA",
"node_cluster_menu@setting_uam": "UAM Policy",
"node_cluster_menu@setting_waf_actions": "WAF Actions",
"node_cluster_menu@setting_waf_policy": "WAF Policy",
"node_cluster_menu@setting_webp": "WebP Policy",
"node_cluster_menu@tab_cluster_dashboard": "Dashboard",
"node_cluster_menu@tab_cluster_delete": "Delete",
"node_cluster_menu@tab_cluster_nodes": "Nodes",
"node_cluster_menu@tab_cluster_settings": "Settings",
"node_dns@log_update_node_dns": "",
"node_grant@log_create_ssh_grant": "",
"node_grant@log_delete_ssh_grant": "",
"node_grant@log_update_ssh_grant": "",
"node_grant@method_private_key": "",
"node_grant@method_user_password": "",
"node_group@log_create_node_group": "",
"node_group@log_delete_node_group": "",
"node_group@log_sort_node_groups": "",
"node_group@log_update_node_group": "",
"node_ip_address@log_delete_node_ip_address": "",
"node_ip_address@log_down_node_ip_address": "",
"node_ip_address@log_restore_node_ip_address": "",
"node_ip_address@log_up_node_ip_address": "",
"node_log@log_delete_node_logs_batch": "",
"node_log@log_fix_all_logs": "",
"node_log@log_fix_node_logs": "",
"node_menu@create_multiple_nodes": "Create Batch",
"node_menu@create_single_node": "Create",
"node_menu@install_auto_register": "Auto-Register",
"node_menu@install_manually": "Manually",
"node_menu@install_remote": "Install Remotely(%d)",
"node_menu@install_remote_upgrade": "Upgrade Remotely(%d)",
"node_menu@setting_basic": "Basic Settings",
"node_menu@setting_cache": "Cache Settings",
"node_menu@setting_ddos_protection": "DDoS Protection",
"node_menu@setting_dns": "DNS Settings",
"node_menu@setting_schedule": "Scheduling",
"node_menu@setting_ssh": "SSH",
"node_menu@setting_system": "System Settings",
"node_menu@setting_thresholds": "Thresholds",
"node_price_item@log_create_node_price_item_bandwidth": "",
"node_price_item@log_create_node_price_item_traffic": "",
"node_price_item@log_delete_node_price_item": "",
"node_price_item@log_update_node_price_item_bandwidth": "",
"node_price_item@log_update_node_price_item_traffic": "",
"node_region@log_create_node_region": "",
"node_region@log_delete_node_region": "",
"node_region@log_move_node_between_regions": "",
"node_region@log_sort_node_regions": "",
"node_region@log_update_node_region": "",
"node_region_price@log_update_node_region_price": "",
"node_schedule@log_reset_node_action_status": "",
"node_schedule@log_update_node_schedule_basic": "",
"node_ssh@log_update_node_ssh": "",
"node_system@log_update_node_system_settings": "",
"node_systemd@log_update_cluster_systemd_settings": "",
"node_task@log_delete_all_node_tasks": "",
"node_task@log_delete_node_task": "",
"node_task@log_delete_node_tasks_batch": "",
"node_threshold@log_create_node_threshold": "",
"node_threshold@log_delete_node_threshold": "",
"node_threshold@log_update_node_threshold": "",
"node_toa@log_update_cluster_toa": "",
"ns@log_create_ns_domains_batch": "",
"ns@log_create_ns_records_batch": "",
"ns@log_delete_ns_domains_batch": "",
"ns@log_delete_ns_records_batch": "",
"ns@log_disable_ns_records_batch": "",
"ns@log_enable_ns_records_batch": "",
"ns@log_import_records_batch": "",
"ns@log_update_ns_records_batch": "",
"ns@log_update_ns_user_config": "",
"ns@setting_access_logs": "",
"ns@setting_user": "",
"ns_cluster@log_create_ns_cluster": "",
"ns_cluster@log_delete_ns_cluster": "",
"ns_cluster@log_update_ns_cluster_settings_access_log": "",
"ns_cluster@log_update_ns_cluster_settings_answer": "",
"ns_cluster@log_update_ns_cluster_settings_basic": "",
"ns_cluster@log_update_ns_cluster_settings_ddos_protection": "",
"ns_cluster@log_update_ns_cluster_settings_doh": "",
"ns_cluster@log_update_ns_cluster_settings_recursion": "",
"ns_cluster@log_update_ns_cluster_settings_soa": "",
"ns_cluster@log_update_ns_cluster_settings_tcp": "",
"ns_cluster@log_update_ns_cluster_settings_tls": "",
"ns_cluster@log_update_ns_cluster_settings_udp": "",
"ns_cluster@menu_access_logs": "",
"ns_cluster@menu_answer_setting": "",
"ns_cluster@menu_basic": "",
"ns_cluster@menu_ddos_protection": "",
"ns_cluster@menu_dns_recursion": "",
"ns_cluster@menu_doh": "",
"ns_cluster@menu_soa": "",
"ns_cluster@menu_tcp": "",
"ns_cluster@menu_tls": "",
"ns_cluster@menu_udp": "",
"ns_cluster@tab_delete": "",
"ns_cluster@tab_nodes": "",
"ns_cluster@tab_setting": "",
"ns_domain@log_create_ns_domain": "",
"ns_domain@log_create_ns_domains_batch": "",
"ns_domain@log_delete_ns_domain": "",
"ns_domain@log_update_ns_domain": "",
"ns_domain@log_update_ns_domain_health_check": "",
"ns_domain@log_update_ns_domain_status": "",
"ns_domain@log_update_ns_domain_tsig": "",
"ns_domain@log_validate_ns_domains": "",
"ns_domain_group@log_create_ns_domain_group": "",
"ns_domain_group@log_delete_ns_domain_group": "",
"ns_domain_group@log_update_ns_domain_group": "",
"ns_key@log_create_ns_key": "",
"ns_key@log_delete_ns_key": "",
"ns_key@log_update_ns_key": "",
"ns_node@log_create_ns_node": "",
"ns_node@log_delete_ns_node": "",
"ns_node@log_install_ns_node_remotely": "",
"ns_node@log_start_ns_node_remotely": "",
"ns_node@log_stop_ns_node_remotely": "",
"ns_node@log_update_ns_node": "",
"ns_node@log_update_ns_node_installation_status": "",
"ns_node_ssh@log_update_ns_node_ssh": "",
"ns_plan@log_create_ns_plan": "",
"ns_plan@log_delete_ns_plan": "",
"ns_plan@log_sort_ns_plans": "",
"ns_plan@log_update_ns_plan": "",
"ns_record@log_create_ns_record": "",
"ns_record@log_create_ns_records_batch": "",
"ns_record@log_delete_ns_record": "",
"ns_record@log_up_ns_record": "",
"ns_record@log_update_ns_record": "",
"ns_record@log_update_ns_record_health_check": "",
"ns_route@log_create_ns_route": "",
"ns_route@log_delete_ns_route": "",
"ns_route@log_sort_ns_routes": "",
"ns_route@log_update_ns_route": "",
"ns_route_category@log_create_ns_route_category": "",
"ns_route_category@log_delete_ns_route_category": "",
"ns_route_category@log_sort_ns_route_categories": "",
"ns_route_category@log_update_ns_route_category": "",
"ns_user_plan@log_create_ns_user_plan": "",
"ns_user_plan@log_delete_ns_user_plan": "",
"ns_user_plan@log_update_ns_user_plan": "",
"order_method@log_create_order_method": "",
"order_method@log_delete_order_method": "",
"order_method@log_update_order_method": "",
"plan@log_create_plan": "",
"plan@log_delete_plan": "",
"plan@log_sort_plans": "",
"plan@log_update_plan": "",
"post@log_create_post": "",
"post@log_delete_post": "",
"post@log_publish_post": "",
"post@log_update_post": "",
"post@product_global": "",
"region_city@log_add_region_city_code": "",
"region_city@log_update_region_city_custom": "",
"region_country@log_add_region_country_code": "",
"region_country@log_update_region_country_custom": "",
"region_country@region_china": "",
"region_country@region_china_hk": "",
"region_country@region_china_mainland": "",
"region_country@region_china_mo": "",
"region_country@region_china_tw": "",
"region_country@region_greater_china": "",
"region_provider@log_add_region_provider_code": "",
"region_provider@log_update_region_provider_custom": "",
"region_province@log_add_region_province_code": "",
"region_province@log_update_region_province_custom": "",
"region_town@log_add_region_town_code": "",
"region_town@log_update_region_town_custom": "",
"report_node@log_create_report_node": "",
"report_node@log_delete_report_node": "",
"report_node@log_update_report_node": "",
"report_node_group@log_create_report_node_group": "",
"report_node_group@log_delete_report_node_group": "",
"report_node_group@log_update_report_node_group": "",
"reverse_proxy@log_update_reverse_proxy_scheduling": "",
"script@log_create_script": "",
"script@log_delete_script": "",
"script@log_publish_scripts": "",
"script@log_update_script": "",
"server@copy_setting_current_cluster": "Current Cluster: %s",
"server@copy_setting_current_group": "Current Group: %s",
"server@copy_setting_current_user": "Current User: %s",
"server@copy_setting_select_cluster": "Select Cluster",
"server@copy_setting_select_group": "Select Group",
"server@copy_setting_select_server": "Select Site",
"server@copy_setting_select_user": "Select User",
"server@log_copy_server_configs": "从网站 %d 中同步配置 %s",
"server@log_create_server": "创建网站 %d",
"server@log_delete_server": "删除网站 %d",
"server@log_delete_servers": "",
"server@log_disable_server": "停用网站 %d",
"server@log_enable_server": "启用网站 %d",
"server@log_submit_auditing_server": "提交网站 %d 域名审核",
"server@log_update_global_settings": "保存网站全局配置",
"server@log_update_server_basic": "修改网站 %d 基本信息",
"server@log_update_server_groups": "修改网站 %d 所属分组",
"server@log_update_server_is_on": "修改网站 %d 启用状态",
"server@log_update_server_name": "修改网站 %d 名称",
"server@menu_accesslog_history": "History",
"server@menu_accesslog_realtime": "Realtime",
"server@menu_accesslog_today": "Today",
"server@menu_dashboard": "Dashboard",
"server@menu_setting_access_log": "Access Log",
"server@menu_setting_auth": "Access Control",
"server@menu_setting_basic": "Basic Settings",
"server@menu_setting_cache": "Cache",
"server@menu_setting_cc": "CC Protection",
"server@menu_setting_charset": "Charset",
"server@menu_setting_client_ip": "Client IP",
"server@menu_setting_compression": "Compressions",
"server@menu_setting_delete": "Delete",
"server@menu_setting_dns": "DNS",
"server@menu_setting_domains": "Server Names",
"server@menu_setting_fastcgi": "Fastcgi",
"server@menu_setting_group": "Group",
"server@menu_setting_http": "HTTP",
"server@menu_setting_http_headers": "HTTP Headers",
"server@menu_setting_http_proxy": "HTTP Reverse Proxy",
"server@menu_setting_https": "HTTPS",
"server@menu_setting_locations": "Locations",
"server@menu_setting_multimedia": "Audios & Videos",
"server@menu_setting_optimization": "Content Optimizations",
"server@menu_setting_origins": "Origin Sites",
"server@menu_setting_others": "Others",
"server@menu_setting_pages": "Pages",
"server@menu_setting_plan": "Plan",
"server@menu_setting_redirects": "URL Redirections",
"server@menu_setting_referers": "Referers",
"server@menu_setting_request_limit": "Request Limit",
"server@menu_setting_rewrite_rules": "Rewrite Rules",
"server@menu_setting_root": "Static Files",
"server@menu_setting_scripts": "Scripts",
"server@menu_setting_stat": "Statistics",
"server@menu_setting_tcp": "TCP",
"server@menu_setting_tcp_proxy": "TCP Reverse Proxy",
"server@menu_setting_tls": "TLS",
"server@menu_setting_traffic_limit": "Traffic Limit",
"server@menu_setting_uam": "UAM",
"server@menu_setting_udp": "UDP",
"server@menu_setting_udp_proxy": "UDP Reverse Proxy",
"server@menu_setting_user_agents": "UA List",
"server@menu_setting_waf": "WAF",
"server@menu_setting_webp": "WebP",
"server@menu_setting_websocket": "Websocket",
"server@menu_stat_clients": "Clients",
"server@menu_stat_providers": "Providers",
"server@menu_stat_regions": "Regions",
"server@menu_stat_traffic": "Traffic",
"server@menu_stat_waf": "WAF",
"server@server_names_log_update_server_names": "修改网站 %d 域名",
"server@tab_access_logs": "Access Logs",
"server@tab_dashboard": "Dashboard",
"server@tab_delete": "Delete",
"server@tab_server_list": "Sites",
"server@tab_settings": "Settings",
"server@tab_stat": "Statistics",
"server_access_log@log_update_access_log_setting": "",
"server_auth@log_update_http_auth_settings": "",
"server_cache@log_fetch_caches": "",
"server_cache@log_purge_caches": "",
"server_cache@log_update_cache_settings": "",
"server_cache@log_update_cluster_cache_policy": "",
"server_cache_policy@log_clean_all": "",
"server_cache_policy@log_create_cache_policy": "",
"server_cache_policy@log_delete_cache_policy": "",
"server_cache_policy@log_fetch_caches": "",
"server_cache_policy@log_purge_caches": "",
"server_cache_policy@log_stat_caches": "",
"server_cache_policy@log_test_reading": "",
"server_cache_policy@log_test_writing": "",
"server_cache_policy@log_update_cache_policy": "",
"server_cc@log_update_cc_settings": "",
"server_cc@log_update_cluster_http_cc_policy": "",
"server_charset@log_update_charset_setting": "",
"server_common@log_update_common_settings": "",
"server_compression@log_update_compression_settings": "",
"server_dns@log_regenerate_dns_name": "",
"server_dns@log_update_dns_name": "",
"server_dns@log_update_dns_settings": "",
"server_fastcgi@log_update_http_fastcgi": "",
"server_global_setting@log_update_cluster_global_server_config": "",
"server_group@log_create_server_group": "",
"server_group@log_delete_server_group": "",
"server_group@log_sort_server_groups": "",
"server_group@log_update_server_group": "",
"server_hls@log_update_hls": "",
"server_http3@log_update_cluster_http3_policy": "",
"server_http@log_update_http_settings": "",
"server_http_header@log_create_deleting_header": "",
"server_http_header@log_create_non_standard_header": "",
"server_http_header@log_create_setting_request_header": "",
"server_http_header@log_create_setting_response_header": "",
"server_http_header@log_delete_deleting_header": "",
"server_http_header@log_delete_header": "",
"server_http_header@log_delete_non_standard_header": "",
"server_http_header@log_update_http_headers": "",
"server_http_header@log_update_setting_header": "",
"server_https@log_update_https_settings": "",
"server_optimization@log_update_optimization_settings": "",
"server_origin@log_create_origin": "",
"server_origin@log_delete_origin": "",
"server_origin@log_update_origin": "",
"server_origin@log_update_origin_is_on": "",
"server_page@log_create_page": "",
"server_page@log_update_cluster_pages": "",
"server_page@log_update_page": "",
"server_page@log_update_pages": "",
"server_redirect@log_update_redirects": "",
"server_referer@log_update_referers": "",
"server_request_limit@log_update_request_limit_settings": "",
"server_reverse_proxy@log_update_location_reverse_proxy_settings": "",
"server_reverse_proxy@log_update_server_group_reverse_proxy_settings": "",
"server_reverse_proxy@log_update_server_reverse_proxy_settings": "",
"server_root@log_update_root": "",
"server_script@log_update_scripts": "",
"server_stat@log_update_stat_settings": "",
"server_tcp@log_update_tcp_settings": "",
"server_tls@log_update_tls_settings": "",
"server_traffic_limit@log_update_traffic_limit_settings": "",
"server_traffic_stat@all_servers": "",
"server_uam@log_update_cluster_uam_policy": "",
"server_uam@log_update_server_uam_settings": "",
"server_uam@log_update_uam_settings": "",
"server_udp@log_update_udp_settings": "",
"server_user_agent@log_update_user_agents": "",
"server_user_script@log_pass_user_script": "",
"server_user_script@log_reject_user_script": "",
"server_waf@log_update_waf_settings": "",
"server_webp@log_update_cluster_webp_policy": "",
"server_websocket@log_update_websocket_settings": "",
"ssl_cert@log_delete_ssl_cert": "",
"ssl_cert@log_download_ssl_cert": "",
"ssl_cert@log_download_ssl_cert_key": "",
"ssl_cert@log_download_ssl_cert_zip": "",
"ssl_cert@log_ocsp_ignore_ocsp_status": "",
"ssl_cert@log_ocsp_reset_all_ocsp_status": "",
"ssl_cert@log_ocsp_reset_ocsp_status": "",
"ssl_cert@log_update_ssl_cert": "",
"ssl_cert@log_upload_ssl_cert": "",
"ssl_cert@log_upload_ssl_cert_batch": "",
"ssl_cert@menu_apply": "",
"ssl_cert@menu_certs": "",
"ssl_cert@menu_ocsp": "",
"system@home_page": "https://goedge.cn",
"ticket_category@log_create_ticket_category": "",
"ticket_category@log_delete_ticket_category": "",
"ticket_category@log_update_ticket_category": "",
"traffic_package@log_create_traffic_package": "",
"traffic_package@log_delete_traffic_package": "",
"traffic_package@log_update_traffic_package": "",
"traffic_package_period@log_create_traffic_package_period": "",
"traffic_package_period@log_delete_traffic_package_period": "",
"traffic_package_period@log_update_traffic_package_period": "",
"traffic_package_price@log_update_traffic_package_price": "",
"user@log_create_user": "",
"user@log_delete_user": "",
"user@log_update_user": "",
"user@log_update_user_email_settings": "",
"user@log_update_user_features": "",
"user@log_update_user_global_settings": "",
"user@log_update_user_price_period": "",
"user@log_update_user_price_type": "",
"user@log_update_user_profile": "",
"user@log_update_user_sms_settings": "",
"user@log_verify_user": "",
"user_access_key@log_create_user_access_key": "",
"user_access_key@log_delete_user_access_key": "",
"user_access_key@log_update_user_access_key_is_on": "",
"user_account@log_update_user_account": "",
"user_ad_instance@log_delete_user_ad_instance": "",
"user_ad_instance@log_renew_user_ad_instance": "",
"user_ad_instance@log_update_user_ad_instance_objects": "",
"user_bill@log_pay_user_bill": "",
"user_common@canceled": "",
"user_common@log_system_error": "",
"user_common@server_error": "",
"user_common@system": "",
"user_identity@log_cancel_user_identity": "",
"user_identity@log_reject_user_identity": "",
"user_identity@log_reset_user_identity": "",
"user_identity@log_submit_user_identity": "",
"user_identity@log_update_user_identity_enterprise": "",
"user_identity@log_update_user_identity_individual": "",
"user_identity@log_verify_user_identity": "",
"user_login@log_update_login": "",
"user_node@log_create_user_node": "",
"user_node@log_delete_user_node": "",
"user_node@log_update_user_node": "",
"user_order@log_finish_user_order": "",
"user_plan@log_bind_user_plan_to_server": "",
"user_plan@log_buy_user_plan": "",
"user_plan@log_cancel_user_plan_from_server": "",
"user_plan@log_delete_user_plan": "",
"user_plan@log_renew_user_plan": "",
"user_ticket@log_create_user_ticket": "",
"user_ticket_log@log_reply_ticket": "",
"user_traffic_package@log_create_user_traffic_package": "",
"user_traffic_package@log_delete_user_traffic_package": "",
"waf@connector_and": "",
"waf@connector_and_description": "",
"waf@connector_or": "",
"waf@connector_or_description": "",
"waf@log_delete_ip_from_waf_policy": "",
"waf@log_update_forbidden_countries": "",
"waf@log_update_forbidden_provinces": "",
"waf@log_update_ip_from_waf_policy": "",
"waf_action@log_create_waf_action": "",
"waf_action@log_delete_waf_action": "",
"waf_action@log_update_waf_action": "",
"waf_policy@log_create_waf_policy": "",
"waf_policy@log_delete_waf_policy": "",
"waf_policy@log_export_waf_policy": "",
"waf_policy@log_import_waf_policy": "",
"waf_policy@log_update_cluster_waf_policy": "",
"waf_policy@log_update_waf_policy": "",
"waf_policy@log_upgrade_waf_policy": "",
"waf_rule_group@log_create_rule_group": "",
"waf_rule_group@log_delete_rule_group": "",
"waf_rule_group@log_sort_rule_groups": "",
"waf_rule_group@log_update_rule_group": "",
"waf_rule_group@log_update_rule_group_is_on": "",
"waf_rule_set@log_delete_rule_set": "",
"waf_rule_set@log_sort_rule_sets": "",
"waf_rule_set@log_update_rule_set": "",
"waf_rule_set@log_update_rule_set_is_on": "",
})
}

View File

@@ -47,6 +47,7 @@ func init() {
"admin_common@menu_setting_security_policy": "网络安全",
"admin_common@menu_setting_waf_policy": "WAF策略",
"admin_common@menu_setting_webp": "WebP",
"admin_common@menu_setting_webp_policy": "WebP策略",
"admin_common@server_error": "服务器出了点小问题,请联系技术人员处理。",
"admin_common@system": "系统",
"admin_dashboard@disk_usage_warning": "当前服务器磁盘空间不足,请立即扩充容量,文件路径:%s已使用%dG已使用比例%.2f%%,仅剩余空间:%.2f%%。<br/>如果是因为本机数据库数据过多,你可以:<a href=\"/settings/database/clean\">[清理访问日志]</a> &nbsp; &nbsp; <a href=\"https://goedge.cn/docs/APINode/QA.md\" target=\"_blank\">[调整数据库binlog设置]</a>",
@@ -96,6 +97,7 @@ func init() {
"admin_menu@ns_routes": "线路管理",
"admin_menu@ns_settings": "全局配置",
"admin_menu@ns_user_plans": "用户套餐",
"admin_menu@plan_list": "套餐列表",
"admin_menu@plan_user_plans": "已购套餐",
"admin_menu@plans": "套餐管理",
"admin_menu@server_access_log_policies": "日志策略",
@@ -118,6 +120,7 @@ func init() {
"admin_menu@ticket_category": "分类",
"admin_menu@tickets": "工单系统",
"admin_menu@user_list": "用户列表",
"admin_menu@user_scripts": "用户脚本",
"admin_menu@user_settings": "用户设置",
"admin_menu@users": "平台用户",
"admin_profile@log_update_profile": "修改个人资料",
@@ -148,6 +151,7 @@ func init() {
"admin_update@log_ignore_version": "忽略升级版本 %s",
"admin_update@log_reset_ignore_version": "重置忽略升级版本",
"admin_update@log_update_check_settings": "修改检查更新设置",
"admin_user_ui@log_update_ui_settings": "修改用户界面设置",
"api_node@log_create_api_node": "创建API节点 %d",
"api_node@log_delete_api_node": "删除API节点 %d",
"api_node@log_update_api_node": "修改API节点 %d",
@@ -266,6 +270,8 @@ func init() {
"node@log_up_node": "手动上线节点 %d",
"node@log_update_node": "修改节点 %d 基本信息",
"node@log_update_node_installation_status": "修改节点安装状态 %d",
"node@log_update_node_off": "停用节点 %d",
"node@log_update_node_on": "启用节点 %d",
"node@log_upgrade_node_remotely": "远程升级节点 %d",
"node@ungrouped_label": "未分组",
"node_action@log_copy_node_actions_to_cluster": "复制节点 %d 调度动作到集群",
@@ -301,7 +307,7 @@ func init() {
"node_cluster_menu@setting_uam": "5秒盾",
"node_cluster_menu@setting_waf_actions": "WAF动作",
"node_cluster_menu@setting_waf_policy": "WAF策略",
"node_cluster_menu@setting_webp": "WebP",
"node_cluster_menu@setting_webp": "WebP策略",
"node_cluster_menu@tab_cluster_dashboard": "集群看板",
"node_cluster_menu@tab_cluster_delete": "删除集群",
"node_cluster_menu@tab_cluster_nodes": "节点列表",
@@ -446,6 +452,11 @@ func init() {
"plan@log_delete_plan": "删除套餐 %d",
"plan@log_sort_plans": "对套餐进行排序",
"plan@log_update_plan": "修改套餐 %d",
"post@log_create_post": "创建文章 %d",
"post@log_delete_post": "删除文章 %d",
"post@log_publish_post": "发布文章 %d",
"post@log_update_post": "修改文章 %d",
"post@product_global": "全站",
"region_city@log_add_region_city_code": "添加城市/市 %d 别名 %s",
"region_city@log_update_region_city_custom": "定制城市 %d 信息",
"region_country@log_add_region_country_code": "添加国家/地区 %d 别名 %s",
@@ -483,6 +494,7 @@ func init() {
"server@log_copy_server_configs": "从网站 %d 中同步配置 %s",
"server@log_create_server": "创建网站 %d",
"server@log_delete_server": "删除网站 %d",
"server@log_delete_servers": "批量删除网站",
"server@log_disable_server": "停用网站 %d",
"server@log_enable_server": "启用网站 %d",
"server@log_submit_auditing_server": "提交网站 %d 域名审核",
@@ -490,7 +502,7 @@ func init() {
"server@log_update_server_basic": "修改网站 %d 基本信息",
"server@log_update_server_groups": "修改网站 %d 所属分组",
"server@log_update_server_is_on": "修改网站 %d 启用状态",
"server@log_update_server_name": "修改网站名称",
"server@log_update_server_name": "修改网站 %d 名称",
"server@menu_accesslog_history": "历史",
"server@menu_accesslog_realtime": "实时",
"server@menu_accesslog_today": "今天",
@@ -513,6 +525,7 @@ func init() {
"server@menu_setting_http_proxy": "HTTP代理",
"server@menu_setting_https": "HTTPS",
"server@menu_setting_locations": "路由规则",
"server@menu_setting_multimedia": "音视频设置",
"server@menu_setting_optimization": "页面优化",
"server@menu_setting_origins": "源站",
"server@menu_setting_others": "其他设置",
@@ -532,7 +545,6 @@ func init() {
"server@menu_setting_uam": "5秒盾",
"server@menu_setting_udp": "UDP",
"server@menu_setting_udp_proxy": "UDP代理",
"server@menu_setting_unix": "Unix",
"server@menu_setting_user_agents": "UA名单",
"server@menu_setting_waf": "WAF",
"server@menu_setting_webp": "WebP",
@@ -578,6 +590,7 @@ func init() {
"server_group@log_delete_server_group": "删除网站分组 %d",
"server_group@log_sort_server_groups": "修改网站分组排序",
"server_group@log_update_server_group": "修改网站分组 %d",
"server_hls@log_update_hls": "修改Web %d 的HLS设置",
"server_http3@log_update_cluster_http3_policy": "修改集群 %d 的HTTP3策略设置",
"server_http@log_update_http_settings": "修改网站 %d 的HTTP设置",
"server_http_header@log_create_deleting_header": "添加删除的报头 HeaderPolicyId: %d, Name: %s",
@@ -594,6 +607,7 @@ func init() {
"server_origin@log_create_origin": "创建源站 %d",
"server_origin@log_delete_origin": "删除源站 %d",
"server_origin@log_update_origin": "修改源站 %d",
"server_origin@log_update_origin_is_on": "修改源站 %d 启用状态",
"server_page@log_create_page": "创建自定义页面 %d",
"server_page@log_update_cluster_pages": "修改集群 %d 自定义页面策略",
"server_page@log_update_page": "修改自定义页面 %d",
@@ -616,6 +630,8 @@ func init() {
"server_uam@log_update_uam_settings": "修改Web %d 全站防护模式",
"server_udp@log_update_udp_settings": "修改网站 %d UDP设置",
"server_user_agent@log_update_user_agents": "修改Web %d User-Agent设置",
"server_user_script@log_pass_user_script": "通过用户脚本 %d",
"server_user_script@log_reject_user_script": "驳回用户脚本 %d",
"server_waf@log_update_waf_settings": "修改Web %d 的WAF设置",
"server_webp@log_update_cluster_webp_policy": "修改集群 %d 的WebP设置",
"server_websocket@log_update_websocket_settings": "修改Web %d 的Websocket设置",

View File

@@ -0,0 +1,4 @@
After changing the messages, remember to run 'langs generate' to generate Go codes:
~~~bash
go run cmd/langs/main.go generate
~~~

View File

@@ -0,0 +1,19 @@
{
"menu_setting_basic": "Basic Settings",
"menu_setting_dns": "DNS Settings",
"menu_setting_health_check": "Health Check",
"menu_setting_cache_policy": "Cache Policy",
"menu_setting_waf_policy": "WAF Policy",
"menu_setting_webp": "WebP",
"menu_setting_webp_policy": "WebP Policy",
"menu_setting_metrics": "Metrics",
"menu_setting_ddos_protection": "DDoS Protection",
"menu_setting_security_policy": "Networking Security",
"menu_setting_cache": "Cache Settings",
"system": "System",
"canceled": "Canceled",
"server_error": "There is a internal error, please report to administrator.",
"log_system_error": "system error: %s"
}

View File

@@ -0,0 +1,9 @@
{
"ui_overview": "Overview",
"ui_waf": "WAF",
"ui_dns": "DNS",
"ui_user": "Users",
"ui_events": "Events",
"disk_usage_warning": "当前服务器磁盘空间不足,请立即扩充容量,文件路径:%s已使用%dG已使用比例%.2f%%,仅剩余空间:%.2f%%。<br/>如果是因为本机数据库数据过多,你可以:<a href=\"/settings/database/clean\">[清理访问日志]</a> &nbsp; &nbsp; <a href=\"${lang.system@home_page}/docs/APINode/QA.md\" target=\"_blank\">[调整数据库binlog设置]</a>"
}

View File

@@ -0,0 +1,74 @@
{
"dashboard": "Dashboard",
"servers": "Sites",
"server_access_logs": "Access Logs",
"server_groups": "Site Groups",
"server_certs": "Certificates",
"server_traffic_stats": "Traffic Statistics",
"server_cache_policies": "Cache Policies",
"server_purge_fetch_caches": "Cache Management",
"server_waf_policies": "WAF Policies",
"server_ip_lists": "IP List",
"server_access_log_policies": "Access Log Policies",
"server_metrics": "Metrics",
"server_scripts": "Script Libraries",
"user_scripts": "User Scripts",
"server_global_settings": "Global Settings",
"nodes": "Edge Nodes",
"node_clusters": "Clusters",
"node_logs": "Node Logs",
"node_ip_list": "Node IPs",
"node_regions": "Regions",
"node_ssh_grants": "SSH Grants",
"node_distributed_monitors": "Distributed Monitors",
"node_anti_ddos_products": "Anti-DDoS Product",
"dns": "DNS Service",
"dns_clusters": "Clusters",
"dns_providers": "DNS Providers",
"dns_issues": "Issues",
"ns": "Edge DNS",
"ns_domains": "Domains",
"ns_domain_groups": "Domain Groups",
"ns_domain_batch_operations": "Batch",
"ns_clusters": "Clusters",
"ns_routes": "Routes",
"ns_settings": "Settings",
"ns_user_plans": "User Plans",
"ns_plans": "Plans",
"ns_access_logs": "Access Logs",
"ns_node_logs": "Node Logs",
"ns_resolve_test": "Testing",
"users": "Users",
"user_list": "Users",
"user_settings": "User Settings",
"finance": "Finance",
"finance_bills": "Bills",
"finance_accounts": "Accounts",
"finance_logs": "Logs",
"finance_orders": "Orders",
"finance_income": "Reports",
"finance_fee": "Fee Settings",
"finance_packages": "Traffic Packages",
"plans": "Plans",
"plan_list": "Plans",
"plan_user_plans": "User Plans",
"tickets": "Tickets",
"ticket_category": "Categories",
"admins": "System Users",
"admin_recipients": "Notification Medias",
"logs": "Audit Logs",
"settings": "Settings",
"setting_basic_settings": "Basic Settings",
"setting_advanced_settings": "Advanced Settings",
"setting_authority": "Commercial Authority"
}

View File

@@ -0,0 +1,20 @@
{
"tab_admin_server": "Admin Server Settings",
"tab_admin_ui": "Admin System UI",
"tab_user_ui": "User System UI",
"tab_admin_security_settings": "Security Settings",
"tab_updates": "Updates",
"tab_profile": "My Profile",
"tab_login": "My Login",
"tab_database": "Database",
"tab_api_nodes": "API Nodes",
"tab_user_nodes": "User Nodes",
"tab_monitor_nodes": "Monitor Nodes", // deprecated
"tab_ip_library": "IP Library",
"tab_client_operation_systems": "OS Management",
"tab_client_browsers": "Browser Management",
"tab_authority": "Commercial Authority",
"tab_access_log_databases": "Log Databases",
"tab_transfer": "Transfer",
"tab_backup": "Backup"
}

View File

@@ -0,0 +1,27 @@
{
"setting_basic": "${lang.admin_common@menu_setting_basic}",
"setting_dns": "${lang.admin_common@menu_setting_dns}",
"setting_health_check": "${lang.admin_common@menu_setting_health_check}",
"setting_service_global": "Site Settings",
"setting_cache_policy": "${lang.admin_common@menu_setting_cache_policy}",
"setting_waf_policy": "${lang.admin_common@menu_setting_waf_policy}",
"setting_waf_actions": "WAF Actions",
"setting_webp": "${lang.admin_common@menu_setting_webp_policy}",
"setting_metrics": "${lang.admin_common@menu_setting_metrics}",
"setting_ddos_protection": "${lang.admin_common@menu_setting_ddos_protection}",
"setting_security_policy": "${lang.admin_common@menu_setting_security_policy}",
"setting_uam": "UAM Policy",
"setting_cc": "CC Policy",
"setting_pages": "Pages",
"setting_http3": "HTTP/3",
"setting_schedule": "Scheduling",
"setting_thresholds": "Thresholds",
"setting_notification": "Notifications",
"setting_system_service": "System Service",
"setting_toa": "TOA",
"tab_cluster_dashboard": "Dashboard",
"tab_cluster_nodes": "Nodes",
"tab_cluster_settings": "Settings",
"tab_cluster_delete": "Delete"
}

View File

@@ -0,0 +1,18 @@
{
"create_single_node": "Create",
"create_multiple_nodes": "Create Batch",
"install_manually": "Manually",
"install_auto_register": "Auto-Register",
"install_remote": "Install Remotely(%d)", // Args: [Nodes Count]
"install_remote_upgrade": "Upgrade Remotely(%d)", // Args: [Nodes Count]
"setting_basic": "${lang.admin_common@menu_setting_basic}",
"setting_dns": "${lang.admin_common@menu_setting_dns}",
"setting_cache": "${lang.admin_common@menu_setting_cache}",
"setting_ddos_protection": "${lang.admin_common@menu_setting_ddos_protection}",
"setting_ssh": "SSH",
"setting_system": "System Settings",
"setting_schedule": "Scheduling",
"setting_thresholds": "Thresholds"
}

View File

@@ -0,0 +1,88 @@
{
"tab_dashboard": "Dashboard",
"tab_stat": "Statistics",
"tab_access_logs": "Access Logs",
"tab_settings": "Settings",
"tab_delete": "Delete",
"tab_server_list": "Sites",
"menu_dashboard": "Dashboard",
"menu_accesslog_realtime": "Realtime",
"menu_accesslog_today": "Today",
"menu_accesslog_history": "History",
"menu_stat_traffic": "Traffic",
"menu_stat_regions": "Regions",
"menu_stat_providers": "Providers",
"menu_stat_clients": "Clients",
"menu_stat_waf": "WAF",
"menu_setting_basic": "Basic Settings",
"menu_setting_dns": "DNS",
"menu_setting_domains": "Server Names",
"menu_setting_http": "HTTP",
"menu_setting_https": "HTTPS",
"menu_setting_origins": "Origin Sites",
"menu_setting_redirects": "URL Redirections",
"menu_setting_locations": "Locations",
"menu_setting_rewrite_rules": "Rewrite Rules",
"menu_setting_waf": "WAF",
"menu_setting_cache": "Cache",
"menu_setting_auth": "Access Control",
"menu_setting_referers": "Referers",
"menu_setting_user_agents": "UA List",
"menu_setting_charset": "Charset",
"menu_setting_access_log": "Access Log",
"menu_setting_stat": "Statistics",
"menu_setting_compression": "Compressions",
"menu_setting_optimization": "Content Optimizations",
"menu_setting_pages": "Pages",
"menu_setting_http_headers": "HTTP Headers",
"menu_setting_websocket": "Websocket",
"menu_setting_webp": "WebP",
"menu_setting_root": "Static Files",
"menu_setting_fastcgi": "Fastcgi",
"menu_setting_client_ip": "Client IP",
"menu_setting_request_limit": "Request Limit",
"menu_setting_others": "Others",
"menu_setting_tcp": "TCP",
"menu_setting_tls": "TLS",
"menu_setting_udp": "UDP",
"menu_setting_delete": "Delete",
"menu_setting_http_proxy": "HTTP Reverse Proxy", // in site groups
"menu_setting_tcp_proxy": "TCP Reverse Proxy", // in site groups
"menu_setting_udp_proxy": "UDP Reverse Proxy", // in site groups
"menu_setting_plan": "Plan",
"menu_setting_group": "Group",
"menu_setting_multimedia": "Audios & Videos",
"menu_setting_uam": "UAM",
"menu_setting_cc": "CC Protection",
"menu_setting_traffic_limit": "Traffic Limit",
"menu_setting_scripts": "Scripts",
"copy_setting_current_group": "Current Group: %s",
"copy_setting_current_user": "Current User: %s",
"copy_setting_current_cluster": "Current Cluster: %s",
"copy_setting_select_group": "Select Group",
"copy_setting_select_user": "Select User",
"copy_setting_select_cluster": "Select Cluster",
"copy_setting_select_server": "Select Site",
"server_names_log_update_server_names": "修改网站 %d 域名",
"log_update_global_settings": "保存网站全局配置",
"log_create_server": "创建网站 %d",
"log_delete_server": "删除网站 %d",
"log_update_server_basic": "修改网站 %d 基本信息",
"log_copy_server_configs": "从网站 %d 中同步配置 %s",
"log_submit_auditing_server": "提交网站 %d 域名审核",
"log_update_server_groups": "修改网站 %d 所属分组",
"log_enable_server": "启用网站 %d",
"log_disable_server": "停用网站 %d",
"log_update_server_name": "修改网站 %d 名称",
"log_update_server_is_on":"修改网站 %d 启用状态"
}

View File

@@ -0,0 +1,3 @@
{
"home_page": "https://goedge.cn"
}

View File

@@ -1 +0,0 @@
After change the messages, remember to run 'langs generate' to generate Go codes.

View File

@@ -5,6 +5,7 @@
"menu_setting_cache_policy": "缓存策略",
"menu_setting_waf_policy": "WAF策略",
"menu_setting_webp": "WebP",
"menu_setting_webp_policy": "WebP策略",
"menu_setting_metrics": "统计指标",
"menu_setting_ddos_protection": "DDoS防护",
"menu_setting_security_policy": "网络安全",

View File

@@ -12,6 +12,7 @@
"server_access_log_policies": "日志策略",
"server_metrics": "统计指标",
"server_scripts": "脚本库",
"user_scripts": "用户脚本",
"server_global_settings": "通用设置",
"nodes": "边缘节点",
@@ -55,6 +56,7 @@
"finance_packages": "流量包",
"plans": "套餐管理",
"plan_list": "套餐列表",
"plan_user_plans": "已购套餐",
"tickets": "工单系统",

View File

@@ -0,0 +1,3 @@
{
"log_update_ui_settings": "修改用户界面设置"
}

View File

@@ -11,5 +11,7 @@
"log_update_node": "修改节点 %d 基本信息",
"log_update_node_installation_status": "修改节点安装状态 %d",
"log_up_node": "手动上线节点 %d",
"log_update_node_on": "启用节点 %d",
"log_update_node_off": "停用节点 %d",
"log_delete_node_from_cluster": "从集群 %d 中删除节点 %d"
}

View File

@@ -6,7 +6,7 @@
"setting_cache_policy": "${lang.admin_common@menu_setting_cache_policy}",
"setting_waf_policy": "${lang.admin_common@menu_setting_waf_policy}",
"setting_waf_actions": "WAF动作",
"setting_webp": "${lang.admin_common@menu_setting_webp}",
"setting_webp": "${lang.admin_common@menu_setting_webp_policy}",
"setting_metrics": "${lang.admin_common@menu_setting_metrics}",
"setting_ddos_protection": "${lang.admin_common@menu_setting_ddos_protection}",
"setting_security_policy": "${lang.admin_common@menu_setting_security_policy}",

View File

@@ -4,7 +4,7 @@
"install_manually": "手动安装",
"install_auto_register": "自动注册",
"install_remote": "远程安装(%d)", // 参数:节点数量
"install_remote_upgrade": "远程升级(%d)", // 参数:节点数量,
"install_remote_upgrade": "远程升级(%d)", // 参数:节点数量
"setting_basic": "${lang.admin_common@menu_setting_basic}",
"setting_dns": "${lang.admin_common@menu_setting_dns}",

View File

@@ -0,0 +1,8 @@
{
"product_global": "全站",
"log_create_post": "创建文章 %d",
"log_publish_post": "发布文章 %d",
"log_delete_post": "删除文章 %d",
"log_update_post": "修改文章 %d"
}

View File

@@ -48,7 +48,6 @@
"menu_setting_others": "其他设置",
"menu_setting_tcp": "TCP",
"menu_setting_tls": "TLS",
"menu_setting_unix": "Unix",
"menu_setting_udp": "UDP",
"menu_setting_delete": "删除",
"menu_setting_http_proxy": "HTTP代理", // 网站分组中使用
@@ -56,6 +55,7 @@
"menu_setting_udp_proxy": "UDP代理", // 网站分组中使用
"menu_setting_plan": "套餐",
"menu_setting_group": "分组",
"menu_setting_multimedia": "音视频设置",
"menu_setting_uam": "5秒盾",
"menu_setting_cc": "CC防护",
@@ -83,6 +83,7 @@
"log_update_server_groups": "修改网站 %d 所属分组",
"log_enable_server": "启用网站 %d",
"log_disable_server": "停用网站 %d",
"log_update_server_name": "修改网站名称",
"log_update_server_is_on":"修改网站 %d 启用状态"
"log_update_server_name": "修改网站 %d 名称",
"log_update_server_is_on":"修改网站 %d 启用状态",
"log_delete_servers": "批量删除网站"
}

View File

@@ -0,0 +1,3 @@
{
"log_update_hls": "修改Web %d 的HLS设置"
}

View File

@@ -1,5 +1,6 @@
{
"log_create_origin": "创建源站 %d",
"log_delete_origin": "删除源站 %d",
"log_update_origin": "修改源站 %d"
"log_update_origin": "修改源站 %d",
"log_update_origin_is_on": "修改源站 %d 启用状态"
}

View File

@@ -0,0 +1,4 @@
{
"log_pass_user_script": "通过用户脚本 %d",
"log_reject_user_script": "驳回用户脚本 %d"
}

View File

@@ -8,11 +8,15 @@ func init() {
_ = DefaultWebPImagePolicy.Init()
}
var DefaultWebPImagePolicy = &WebPImagePolicy{
IsOn: true,
RequireCache: true,
MinLength: shared.NewSizeCapacity(0, shared.SizeCapacityUnitKB),
MaxLength: shared.NewSizeCapacity(128, shared.SizeCapacityUnitMB),
var DefaultWebPImagePolicy = NewWebPImagePolicy()
func NewWebPImagePolicy() *WebPImagePolicy {
return &WebPImagePolicy{
IsOn: true,
RequireCache: true,
MinLength: shared.NewSizeCapacity(0, shared.SizeCapacityUnitKB),
MaxLength: shared.NewSizeCapacity(128, shared.SizeCapacityUnitMB),
}
}
// WebPImagePolicy WebP策略
@@ -21,6 +25,7 @@ type WebPImagePolicy struct {
RequireCache bool `yaml:"requireCache" json:"requireCache"` // 需要在缓存条件下进行
MinLength *shared.SizeCapacity `yaml:"minLength" json:"minLength"` // 最小压缩对象比如4m, 24k
MaxLength *shared.SizeCapacity `yaml:"maxLength" json:"maxLength"` // 最大压缩对象
Quality int `yaml:"quality" json:"quality"` // 生成的图片质量0-100
minLength int64
maxLength int64

View File

@@ -28,6 +28,8 @@ var uamPolicyLocker = &sync.RWMutex{}
var httpCCPolicyLocker = &sync.RWMutex{}
var http3PolicyLocker = &sync.RWMutex{}
var httpPagesPolicyLocker = &sync.RWMutex{}
var webPPolicyLocker = &sync.RWMutex{}
var plansLocker = &sync.RWMutex{}
type ServerError struct {
Id int64
@@ -88,6 +90,9 @@ type NodeConfig struct {
Clock *ClockConfig `yaml:"clock" json:"clock"` // 时钟配置
AutoInstallNftables bool `yaml:"autoInstallNftables" json:"autoInstallNftables"` // 自动安装nftables
AutoSystemTuning bool `yaml:"autoSystemTuning" json:"autoSystemTuning"` // 自动调整系统参数
AutoTrimDisks bool `yaml:"autoTrimDisks" json:"autoTrimDisks"` // 自动执行TRIM
MaxConcurrentReads int `yaml:"maxConcurrentReads" json:"maxConcurrentReads"` // 最大并发读
MaxConcurrentWrites int `yaml:"maxConcurrentWrites" json:"maxConcurrentWrites"` // 最大并发写
// 指标
MetricItems []*serverconfigs.MetricItemConfig `yaml:"metricItems" json:"metricItems"`
@@ -98,16 +103,20 @@ type NodeConfig struct {
// 脚本
CommonScripts []*serverconfigs.CommonScript `yaml:"commonScripts" json:"commonScripts"`
WebPImagePolicies map[int64]*WebPImagePolicy `yaml:"webpImagePolicies" json:"webpImagePolicies"` // WebP相关配置clusterId => *WebPImagePolicy
UAMPolicies map[int64]*UAMPolicy `yaml:"uamPolicies" json:"uamPolicies"` // UAM相关配置clusterId => *UAMPolicy
HTTPCCPolicies map[int64]*HTTPCCPolicy `yaml:"httpCCPolicies" json:"httpCCPolicies"` // CC相关配置 clusterId => *HTTPCCPolicy
HTTP3Policies map[int64]*HTTP3Policy `yaml:"http3Policies" json:"http3Policies"` // HTTP3相关配置 clusterId => *HTTP3Policy
HTTPPagesPolicies map[int64]*HTTPPagesPolicy `yaml:"httpPagesPolicies" json:"httpPagesPolicies"` // 自定义页面clusterId => *HTTPPagesPolicy
NetworkSecurityPolicy *NetworkSecurityPolicy `yaml:"networkSecurityPolicy" json:"networkSecurityPolicy"` // 网络安全策略
WebPImagePolicies map[int64]*WebPImagePolicy `yaml:"webpImagePolicies" json:"webpImagePolicies"` // WebP相关配置clusterId => *WebPImagePolicy
UAMPolicies map[int64]*UAMPolicy `yaml:"uamPolicies" json:"uamPolicies"` // UAM相关配置clusterId => *UAMPolicy
HTTPCCPolicies map[int64]*HTTPCCPolicy `yaml:"httpCCPolicies" json:"httpCCPolicies"` // CC相关配置 clusterId => *HTTPCCPolicy
HTTP3Policies map[int64]*HTTP3Policy `yaml:"http3Policies" json:"http3Policies"` // HTTP3相关配置 clusterId => *HTTP3Policy
HTTPPagesPolicies map[int64]*HTTPPagesPolicy `yaml:"httpPagesPolicies" json:"httpPagesPolicies"` // 自定义页面clusterId => *HTTPPagesPolicy
NetworkSecurityPolicy *NetworkSecurityPolicy `yaml:"networkSecurityPolicy" json:"networkSecurityPolicy"` // 网络安全策略
Plans map[int64]*serverconfigs.PlanConfig `yaml:"plans" json:"plans"` // 套餐 plan id => *serverconfigs.PlanConfig
// DNS
DNSResolver *DNSResolverConfig `yaml:"dnsResolver" json:"dnsResolver"`
// Cluster
ClusterSecret string `yaml:"clusterSecret" json:"clusterSecret"`
paddedId string
// firewall
@@ -210,6 +219,12 @@ func CloneNodeConfig(nodeConfig *NodeConfig) (*NodeConfig, error) {
httpPagesPolicyLocker.RLock()
defer httpPagesPolicyLocker.RUnlock()
webPPolicyLocker.RLock()
defer webPPolicyLocker.RUnlock()
plansLocker.RLock()
defer plansLocker.RUnlock()
var newConfigValue = reflect.Indirect(reflect.ValueOf(&NodeConfig{}))
var oldValue = reflect.Indirect(reflect.ValueOf(nodeConfig))
var valueType = oldValue.Type()
@@ -376,14 +391,17 @@ func (this *NodeConfig) Init(ctx context.Context) (err error, serverErrors []*Se
}
// webp image policy
webPPolicyLocker.RLock()
if this.WebPImagePolicies != nil {
for _, policy := range this.WebPImagePolicies {
err = policy.Init()
if err != nil {
webPPolicyLocker.RUnlock()
return
}
}
}
webPPolicyLocker.RUnlock()
// uam policy
uamPolicyLocker.RLock()
@@ -437,6 +455,19 @@ func (this *NodeConfig) Init(ctx context.Context) (err error, serverErrors []*Se
}
httpPagesPolicyLocker.RUnlock()
// plans
plansLocker.RLock()
if len(this.Plans) > 0 {
for _, plan := range this.Plans {
err = plan.Init()
if err != nil {
plansLocker.RUnlock()
return
}
}
}
plansLocker.RUnlock()
// dns resolver
if this.DNSResolver != nil {
err = this.DNSResolver.Init()
@@ -599,9 +630,21 @@ func (this *NodeConfig) lookupWeb(server *serverconfigs.ServerConfig, web *serve
if (web.FirewallPolicy.BlockOptions == nil || !web.FirewallPolicy.BlockOptions.IsPrior) && server.HTTPFirewallPolicy.BlockOptions != nil {
web.FirewallPolicy.BlockOptions = server.HTTPFirewallPolicy.BlockOptions
}
if (web.FirewallPolicy.PageOptions == nil || !web.FirewallPolicy.PageOptions.IsPrior) && server.HTTPFirewallPolicy.PageOptions != nil {
web.FirewallPolicy.PageOptions = server.HTTPFirewallPolicy.PageOptions
}
if (web.FirewallPolicy.CaptchaOptions == nil || !web.FirewallPolicy.CaptchaOptions.IsPrior) && server.HTTPFirewallPolicy.CaptchaOptions != nil {
web.FirewallPolicy.CaptchaOptions = server.HTTPFirewallPolicy.CaptchaOptions
}
if (web.FirewallPolicy.Get302Options == nil || !web.FirewallPolicy.Get302Options.IsPrior) && server.HTTPFirewallPolicy.Get302Options != nil {
web.FirewallPolicy.Get302Options = server.HTTPFirewallPolicy.Get302Options
}
if (web.FirewallPolicy.Post307Options == nil || !web.FirewallPolicy.Post307Options.IsPrior) && server.HTTPFirewallPolicy.Post307Options != nil {
web.FirewallPolicy.Post307Options = server.HTTPFirewallPolicy.Post307Options
}
if (web.FirewallPolicy.JSCookieOptions == nil || !web.FirewallPolicy.JSCookieOptions.IsPrior) && server.HTTPFirewallPolicy.JSCookieOptions != nil {
web.FirewallPolicy.JSCookieOptions = server.HTTPFirewallPolicy.JSCookieOptions
}
if (web.FirewallPolicy.SYNFlood == nil || !web.FirewallPolicy.SYNFlood.IsPrior) && server.HTTPFirewallPolicy.SYNFlood != nil {
web.FirewallPolicy.SYNFlood = server.HTTPFirewallPolicy.SYNFlood
}
@@ -675,12 +718,22 @@ func (this *NodeConfig) UpdateCertOCSP(certId int64, ocsp []byte, expiresAt int6
// FindWebPImagePolicyWithClusterId 使用集群ID查找WebP策略
func (this *NodeConfig) FindWebPImagePolicyWithClusterId(clusterId int64) *WebPImagePolicy {
webPPolicyLocker.RLock()
defer webPPolicyLocker.RUnlock()
if this.WebPImagePolicies == nil {
return nil
}
return this.WebPImagePolicies[clusterId]
}
// UpdateWebPImagePolicies 修改集群WebP策略
func (this *NodeConfig) UpdateWebPImagePolicies(policies map[int64]*WebPImagePolicy) {
webPPolicyLocker.Lock()
defer webPPolicyLocker.Unlock()
this.WebPImagePolicies = policies
}
// FindUAMPolicyWithClusterId 使用集群ID查找UAM策略
func (this *NodeConfig) FindUAMPolicyWithClusterId(clusterId int64) *UAMPolicy {
uamPolicyLocker.RLock()
@@ -767,6 +820,27 @@ func (this *NodeConfig) FindHTTPPagesPolicyWithClusterId(clusterId int64) *HTTPP
return this.HTTPPagesPolicies[clusterId]
}
// UpdatePlans 更新套餐
func (this *NodeConfig) UpdatePlans(planMap map[int64]*serverconfigs.PlanConfig) {
plansLocker.Lock()
this.Plans = planMap
plansLocker.Unlock()
}
// FindAllPlans 查找所有套餐
func (this *NodeConfig) FindAllPlans() map[int64]*serverconfigs.PlanConfig {
plansLocker.RLock()
defer plansLocker.RUnlock()
return this.Plans
}
// 查找单个套餐
func (this *NodeConfig) FindPlan(planId int64) *serverconfigs.PlanConfig {
plansLocker.RLock()
defer plansLocker.RUnlock()
return this.Plans[planId]
}
// SecretHash 对Id和Secret的Hash计算
func (this *NodeConfig) SecretHash() string {
return this.secretHash

View File

@@ -0,0 +1,37 @@
# 比特位尺寸
## 定义
~~~json
{
"count": "数量",
"unit": "单位"
}
~~~
其中:
* `数量` - 必须是一个整数数字
* `单位` - 有以下几个值:
* `b` - 比特
* `kb` - Kb
* `mb` - Mb
* `gb` - Gb
* `tb` - Tb
* `pb` - Pb
* `eb` - Eb
## 示例
100Mb
~~~
{
"count": 100,
"unit": "mb"
}
~~~
32Gb
~~~
{
"count": 32,
"unit": "gb"
}
~~~

View File

@@ -11,11 +11,13 @@
"purgeIsOn": "是否允许使用Purge方法清理",
"purgeKey": "Purge时使用的X-Edge-Purge-Key",
"stale": "陈旧缓存使用策略",
"key": "主域名配置",
"cacheRefs": ["缓存条件1", "缓存条件2", ...]
}
~~~
其中:
* `缓存条件` - 参考 {json:http_cache_ref}
* `主域名配置` 参考本文“主域名”配置部分
## 示例
### 无缓存条件
@@ -90,3 +92,32 @@
]
}
~~~
## 主域名配置
~~~json
{
"isOn": "true|false",
"scheme": "https|http",
"host": "域名,必须是当前网站已绑定的域名"
}
~~~
### 示例
#### 不使用主域名
~~~json
{
"isOn": false
}
~~~
#### 使用主域名
~~~json
{
"isOn": true,
"scheme": "https",
"host": "example.com"
}
~~~
如果启用主域名,则缓存键值中的域名会被自动换成主域名,清理缓存的时候也需要使用此主域名。

View File

@@ -4,7 +4,9 @@
{
"isPrior": "是否覆盖上级配置",
"isOn": "是否启用配置",
"firewallPolicyId": "WAF策略ID"
"firewallPolicyId": "WAF策略ID",
"ignoreGlobalRules": "是否忽略系统定义的全局规则",
"defaultCaptchaType": "默认人机识别方式可以选none不设置、default默认、oneClick单击验证、slide滑动解锁、geetest极验"
}
~~~
@@ -13,6 +15,8 @@
{
"isPrior": true,
"isOn": true,
"firewallPolicyId": 123
"firewallPolicyId": 123,
"ignoreGlobalRules": false,
"defaultCaptchaType": "none"
}
~~~

View File

@@ -0,0 +1,37 @@
# 容量
## 定义
~~~json
{
"count": "数量",
"unit": "单位"
}
~~~
其中:
* `数量` - 必须是一个整数数字
* `单位` - 有以下几个值:
* `byte` - 字节
* `kb` - KB
* `mb` - MB
* `gb` - GB
* `tb` - TB
* `pb` - PB
* `eb` - EB
## 示例
100MB
~~~
{
"count": 100,
"unit": "mb"
}
~~~
32GB
~~~
{
"count": 32,
"unit": "gb"
}
~~~

View File

@@ -25,15 +25,16 @@ type HTTPCacheTaskKey struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 缓存键ID
TaskId int64 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId,omitempty"` // 任务ID
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // 缓存键
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // 操作类型purge|fetch
KeyType string `protobuf:"bytes,5,opt,name=keyType,proto3" json:"keyType,omitempty"` // 键类型key|prefix
IsDone bool `protobuf:"varint,6,opt,name=isDone,proto3" json:"isDone,omitempty"` // 是否已完成
IsDoing bool `protobuf:"varint,9,opt,name=isDoing,proto3" json:"isDoing,omitempty"` // 是否执行中
ErrorsJSON []byte `protobuf:"bytes,7,opt,name=errorsJSON,proto3" json:"errorsJSON,omitempty"` // 错误信息
NodeClusterId int64 `protobuf:"varint,8,opt,name=nodeClusterId,proto3" json:"nodeClusterId,omitempty"` // 所属集群ID
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 缓存键ID
TaskId int64 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId,omitempty"` // 任务ID
Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // 缓存键
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // 操作类型purge|fetch
KeyType string `protobuf:"bytes,5,opt,name=keyType,proto3" json:"keyType,omitempty"` // 键类型key|prefix
IsDone bool `protobuf:"varint,6,opt,name=isDone,proto3" json:"isDone,omitempty"` // 是否已完成
IsDoing bool `protobuf:"varint,9,opt,name=isDoing,proto3" json:"isDoing,omitempty"` // 是否执行中
ErrorsJSON []byte `protobuf:"bytes,7,opt,name=errorsJSON,proto3" json:"errorsJSON,omitempty"` // 错误信息
NodeClusterId int64 `protobuf:"varint,8,opt,name=nodeClusterId,proto3" json:"nodeClusterId,omitempty"` // 所属集群ID
NodeCluster *NodeCluster `protobuf:"bytes,30,opt,name=nodeCluster,proto3" json:"nodeCluster,omitempty"` // 所属集群,不一定有内容
}
func (x *HTTPCacheTaskKey) Reset() {
@@ -131,29 +132,41 @@ func (x *HTTPCacheTaskKey) GetNodeClusterId() int64 {
return 0
}
func (x *HTTPCacheTaskKey) GetNodeCluster() *NodeCluster {
if x != nil {
return x.NodeCluster
}
return nil
}
var File_models_model_http_cache_task_key_proto protoreflect.FileDescriptor
var file_models_model_http_cache_task_key_proto_rawDesc = []byte{
0x0a, 0x26, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68,
0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6b,
0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xf2, 0x01, 0x0a,
0x10, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4b, 0x65,
0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74,
0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x44,
0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x44, 0x6f, 0x6e,
0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01,
0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x24, 0x0a, 0x0d, 0x6e,
0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49,
0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1f, 0x6d, 0x6f,
0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f,
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x02,
0x0a, 0x10, 0x48, 0x54, 0x54, 0x50, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x4b,
0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x03, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04,
0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73,
0x44, 0x6f, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x44, 0x6f,
0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20,
0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x24, 0x0a, 0x0d,
0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x08, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
0x49, 0x64, 0x12, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64,
0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -171,13 +184,15 @@ func file_models_model_http_cache_task_key_proto_rawDescGZIP() []byte {
var file_models_model_http_cache_task_key_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_model_http_cache_task_key_proto_goTypes = []interface{}{
(*HTTPCacheTaskKey)(nil), // 0: pb.HTTPCacheTaskKey
(*NodeCluster)(nil), // 1: pb.NodeCluster
}
var file_models_model_http_cache_task_key_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
1, // 0: pb.HTTPCacheTaskKey.nodeCluster:type_name -> pb.NodeCluster
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_models_model_http_cache_task_key_proto_init() }
@@ -185,6 +200,7 @@ func file_models_model_http_cache_task_key_proto_init() {
if File_models_model_http_cache_task_key_proto != nil {
return
}
file_models_model_node_cluster_proto_init()
if !protoimpl.UnsafeEnabled {
file_models_model_http_cache_task_key_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HTTPCacheTaskKey); i {

View File

@@ -20,21 +20,26 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// WAF策略
type HTTPFirewallPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Mode string `protobuf:"bytes,7,opt,name=mode,proto3" json:"mode,omitempty"`
IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
InboundJSON []byte `protobuf:"bytes,5,opt,name=inboundJSON,proto3" json:"inboundJSON,omitempty"`
OutboundJSON []byte `protobuf:"bytes,6,opt,name=outboundJSON,proto3" json:"outboundJSON,omitempty"`
ServerId int64 `protobuf:"varint,8,opt,name=serverId,proto3" json:"serverId,omitempty"`
UseLocalFirewall bool `protobuf:"varint,9,opt,name=useLocalFirewall,proto3" json:"useLocalFirewall,omitempty"`
SynFloodJSON []byte `protobuf:"bytes,10,opt,name=synFloodJSON,proto3" json:"synFloodJSON,omitempty"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 策略ID
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 名称
Mode string `protobuf:"bytes,7,opt,name=mode,proto3" json:"mode,omitempty"` // 模式
IsOn bool `protobuf:"varint,3,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // 描述
InboundJSON []byte `protobuf:"bytes,5,opt,name=inboundJSON,proto3" json:"inboundJSON,omitempty"` // 入站配置
OutboundJSON []byte `protobuf:"bytes,6,opt,name=outboundJSON,proto3" json:"outboundJSON,omitempty"` // 出站配置
ServerId int64 `protobuf:"varint,8,opt,name=serverId,proto3" json:"serverId,omitempty"` // 所属网站ID如果为0表示公共策略
UseLocalFirewall bool `protobuf:"varint,9,opt,name=useLocalFirewall,proto3" json:"useLocalFirewall,omitempty"` // 是否使用本机防火墙
SynFloodJSON []byte `protobuf:"bytes,10,opt,name=synFloodJSON,proto3" json:"synFloodJSON,omitempty"` // synflood配置
BlockOptionsJSON []byte `protobuf:"bytes,11,opt,name=blockOptionsJSON,proto3" json:"blockOptionsJSON,omitempty"` // 阻止动作配置
PageOptionsJSON []byte `protobuf:"bytes,13,opt,name=pageOptionsJSON,proto3" json:"pageOptionsJSON,omitempty"` // 显示网页动作配置
CaptchaOptionsJSON []byte `protobuf:"bytes,12,opt,name=captchaOptionsJSON,proto3" json:"captchaOptionsJSON,omitempty"` // 人机识别配置
JsCookieOptionsJSON []byte `protobuf:"bytes,14,opt,name=jsCookieOptionsJSON,proto3" json:"jsCookieOptionsJSON,omitempty"` // JSCookie动作配置
}
func (x *HTTPFirewallPolicy) Reset() {
@@ -139,12 +144,40 @@ func (x *HTTPFirewallPolicy) GetSynFloodJSON() []byte {
return nil
}
func (x *HTTPFirewallPolicy) GetBlockOptionsJSON() []byte {
if x != nil {
return x.BlockOptionsJSON
}
return nil
}
func (x *HTTPFirewallPolicy) GetPageOptionsJSON() []byte {
if x != nil {
return x.PageOptionsJSON
}
return nil
}
func (x *HTTPFirewallPolicy) GetCaptchaOptionsJSON() []byte {
if x != nil {
return x.CaptchaOptionsJSON
}
return nil
}
func (x *HTTPFirewallPolicy) GetJsCookieOptionsJSON() []byte {
if x != nil {
return x.JsCookieOptionsJSON
}
return nil
}
var File_models_model_http_firewall_policy_proto protoreflect.FileDescriptor
var file_models_model_http_firewall_policy_proto_rawDesc = []byte{
0x0a, 0x27, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x68,
0x74, 0x74, 0x70, 0x5f, 0x66, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x5f, 0x70, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xb4, 0x02,
0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xec, 0x03,
0x0a, 0x12, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
@@ -164,8 +197,19 @@ var file_models_model_http_firewall_policy_proto_rawDesc = []byte{
0x75, 0x73, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x12, 0x22, 0x0a, 0x0c, 0x73, 0x79, 0x6e, 0x46, 0x6c, 0x6f, 0x6f, 0x64, 0x4a, 0x53, 0x4f, 0x4e,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x79, 0x6e, 0x46, 0x6c, 0x6f, 0x6f, 0x64,
0x4a, 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2a, 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10,
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e,
0x12, 0x28, 0x0a, 0x0f, 0x70, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a,
0x53, 0x4f, 0x4e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x61, 0x67, 0x65, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61,
0x70, 0x74, 0x63, 0x68, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e,
0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x30, 0x0a, 0x13, 0x6a, 0x73,
0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f,
0x4e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x6a, 0x73, 0x43, 0x6f, 0x6f, 0x6b, 0x69,
0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -26,6 +26,7 @@ type IPItem struct {
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Value string `protobuf:"bytes,22,opt,name=value,proto3" json:"value,omitempty"` // 原始值比如单个IP、IP范围或者CIDR
IpFrom string `protobuf:"bytes,2,opt,name=ipFrom,proto3" json:"ipFrom,omitempty"`
IpTo string `protobuf:"bytes,3,opt,name=ipTo,proto3" json:"ipTo,omitempty"`
Version int64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"`
@@ -93,6 +94,13 @@ func (x *IPItem) GetId() int64 {
return 0
}
func (x *IPItem) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
func (x *IPItem) GetIpFrom() string {
if x != nil {
return x.IpFrom
@@ -291,76 +299,77 @@ var file_models_model_ip_item_proto_rawDesc = []byte{
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, 0x1a, 0x17, 0x6d, 0x6f,
0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x08, 0x0a, 0x06, 0x49, 0x50, 0x49, 0x74, 0x65, 0x6d,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x08, 0x0a, 0x06, 0x49, 0x50, 0x49, 0x74, 0x65, 0x6d,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
0x12, 0x16, 0x0a, 0x06, 0x69, 0x70, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x69, 0x70, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x70, 0x54, 0x6f,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x70, 0x54, 0x6f, 0x12, 0x18, 0x0a, 0x07,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65,
0x64, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72,
0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06,
0x6c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6c, 0x69,
0x73, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x54, 0x79,
0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x54, 0x79,
0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x18, 0x14,
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x1c,
0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06,
0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f,
0x64, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64,
0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64,
0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64,
0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f,
0x64, 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65,
0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x1a,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03,
0x52, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x1d,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x12, 0x20,
0x01, 0x28, 0x03, 0x52, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x49, 0x64, 0x12, 0x40, 0x0a, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x49,
0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48,
0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53,
0x65, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x18, 0x15,
0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x2e, 0x0a, 0x0c,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x0c,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x06,
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70,
0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x12, 0x52, 0x0a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1f, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x18, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x12, 0x5b, 0x0a, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72,
0x6f, 0x75, 0x70, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x48,
0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47,
0x72, 0x6f, 0x75, 0x70, 0x52, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x70, 0x46, 0x72, 0x6f, 0x6d,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x70, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x12,
0x0a, 0x04, 0x69, 0x70, 0x54, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x70,
0x54, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20,
0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09,
0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65,
0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73,
0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01,
0x28, 0x03, 0x52, 0x06, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69,
0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08,
0x6c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x6c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x47, 0x6c,
0x6f, 0x62, 0x61, 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x47, 0x6c,
0x6f, 0x62, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01,
0x28, 0x03, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65,
0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65,
0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x10, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
0x49, 0x64, 0x12, 0x3e, 0x0a, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64,
0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x49, 0x64, 0x12, 0x44, 0x0a, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x12, 0x55, 0x0a, 0x19, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x18, 0x21,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x52, 0x19, 0x73,
0x70, 0x49, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c,
0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1b, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75,
0x6c, 0x65, 0x53, 0x65, 0x74, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1b, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70,
0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f,
0x64, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73,
0x52, 0x65, 0x61, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x52, 0x65,
0x61, 0x64, 0x12, 0x2e, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65,
0x72, 0x76, 0x65, 0x72, 0x52, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x22, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06,
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x52, 0x0a, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x52, 0x18, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5b, 0x0a, 0x1b, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x52, 0x75, 0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x1b, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75,
0x6c, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x55, 0x0a, 0x19, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c,
0x65, 0x53, 0x65, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65,
0x53, 0x65, 0x74, 0x52, 0x19, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x12, 0x28,
0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x18, 0x23, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -46,7 +46,10 @@ type NodeCluster struct {
AutoRemoteStart bool `protobuf:"varint,19,opt,name=autoRemoteStart,proto3" json:"autoRemoteStart,omitempty"`
AutoInstallNftables bool `protobuf:"varint,20,opt,name=autoInstallNftables,proto3" json:"autoInstallNftables,omitempty"`
SshParamsJSON []byte `protobuf:"bytes,21,opt,name=sshParamsJSON,proto3" json:"sshParamsJSON,omitempty"`
AutoSystemTuning bool `protobuf:"varint,23,opt,name=autoSystemTuning,proto3" json:"autoSystemTuning,omitempty"` // 是否自动调节系统参数
AutoSystemTuning bool `protobuf:"varint,23,opt,name=autoSystemTuning,proto3" json:"autoSystemTuning,omitempty"` // 是否自动调节系统参数
AutoTrimDisks bool `protobuf:"varint,24,opt,name=autoTrimDisks,proto3" json:"autoTrimDisks,omitempty"` // 是否自动TRIM硬盘
MaxConcurrentReads int32 `protobuf:"varint,25,opt,name=maxConcurrentReads,proto3" json:"maxConcurrentReads,omitempty"` // 最大并发读
MaxConcurrentWrites int32 `protobuf:"varint,26,opt,name=maxConcurrentWrites,proto3" json:"maxConcurrentWrites,omitempty"` // 最大并发写
}
func (x *NodeCluster) Reset() {
@@ -235,12 +238,33 @@ func (x *NodeCluster) GetAutoSystemTuning() bool {
return false
}
func (x *NodeCluster) GetAutoTrimDisks() bool {
if x != nil {
return x.AutoTrimDisks
}
return false
}
func (x *NodeCluster) GetMaxConcurrentReads() int32 {
if x != nil {
return x.MaxConcurrentReads
}
return 0
}
func (x *NodeCluster) GetMaxConcurrentWrites() int32 {
if x != nil {
return x.MaxConcurrentWrites
}
return 0
}
var File_models_model_node_cluster_proto protoreflect.FileDescriptor
var file_models_model_node_cluster_proto_rawDesc = []byte{
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xf3, 0x05, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xfb, 0x06, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65,
@@ -287,8 +311,17 @@ var file_models_model_node_cluster_proto_rawDesc = []byte{
0x52, 0x0d, 0x73, 0x73, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12,
0x2a, 0x0a, 0x10, 0x61, 0x75, 0x74, 0x6f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x75, 0x6e,
0x69, 0x6e, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x75, 0x74, 0x6f, 0x53,
0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x61,
0x75, 0x74, 0x6f, 0x54, 0x72, 0x69, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x18, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x54, 0x72, 0x69, 0x6d, 0x44, 0x69, 0x73, 0x6b,
0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65,
0x6e, 0x74, 0x52, 0x65, 0x61, 0x64, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x6d,
0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x61, 0x64,
0x73, 0x12, 0x30, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65,
0x6e, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13,
0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x57, 0x72, 0x69,
0x74, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (

View File

@@ -25,23 +25,29 @@ type Plan struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"`
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"`
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"`
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"`
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"`
BandwidthPriceJSON []byte `protobuf:"bytes,12,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"`
MonthlyPrice float64 `protobuf:"fixed64,9,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"`
SeasonallyPrice float64 `protobuf:"fixed64,10,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"`
YearlyPrice float64 `protobuf:"fixed64,11,opt,name=yearlyPrice,proto3" json:"yearlyPrice,omitempty"`
TotalServers int32 `protobuf:"varint,13,opt,name=totalServers,proto3" json:"totalServers,omitempty"` // 可以添加的网站数
TotalServerNamesPerServer int32 `protobuf:"varint,14,opt,name=totalServerNamesPerServer,proto3" json:"totalServerNamesPerServer,omitempty"` // 每个网站可以添加的域名数
TotalServerNames int32 `protobuf:"varint,15,opt,name=totalServerNames,proto3" json:"totalServerNames,omitempty"` // 可以添加的域名总数
DailyRequests int64 `protobuf:"varint,16,opt,name=dailyRequests,proto3" json:"dailyRequests,omitempty"` // 每日访问量额度
MonthlyRequests int64 `protobuf:"varint,17,opt,name=monthlyRequests,proto3" json:"monthlyRequests,omitempty"` // 每月访问量额度
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 套餐ID
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 套餐名称
Description string `protobuf:"bytes,21,opt,name=description,proto3" json:"description,omitempty"` // 套餐简介
ClusterId int64 `protobuf:"varint,4,opt,name=clusterId,proto3" json:"clusterId,omitempty"` // 集群ID
TrafficLimitJSON []byte `protobuf:"bytes,5,opt,name=trafficLimitJSON,proto3" json:"trafficLimitJSON,omitempty"` // 流量限制
BandwidthLimitPerNodeJSON []byte `protobuf:"bytes,22,opt,name=bandwidthLimitPerNodeJSON,proto3" json:"bandwidthLimitPerNodeJSON,omitempty"` // 单节点带宽限制
HasFullFeatures bool `protobuf:"varint,20,opt,name=hasFullFeatures,proto3" json:"hasFullFeatures,omitempty"` // 是否有所有权限
FeaturesJSON []byte `protobuf:"bytes,6,opt,name=featuresJSON,proto3" json:"featuresJSON,omitempty"` // 权限列表,[code1, code2, ...]
PriceType string `protobuf:"bytes,7,opt,name=priceType,proto3" json:"priceType,omitempty"` // 价格类型traffic, bandwidth, period
TrafficPriceJSON []byte `protobuf:"bytes,8,opt,name=trafficPriceJSON,proto3" json:"trafficPriceJSON,omitempty"` // 流量价格配置
BandwidthPriceJSON []byte `protobuf:"bytes,12,opt,name=bandwidthPriceJSON,proto3" json:"bandwidthPriceJSON,omitempty"` // 带宽价格配置
MonthlyPrice float64 `protobuf:"fixed64,9,opt,name=monthlyPrice,proto3" json:"monthlyPrice,omitempty"` // 月度价格
SeasonallyPrice float64 `protobuf:"fixed64,10,opt,name=seasonallyPrice,proto3" json:"seasonallyPrice,omitempty"` // 季度价格
YearlyPrice float64 `protobuf:"fixed64,11,opt,name=yearlyPrice,proto3" json:"yearlyPrice,omitempty"` // 年度价格
TotalServers int32 `protobuf:"varint,13,opt,name=totalServers,proto3" json:"totalServers,omitempty"` // 可以添加的网站数
TotalServerNamesPerServer int32 `protobuf:"varint,14,opt,name=totalServerNamesPerServer,proto3" json:"totalServerNamesPerServer,omitempty"` // 每个网站可以添加的域名数
TotalServerNames int32 `protobuf:"varint,15,opt,name=totalServerNames,proto3" json:"totalServerNames,omitempty"` // 可以添加的域名总数
DailyRequests int64 `protobuf:"varint,16,opt,name=dailyRequests,proto3" json:"dailyRequests,omitempty"` // 每日访问量额度
MonthlyRequests int64 `protobuf:"varint,17,opt,name=monthlyRequests,proto3" json:"monthlyRequests,omitempty"` // 每月访问量额度
DailyWebsocketConnections int64 `protobuf:"varint,18,opt,name=dailyWebsocketConnections,proto3" json:"dailyWebsocketConnections,omitempty"` // 每日Websocket连接数额度
MonthlyWebsocketConnections int64 `protobuf:"varint,19,opt,name=monthlyWebsocketConnections,proto3" json:"monthlyWebsocketConnections,omitempty"` // 每月Websocket连接数额度
MaxUploadSizeJSON []byte `protobuf:"bytes,23,opt,name=maxUploadSizeJSON,proto3" json:"maxUploadSizeJSON,omitempty"` // 文件最大上传尺寸 @link json:size_capacity
}
func (x *Plan) Reset() {
@@ -97,6 +103,13 @@ func (x *Plan) GetName() string {
return ""
}
func (x *Plan) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Plan) GetClusterId() int64 {
if x != nil {
return x.ClusterId
@@ -111,6 +124,20 @@ func (x *Plan) GetTrafficLimitJSON() []byte {
return nil
}
func (x *Plan) GetBandwidthLimitPerNodeJSON() []byte {
if x != nil {
return x.BandwidthLimitPerNodeJSON
}
return nil
}
func (x *Plan) GetHasFullFeatures() bool {
if x != nil {
return x.HasFullFeatures
}
return false
}
func (x *Plan) GetFeaturesJSON() []byte {
if x != nil {
return x.FeaturesJSON
@@ -195,52 +222,92 @@ func (x *Plan) GetMonthlyRequests() int64 {
return 0
}
func (x *Plan) GetDailyWebsocketConnections() int64 {
if x != nil {
return x.DailyWebsocketConnections
}
return 0
}
func (x *Plan) GetMonthlyWebsocketConnections() int64 {
if x != nil {
return x.MonthlyWebsocketConnections
}
return 0
}
func (x *Plan) GetMaxUploadSizeJSON() []byte {
if x != nil {
return x.MaxUploadSizeJSON
}
return nil
}
var File_models_model_plan_proto protoreflect.FileDescriptor
var file_models_model_plan_proto_rawDesc = []byte{
0x0a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70,
0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xf4, 0x04,
0x6c, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xac, 0x07,
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,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 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, 0x01, 0x52, 0x0c, 0x6d, 0x6f,
0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65,
0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x01, 0x52, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50,
0x72, 0x69, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72,
0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c,
0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53,
0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x19, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65,
0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50,
0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01,
0x28, 0x05, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e,
0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x61, 0x69,
0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6f,
0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x11, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20,
0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20,
0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a,
0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x53,
0x4f, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69,
0x63, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x3c, 0x0a, 0x19, 0x62, 0x61,
0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x4e,
0x6f, 0x64, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x19, 0x62,
0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72,
0x4e, 0x6f, 0x64, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x61, 0x73, 0x46,
0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28,
0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72,
0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, 0x53,
0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72,
0x65, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54,
0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65,
0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50,
0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10,
0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e,
0x12, 0x2e, 0x0a, 0x12, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69,
0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x62, 0x61,
0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x50, 0x72, 0x69, 0x63, 0x65, 0x4a, 0x53, 0x4f, 0x4e,
0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65,
0x18, 0x09, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x50,
0x72, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c,
0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0f, 0x73,
0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x20,
0x0a, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20,
0x01, 0x28, 0x01, 0x52, 0x0b, 0x79, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x50, 0x72, 0x69, 0x63, 0x65,
0x12, 0x22, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72,
0x76, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72,
0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65,
0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65,
0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65,
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24,
0x0a, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18,
0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d,
0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3c,
0x0a, 0x19, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28,
0x03, 0x52, 0x19, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65,
0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x40, 0x0a, 0x1b,
0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28,
0x03, 0x52, 0x1b, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x6c, 0x79, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63,
0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c,
0x0a, 0x11, 0x6d, 0x61, 0x78, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x4a,
0x53, 0x4f, 0x4e, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x55, 0x70,
0x6c, 0x6f, 0x61, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x4a, 0x53, 0x4f, 0x4e, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

246
pkg/rpc/pb/model_post.pb.go Normal file
View File

@@ -0,0 +1,246 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.19.4
// source: models/model_post.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 文章
type Post struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID
PostCategoryId int64 `protobuf:"varint,2,opt,name=postCategoryId,proto3" json:"postCategoryId,omitempty"` // 分类ID
ProductCode string `protobuf:"bytes,3,opt,name=productCode,proto3" json:"productCode,omitempty"` // 产品代号
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // 类型normal, url
Subject string `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` // 标题
Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"` // URL
Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` // 内容
CreatedAt int64 `protobuf:"varint,8,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间
IsPublished bool `protobuf:"varint,9,opt,name=isPublished,proto3" json:"isPublished,omitempty"` // 是否已发布
PublishedAt int64 `protobuf:"varint,10,opt,name=publishedAt,proto3" json:"publishedAt,omitempty"` // 发布时间
PostCategory *PostCategory `protobuf:"bytes,30,opt,name=postCategory,proto3" json:"postCategory,omitempty"` // 分类信息
}
func (x *Post) Reset() {
*x = Post{}
if protoimpl.UnsafeEnabled {
mi := &file_models_model_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Post) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Post) ProtoMessage() {}
func (x *Post) ProtoReflect() protoreflect.Message {
mi := &file_models_model_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Post.ProtoReflect.Descriptor instead.
func (*Post) Descriptor() ([]byte, []int) {
return file_models_model_post_proto_rawDescGZIP(), []int{0}
}
func (x *Post) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Post) GetPostCategoryId() int64 {
if x != nil {
return x.PostCategoryId
}
return 0
}
func (x *Post) GetProductCode() string {
if x != nil {
return x.ProductCode
}
return ""
}
func (x *Post) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *Post) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
func (x *Post) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *Post) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
func (x *Post) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
func (x *Post) GetIsPublished() bool {
if x != nil {
return x.IsPublished
}
return false
}
func (x *Post) GetPublishedAt() int64 {
if x != nil {
return x.PublishedAt
}
return 0
}
func (x *Post) GetPostCategory() *PostCategory {
if x != nil {
return x.PostCategory
}
return nil
}
var File_models_model_post_proto protoreflect.FileDescriptor
var file_models_model_post_proto_rawDesc = []byte{
0x0a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70,
0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x6d,
0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x74,
0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xcc, 0x02, 0x0a, 0x04, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x74,
0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64,
0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43, 0x6f,
0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63,
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74,
0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73,
0x68, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x50, 0x75, 0x62,
0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73,
0x68, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x75, 0x62,
0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x34, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x74,
0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
0x52, 0x0c, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_models_model_post_proto_rawDescOnce sync.Once
file_models_model_post_proto_rawDescData = file_models_model_post_proto_rawDesc
)
func file_models_model_post_proto_rawDescGZIP() []byte {
file_models_model_post_proto_rawDescOnce.Do(func() {
file_models_model_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_post_proto_rawDescData)
})
return file_models_model_post_proto_rawDescData
}
var file_models_model_post_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_model_post_proto_goTypes = []interface{}{
(*Post)(nil), // 0: pb.Post
(*PostCategory)(nil), // 1: pb.PostCategory
}
var file_models_model_post_proto_depIdxs = []int32{
1, // 0: pb.Post.postCategory:type_name -> pb.PostCategory
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_models_model_post_proto_init() }
func file_models_model_post_proto_init() {
if File_models_model_post_proto != nil {
return
}
file_models_model_post_category_proto_init()
if !protoimpl.UnsafeEnabled {
file_models_model_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Post); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_models_model_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_models_model_post_proto_goTypes,
DependencyIndexes: file_models_model_post_proto_depIdxs,
MessageInfos: file_models_model_post_proto_msgTypes,
}.Build()
File_models_model_post_proto = out.File
file_models_model_post_proto_rawDesc = nil
file_models_model_post_proto_goTypes = nil
file_models_model_post_proto_depIdxs = nil
}

View File

@@ -0,0 +1,171 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.19.4
// source: models/model_post_category.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 文章分类
type PostCategory struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 名称
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // 文章代号
IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
}
func (x *PostCategory) Reset() {
*x = PostCategory{}
if protoimpl.UnsafeEnabled {
mi := &file_models_model_post_category_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PostCategory) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PostCategory) ProtoMessage() {}
func (x *PostCategory) ProtoReflect() protoreflect.Message {
mi := &file_models_model_post_category_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PostCategory.ProtoReflect.Descriptor instead.
func (*PostCategory) Descriptor() ([]byte, []int) {
return file_models_model_post_category_proto_rawDescGZIP(), []int{0}
}
func (x *PostCategory) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *PostCategory) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *PostCategory) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *PostCategory) GetIsOn() bool {
if x != nil {
return x.IsOn
}
return false
}
var File_models_model_post_category_proto protoreflect.FileDescriptor
var file_models_model_post_category_proto_rawDesc = []byte{
0x0a, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70,
0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x5a, 0x0a, 0x0c, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x02, 0x69, 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, 0x63, 0x6f,
0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73,
0x4f, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
file_models_model_post_category_proto_rawDescOnce sync.Once
file_models_model_post_category_proto_rawDescData = file_models_model_post_category_proto_rawDesc
)
func file_models_model_post_category_proto_rawDescGZIP() []byte {
file_models_model_post_category_proto_rawDescOnce.Do(func() {
file_models_model_post_category_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_post_category_proto_rawDescData)
})
return file_models_model_post_category_proto_rawDescData
}
var file_models_model_post_category_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_model_post_category_proto_goTypes = []interface{}{
(*PostCategory)(nil), // 0: pb.PostCategory
}
var file_models_model_post_category_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_models_model_post_category_proto_init() }
func file_models_model_post_category_proto_init() {
if File_models_model_post_category_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_models_model_post_category_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PostCategory); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_models_model_post_category_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_models_model_post_category_proto_goTypes,
DependencyIndexes: file_models_model_post_category_proto_depIdxs,
MessageInfos: file_models_model_post_category_proto_msgTypes,
}.Build()
File_models_model_post_category_proto = out.File
file_models_model_post_category_proto_rawDesc = nil
file_models_model_post_category_proto_goTypes = nil
file_models_model_post_category_proto_depIdxs = nil
}

View File

@@ -33,7 +33,8 @@ type RegionCountry struct {
CustomName string `protobuf:"bytes,5,opt,name=customName,proto3" json:"customName,omitempty"`
CustomCodes []string `protobuf:"bytes,6,rep,name=customCodes,proto3" json:"customCodes,omitempty"`
DisplayName string `protobuf:"bytes,7,opt,name=displayName,proto3" json:"displayName,omitempty"`
IsCommon bool `protobuf:"varint,8,opt,name=isCommon,proto3" json:"isCommon,omitempty"` // 是否常用
IsCommon bool `protobuf:"varint,8,opt,name=isCommon,proto3" json:"isCommon,omitempty"` // 是否常用
RouteCode string `protobuf:"bytes,9,opt,name=routeCode,proto3" json:"routeCode,omitempty"` // 线路代号
}
func (x *RegionCountry) Reset() {
@@ -124,12 +125,19 @@ func (x *RegionCountry) GetIsCommon() bool {
return false
}
func (x *RegionCountry) GetRouteCode() string {
if x != nil {
return x.RouteCode
}
return ""
}
var File_models_model_region_country_proto protoreflect.FileDescriptor
var file_models_model_region_country_proto_rawDesc = []byte{
0x0a, 0x21, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x72,
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xe1, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69,
0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xff, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a,
@@ -143,8 +151,10 @@ var file_models_model_region_country_proto_rawDesc = []byte{
0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x1a, 0x0a, 0x08, 0x69, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28,
0x08, 0x52, 0x08, 0x69, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x08, 0x52, 0x08, 0x69, 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72,
0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -20,18 +20,20 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 省份|州|区域信息
type RegionProvince struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Codes []string `protobuf:"bytes,3,rep,name=codes,proto3" json:"codes,omitempty"`
RegionCountryId int64 `protobuf:"varint,4,opt,name=regionCountryId,proto3" json:"regionCountryId,omitempty"`
CustomName string `protobuf:"bytes,5,opt,name=customName,proto3" json:"customName,omitempty"`
CustomCodes []string `protobuf:"bytes,6,rep,name=customCodes,proto3" json:"customCodes,omitempty"`
DisplayName string `protobuf:"bytes,7,opt,name=displayName,proto3" json:"displayName,omitempty"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Codes []string `protobuf:"bytes,3,rep,name=codes,proto3" json:"codes,omitempty"`
RegionCountryId int64 `protobuf:"varint,4,opt,name=regionCountryId,proto3" json:"regionCountryId,omitempty"`
CustomName string `protobuf:"bytes,5,opt,name=customName,proto3" json:"customName,omitempty"`
CustomCodes []string `protobuf:"bytes,6,rep,name=customCodes,proto3" json:"customCodes,omitempty"`
DisplayName string `protobuf:"bytes,7,opt,name=displayName,proto3" json:"displayName,omitempty"`
RegionCountry *RegionCountry `protobuf:"bytes,30,opt,name=regionCountry,proto3" json:"regionCountry,omitempty"` // 国家|地区信息
}
func (x *RegionProvince) Reset() {
@@ -115,27 +117,39 @@ func (x *RegionProvince) GetDisplayName() string {
return ""
}
func (x *RegionProvince) GetRegionCountry() *RegionCountry {
if x != nil {
return x.RegionCountry
}
return nil
}
var File_models_model_region_province_proto protoreflect.FileDescriptor
var file_models_model_region_province_proto_rawDesc = []byte{
0x0a, 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x72,
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xd8, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x67,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05,
0x63, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f,
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x12,
0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x20, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x06,
0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65,
0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65,
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e,
0x61, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x21, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, 0x02, 0x0a, 0x0e,
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
0x09, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61,
0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65,
0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43,
0x6f, 0x64, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e,
0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c,
0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e,
0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -153,13 +167,15 @@ func file_models_model_region_province_proto_rawDescGZIP() []byte {
var file_models_model_region_province_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_model_region_province_proto_goTypes = []interface{}{
(*RegionProvince)(nil), // 0: pb.RegionProvince
(*RegionCountry)(nil), // 1: pb.RegionCountry
}
var file_models_model_region_province_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
1, // 0: pb.RegionProvince.regionCountry:type_name -> pb.RegionCountry
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_models_model_region_province_proto_init() }
@@ -167,6 +183,7 @@ func file_models_model_region_province_proto_init() {
if File_models_model_region_province_proto != nil {
return
}
file_models_model_region_country_proto_init()
if !protoimpl.UnsafeEnabled {
file_models_model_region_province_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RegionProvince); i {

View File

@@ -50,7 +50,6 @@ type Server struct {
HttpsJSON []byte `protobuf:"bytes,10,opt,name=httpsJSON,proto3" json:"httpsJSON,omitempty"`
TcpJSON []byte `protobuf:"bytes,11,opt,name=tcpJSON,proto3" json:"tcpJSON,omitempty"`
TlsJSON []byte `protobuf:"bytes,12,opt,name=tlsJSON,proto3" json:"tlsJSON,omitempty"`
UnixJSON []byte `protobuf:"bytes,13,opt,name=unixJSON,proto3" json:"unixJSON,omitempty"`
UdpJSON []byte `protobuf:"bytes,14,opt,name=udpJSON,proto3" json:"udpJSON,omitempty"`
WebId int64 `protobuf:"varint,15,opt,name=webId,proto3" json:"webId,omitempty"`
ReverseProxyJSON []byte `protobuf:"bytes,16,opt,name=reverseProxyJSON,proto3" json:"reverseProxyJSON,omitempty"`
@@ -263,13 +262,6 @@ func (x *Server) GetTlsJSON() []byte {
return nil
}
func (x *Server) GetUnixJSON() []byte {
if x != nil {
return x.UnixJSON
}
return nil
}
func (x *Server) GetUdpJSON() []byte {
if x != nil {
return x.UdpJSON
@@ -353,7 +345,7 @@ var file_models_model_server_proto_rawDesc = []byte{
0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x6d, 0x6f, 0x64, 0x65,
0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f,
0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x09, 0x0a, 0x06, 0x53,
0x73, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x09, 0x0a, 0x06, 0x53,
0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x12, 0x20,
0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
@@ -403,34 +395,32 @@ var file_models_model_server_proto_rawDesc = []byte{
0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x63, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0b, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x07, 0x74, 0x63, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x74,
0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x6c,
0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x78, 0x4a, 0x53, 0x4f,
0x4e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x78, 0x4a, 0x53, 0x4f,
0x4e, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0e, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x14, 0x0a, 0x05, 0x77,
0x65, 0x62, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x77, 0x65, 0x62, 0x49,
0x64, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78,
0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x72, 0x65, 0x76,
0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x24, 0x0a,
0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x1a,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x54,
0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68,
0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x62, 0x61, 0x6e,
0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x22, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x73, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x23, 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, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74,
0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4e, 0x6f,
0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0c, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x75,
0x73, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e,
0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x75, 0x64, 0x70, 0x4a, 0x53, 0x4f, 0x4e, 0x12,
0x14, 0x0a, 0x05, 0x77, 0x65, 0x62, 0x49, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
0x77, 0x65, 0x62, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65,
0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x10, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x53, 0x4f,
0x4e, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x54, 0x69,
0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69,
0x64, 0x74, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x61, 0x6e, 0x64, 0x77,
0x69, 0x64, 0x74, 0x68, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12,
0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
0x18, 0x22, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x74,
0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x23, 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, 0x31, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x43,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
0x62, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x6e,
0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x0c, 0x73, 0x65,
0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12,
0x1c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -26,21 +26,23 @@ type ServerBandwidthStat struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
ServerId int64 `protobuf:"varint,3,opt,name=serverId,proto3" json:"serverId,omitempty"` //服务ID
Day string `protobuf:"bytes,4,opt,name=day,proto3" json:"day,omitempty"` // 日期格式YYYYMMDD
TimeAt string `protobuf:"bytes,5,opt,name=timeAt,proto3" json:"timeAt,omitempty"` // 时间格式HHII
Bytes int64 `protobuf:"varint,6,opt,name=bytes,proto3" json:"bytes,omitempty"` // 峰值带宽字节
TotalBytes int64 `protobuf:"varint,9,opt,name=totalBytes,proto3" json:"totalBytes,omitempty"` // 总流量
Bits int64 `protobuf:"varint,7,opt,name=bits,proto3" json:"bits,omitempty"` // 峰值带宽比特
NodeRegionId int64 `protobuf:"varint,8,opt,name=nodeRegionId,proto3" json:"nodeRegionId,omitempty"` // 节点所在区域ID
CachedBytes int64 `protobuf:"varint,10,opt,name=cachedBytes,proto3" json:"cachedBytes,omitempty"` // 总缓存流量
AttackBytes int64 `protobuf:"varint,11,opt,name=attackBytes,proto3" json:"attackBytes,omitempty"` // 总攻击流量
CountRequests int64 `protobuf:"varint,12,opt,name=countRequests,proto3" json:"countRequests,omitempty"` // 总请求数
CountCachedRequests int64 `protobuf:"varint,13,opt,name=countCachedRequests,proto3" json:"countCachedRequests,omitempty"` // 总缓存请求数
CountAttackRequests int64 `protobuf:"varint,14,opt,name=countAttackRequests,proto3" json:"countAttackRequests,omitempty"` // 总攻击请求数
UserPlanId int64 `protobuf:"varint,15,opt,name=userPlanId,proto3" json:"userPlanId,omitempty"` // 绑定的用户套餐ID
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
ServerId int64 `protobuf:"varint,3,opt,name=serverId,proto3" json:"serverId,omitempty"` //服务ID
Day string `protobuf:"bytes,4,opt,name=day,proto3" json:"day,omitempty"` // 日期格式YYYYMMDD
TimeAt string `protobuf:"bytes,5,opt,name=timeAt,proto3" json:"timeAt,omitempty"` // 时间格式HHII
Bytes int64 `protobuf:"varint,6,opt,name=bytes,proto3" json:"bytes,omitempty"` // 峰值带宽字节
TotalBytes int64 `protobuf:"varint,9,opt,name=totalBytes,proto3" json:"totalBytes,omitempty"` // 总流量
Bits int64 `protobuf:"varint,7,opt,name=bits,proto3" json:"bits,omitempty"` // 峰值带宽比特
NodeRegionId int64 `protobuf:"varint,8,opt,name=nodeRegionId,proto3" json:"nodeRegionId,omitempty"` // 节点所在区域ID
CachedBytes int64 `protobuf:"varint,10,opt,name=cachedBytes,proto3" json:"cachedBytes,omitempty"` // 总缓存流量
AttackBytes int64 `protobuf:"varint,11,opt,name=attackBytes,proto3" json:"attackBytes,omitempty"` // 总攻击流量
CountRequests int64 `protobuf:"varint,12,opt,name=countRequests,proto3" json:"countRequests,omitempty"` // 总请求数
CountCachedRequests int64 `protobuf:"varint,13,opt,name=countCachedRequests,proto3" json:"countCachedRequests,omitempty"` // 总缓存请求数
CountAttackRequests int64 `protobuf:"varint,14,opt,name=countAttackRequests,proto3" json:"countAttackRequests,omitempty"` // 总攻击请求数
UserPlanId int64 `protobuf:"varint,15,opt,name=userPlanId,proto3" json:"userPlanId,omitempty"` // 绑定的用户套餐ID
CountWebsocketConnections int64 `protobuf:"varint,16,opt,name=countWebsocketConnections,proto3" json:"countWebsocketConnections,omitempty"` // Websocket连接数
CountIPs int64 `protobuf:"varint,17,opt,name=countIPs,proto3" json:"countIPs,omitempty"` // 总IP数
}
func (x *ServerBandwidthStat) Reset() {
@@ -180,13 +182,27 @@ func (x *ServerBandwidthStat) GetUserPlanId() int64 {
return 0
}
func (x *ServerBandwidthStat) GetCountWebsocketConnections() int64 {
if x != nil {
return x.CountWebsocketConnections
}
return 0
}
func (x *ServerBandwidthStat) GetCountIPs() int64 {
if x != nil {
return x.CountIPs
}
return 0
}
var File_models_model_server_bandwidth_stat_proto protoreflect.FileDescriptor
var file_models_model_server_bandwidth_stat_proto_rawDesc = []byte{
0x0a, 0x28, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f,
0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xdf,
0x03, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xb9,
0x04, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64,
0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a,
@@ -216,7 +232,13 @@ var file_models_model_server_bandwidth_stat_proto_rawDesc = []byte{
0x6e, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x49, 0x64, 0x18, 0x0f,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x6e, 0x49, 0x64,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x12, 0x3c, 0x0a, 0x19, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b,
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x10, 0x20,
0x01, 0x28, 0x03, 0x52, 0x19, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63,
0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a,
0x0a, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x50, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03,
0x52, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x50, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -37,11 +37,12 @@ type ServerDailyStat struct {
CountAttackRequests int64 `protobuf:"varint,8,opt,name=countAttackRequests,proto3" json:"countAttackRequests,omitempty"`
AttackBytes int64 `protobuf:"varint,9,opt,name=attackBytes,proto3" json:"attackBytes,omitempty"`
CheckTrafficLimiting bool `protobuf:"varint,10,opt,name=checkTrafficLimiting,proto3" json:"checkTrafficLimiting,omitempty"`
PlanId int64 `protobuf:"varint,11,opt,name=planId,proto3" json:"planId,omitempty"`
Day string `protobuf:"bytes,12,opt,name=day,proto3" json:"day,omitempty"`
PlanId int64 `protobuf:"varint,11,opt,name=planId,proto3" json:"planId,omitempty"` // 套餐ID
Day string `protobuf:"bytes,12,opt,name=day,proto3" json:"day,omitempty"` // 日期 YYYYMMDD
Hour string `protobuf:"bytes,13,opt,name=hour,proto3" json:"hour,omitempty"`
TimeFrom string `protobuf:"bytes,14,opt,name=timeFrom,proto3" json:"timeFrom,omitempty"`
TimeTo string `protobuf:"bytes,15,opt,name=timeTo,proto3" json:"timeTo,omitempty"`
CountIPs int64 `protobuf:"varint,17,opt,name=countIPs,proto3" json:"countIPs,omitempty"` // 独立IP数量
}
func (x *ServerDailyStat) Reset() {
@@ -188,12 +189,19 @@ func (x *ServerDailyStat) GetTimeTo() string {
return ""
}
func (x *ServerDailyStat) GetCountIPs() int64 {
if x != nil {
return x.CountIPs
}
return 0
}
var File_models_model_server_daily_stat_proto protoreflect.FileDescriptor
var file_models_model_server_daily_stat_proto_rawDesc = []byte{
0x0a, 0x24, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x91, 0x04, 0x0a, 0x0f, 0x53,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xad, 0x04, 0x0a, 0x0f, 0x53,
0x65, 0x72, 0x76, 0x65, 0x72, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x12, 0x1a,
0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
@@ -226,8 +234,10 @@ var file_models_model_server_daily_stat_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x75, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69,
0x6d, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69,
0x6d, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f,
0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x12, 0x1a,
0x0a, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x50, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03,
0x52, 0x08, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x50, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -20,14 +20,16 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 用户功能定义
type UserFeature struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // 代号
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 名称
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // 描述
SupportPlan bool `protobuf:"varint,4,opt,name=supportPlan,proto3" json:"supportPlan,omitempty"` // 是否支持套餐
}
func (x *UserFeature) Reset() {
@@ -83,18 +85,27 @@ func (x *UserFeature) GetDescription() string {
return ""
}
func (x *UserFeature) GetSupportPlan() bool {
if x != nil {
return x.SupportPlan
}
return false
}
var File_models_model_user_feature_proto protoreflect.FileDescriptor
var file_models_model_user_feature_proto_rawDesc = []byte{
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
0x73, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x57, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61,
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x79, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x46, 0x65, 0x61,
0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b,
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20,
0x0a, 0x0b, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x18, 0x04, 0x20,
0x01, 0x28, 0x08, 0x52, 0x0b, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x6c, 0x61, 0x6e,
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -0,0 +1,255 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.19.4
// source: models/model_user_script.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 用户脚本
type UserScript struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 用户脚本ID
UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID
AdminId int64 `protobuf:"varint,3,opt,name=adminId,proto3" json:"adminId,omitempty"` // 审核的管理员
Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"` // 脚本代码
CodeMD5 string `protobuf:"bytes,5,opt,name=codeMD5,proto3" json:"codeMD5,omitempty"` // 脚本代码MD5
CreatedAt int64 `protobuf:"varint,6,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 创建时间
IsRejected bool `protobuf:"varint,7,opt,name=isRejected,proto3" json:"isRejected,omitempty"` // 是否被驳回
RejectedAt int64 `protobuf:"varint,8,opt,name=rejectedAt,proto3" json:"rejectedAt,omitempty"` // 驳回时间
RejectedReason string `protobuf:"bytes,9,opt,name=rejectedReason,proto3" json:"rejectedReason,omitempty"` // 驳回原因
IsPassed bool `protobuf:"varint,10,opt,name=isPassed,proto3" json:"isPassed,omitempty"` // 是否被通过
PassedAt int64 `protobuf:"varint,11,opt,name=passedAt,proto3" json:"passedAt,omitempty"` // 通过时间
User *User `protobuf:"bytes,30,opt,name=user,proto3" json:"user,omitempty"` // 用户信息
}
func (x *UserScript) Reset() {
*x = UserScript{}
if protoimpl.UnsafeEnabled {
mi := &file_models_model_user_script_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserScript) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserScript) ProtoMessage() {}
func (x *UserScript) ProtoReflect() protoreflect.Message {
mi := &file_models_model_user_script_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserScript.ProtoReflect.Descriptor instead.
func (*UserScript) Descriptor() ([]byte, []int) {
return file_models_model_user_script_proto_rawDescGZIP(), []int{0}
}
func (x *UserScript) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *UserScript) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *UserScript) GetAdminId() int64 {
if x != nil {
return x.AdminId
}
return 0
}
func (x *UserScript) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *UserScript) GetCodeMD5() string {
if x != nil {
return x.CodeMD5
}
return ""
}
func (x *UserScript) GetCreatedAt() int64 {
if x != nil {
return x.CreatedAt
}
return 0
}
func (x *UserScript) GetIsRejected() bool {
if x != nil {
return x.IsRejected
}
return false
}
func (x *UserScript) GetRejectedAt() int64 {
if x != nil {
return x.RejectedAt
}
return 0
}
func (x *UserScript) GetRejectedReason() string {
if x != nil {
return x.RejectedReason
}
return ""
}
func (x *UserScript) GetIsPassed() bool {
if x != nil {
return x.IsPassed
}
return false
}
func (x *UserScript) GetPassedAt() int64 {
if x != nil {
return x.PassedAt
}
return 0
}
func (x *UserScript) GetUser() *User {
if x != nil {
return x.User
}
return nil
}
var File_models_model_user_script_proto protoreflect.FileDescriptor
var file_models_model_user_script_proto_rawDesc = []byte{
0x0a, 0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x75,
0x73, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x02, 0x70, 0x62, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64,
0x65, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd8, 0x02,
0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x0e, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06,
0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73,
0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f,
0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x64, 0x65, 0x4d, 0x44, 0x35, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x64, 0x65, 0x4d, 0x44, 0x35, 0x12, 0x1c, 0x0a, 0x09,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52,
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73,
0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
0x69, 0x73, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65,
0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65,
0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73,
0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x50, 0x61, 0x73, 0x73, 0x65, 0x64, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x50, 0x61, 0x73, 0x73, 0x65, 0x64, 0x12, 0x1a,
0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03,
0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x75, 0x73,
0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73,
0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_models_model_user_script_proto_rawDescOnce sync.Once
file_models_model_user_script_proto_rawDescData = file_models_model_user_script_proto_rawDesc
)
func file_models_model_user_script_proto_rawDescGZIP() []byte {
file_models_model_user_script_proto_rawDescOnce.Do(func() {
file_models_model_user_script_proto_rawDescData = protoimpl.X.CompressGZIP(file_models_model_user_script_proto_rawDescData)
})
return file_models_model_user_script_proto_rawDescData
}
var file_models_model_user_script_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_models_model_user_script_proto_goTypes = []interface{}{
(*UserScript)(nil), // 0: pb.UserScript
(*User)(nil), // 1: pb.User
}
var file_models_model_user_script_proto_depIdxs = []int32{
1, // 0: pb.UserScript.user:type_name -> pb.User
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_models_model_user_script_proto_init() }
func file_models_model_user_script_proto_init() {
if File_models_model_user_script_proto != nil {
return
}
file_models_model_user_proto_init()
if !protoimpl.UnsafeEnabled {
file_models_model_user_script_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserScript); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_models_model_user_script_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_models_model_user_script_proto_goTypes,
DependencyIndexes: file_models_model_user_script_proto_depIdxs,
MessageInfos: file_models_model_user_script_proto_msgTypes,
}.Build()
File_models_model_user_script_proto = out.File
file_models_model_user_script_proto_rawDesc = nil
file_models_model_user_script_proto_goTypes = nil
file_models_model_user_script_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -22,6 +22,7 @@ const (
AdminService_LoginAdmin_FullMethodName = "/pb.AdminService/loginAdmin"
AdminService_CheckAdminExists_FullMethodName = "/pb.AdminService/checkAdminExists"
AdminService_CheckAdminUsername_FullMethodName = "/pb.AdminService/checkAdminUsername"
AdminService_FindAdminWithUsername_FullMethodName = "/pb.AdminService/findAdminWithUsername"
AdminService_FindAdminFullname_FullMethodName = "/pb.AdminService/findAdminFullname"
AdminService_FindEnabledAdmin_FullMethodName = "/pb.AdminService/findEnabledAdmin"
AdminService_CreateOrUpdateAdmin_FullMethodName = "/pb.AdminService/createOrUpdateAdmin"
@@ -36,6 +37,7 @@ const (
AdminService_CheckAdminOTPWithUsername_FullMethodName = "/pb.AdminService/checkAdminOTPWithUsername"
AdminService_ComposeAdminDashboard_FullMethodName = "/pb.AdminService/composeAdminDashboard"
AdminService_UpdateAdminTheme_FullMethodName = "/pb.AdminService/updateAdminTheme"
AdminService_UpdateAdminLang_FullMethodName = "/pb.AdminService/updateAdminLang"
)
// AdminServiceClient is the client API for AdminService service.
@@ -46,8 +48,10 @@ type AdminServiceClient interface {
LoginAdmin(ctx context.Context, in *LoginAdminRequest, opts ...grpc.CallOption) (*LoginAdminResponse, error)
// 检查管理员是否存在
CheckAdminExists(ctx context.Context, in *CheckAdminExistsRequest, opts ...grpc.CallOption) (*CheckAdminExistsResponse, error)
// 检查用户名是否存在
// 检查管理员用户名是否存在
CheckAdminUsername(ctx context.Context, in *CheckAdminUsernameRequest, opts ...grpc.CallOption) (*CheckAdminUsernameResponse, error)
// 使用用管理员户名查找管理员信息
FindAdminWithUsername(ctx context.Context, in *FindAdminWithUsernameRequest, opts ...grpc.CallOption) (*FindAdminWithUsernameResponse, error)
// 获取管理员名称
FindAdminFullname(ctx context.Context, in *FindAdminFullnameRequest, opts ...grpc.CallOption) (*FindAdminFullnameResponse, error)
// 获取管理员信息
@@ -76,6 +80,8 @@ type AdminServiceClient interface {
ComposeAdminDashboard(ctx context.Context, in *ComposeAdminDashboardRequest, opts ...grpc.CallOption) (*ComposeAdminDashboardResponse, error)
// 修改管理员使用的界面风格
UpdateAdminTheme(ctx context.Context, in *UpdateAdminThemeRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 修改管理员使用的语言
UpdateAdminLang(ctx context.Context, in *UpdateAdminLangRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type adminServiceClient struct {
@@ -113,6 +119,15 @@ func (c *adminServiceClient) CheckAdminUsername(ctx context.Context, in *CheckAd
return out, nil
}
func (c *adminServiceClient) FindAdminWithUsername(ctx context.Context, in *FindAdminWithUsernameRequest, opts ...grpc.CallOption) (*FindAdminWithUsernameResponse, error) {
out := new(FindAdminWithUsernameResponse)
err := c.cc.Invoke(ctx, AdminService_FindAdminWithUsername_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *adminServiceClient) FindAdminFullname(ctx context.Context, in *FindAdminFullnameRequest, opts ...grpc.CallOption) (*FindAdminFullnameResponse, error) {
out := new(FindAdminFullnameResponse)
err := c.cc.Invoke(ctx, AdminService_FindAdminFullname_FullMethodName, in, out, opts...)
@@ -239,6 +254,15 @@ func (c *adminServiceClient) UpdateAdminTheme(ctx context.Context, in *UpdateAdm
return out, nil
}
func (c *adminServiceClient) UpdateAdminLang(ctx context.Context, in *UpdateAdminLangRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, AdminService_UpdateAdminLang_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AdminServiceServer is the server API for AdminService service.
// All implementations should embed UnimplementedAdminServiceServer
// for forward compatibility
@@ -247,8 +271,10 @@ type AdminServiceServer interface {
LoginAdmin(context.Context, *LoginAdminRequest) (*LoginAdminResponse, error)
// 检查管理员是否存在
CheckAdminExists(context.Context, *CheckAdminExistsRequest) (*CheckAdminExistsResponse, error)
// 检查用户名是否存在
// 检查管理员用户名是否存在
CheckAdminUsername(context.Context, *CheckAdminUsernameRequest) (*CheckAdminUsernameResponse, error)
// 使用用管理员户名查找管理员信息
FindAdminWithUsername(context.Context, *FindAdminWithUsernameRequest) (*FindAdminWithUsernameResponse, error)
// 获取管理员名称
FindAdminFullname(context.Context, *FindAdminFullnameRequest) (*FindAdminFullnameResponse, error)
// 获取管理员信息
@@ -277,6 +303,8 @@ type AdminServiceServer interface {
ComposeAdminDashboard(context.Context, *ComposeAdminDashboardRequest) (*ComposeAdminDashboardResponse, error)
// 修改管理员使用的界面风格
UpdateAdminTheme(context.Context, *UpdateAdminThemeRequest) (*RPCSuccess, error)
// 修改管理员使用的语言
UpdateAdminLang(context.Context, *UpdateAdminLangRequest) (*RPCSuccess, error)
}
// UnimplementedAdminServiceServer should be embedded to have forward compatible implementations.
@@ -292,6 +320,9 @@ func (UnimplementedAdminServiceServer) CheckAdminExists(context.Context, *CheckA
func (UnimplementedAdminServiceServer) CheckAdminUsername(context.Context, *CheckAdminUsernameRequest) (*CheckAdminUsernameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckAdminUsername not implemented")
}
func (UnimplementedAdminServiceServer) FindAdminWithUsername(context.Context, *FindAdminWithUsernameRequest) (*FindAdminWithUsernameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAdminWithUsername not implemented")
}
func (UnimplementedAdminServiceServer) FindAdminFullname(context.Context, *FindAdminFullnameRequest) (*FindAdminFullnameResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAdminFullname not implemented")
}
@@ -334,6 +365,9 @@ func (UnimplementedAdminServiceServer) ComposeAdminDashboard(context.Context, *C
func (UnimplementedAdminServiceServer) UpdateAdminTheme(context.Context, *UpdateAdminThemeRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateAdminTheme not implemented")
}
func (UnimplementedAdminServiceServer) UpdateAdminLang(context.Context, *UpdateAdminLangRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateAdminLang not implemented")
}
// UnsafeAdminServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AdminServiceServer will
@@ -400,6 +434,24 @@ func _AdminService_CheckAdminUsername_Handler(srv interface{}, ctx context.Conte
return interceptor(ctx, in, info, handler)
}
func _AdminService_FindAdminWithUsername_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAdminWithUsernameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdminServiceServer).FindAdminWithUsername(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AdminService_FindAdminWithUsername_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdminServiceServer).FindAdminWithUsername(ctx, req.(*FindAdminWithUsernameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AdminService_FindAdminFullname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAdminFullnameRequest)
if err := dec(in); err != nil {
@@ -652,6 +704,24 @@ func _AdminService_UpdateAdminTheme_Handler(srv interface{}, ctx context.Context
return interceptor(ctx, in, info, handler)
}
func _AdminService_UpdateAdminLang_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateAdminLangRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AdminServiceServer).UpdateAdminLang(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: AdminService_UpdateAdminLang_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AdminServiceServer).UpdateAdminLang(ctx, req.(*UpdateAdminLangRequest))
}
return interceptor(ctx, in, info, handler)
}
// AdminService_ServiceDesc is the grpc.ServiceDesc for AdminService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -671,6 +741,10 @@ var AdminService_ServiceDesc = grpc.ServiceDesc{
MethodName: "checkAdminUsername",
Handler: _AdminService_CheckAdminUsername_Handler,
},
{
MethodName: "findAdminWithUsername",
Handler: _AdminService_FindAdminWithUsername_Handler,
},
{
MethodName: "findAdminFullname",
Handler: _AdminService_FindAdminFullname_Handler,
@@ -727,6 +801,10 @@ var AdminService_ServiceDesc = grpc.ServiceDesc{
MethodName: "updateAdminTheme",
Handler: _AdminService_UpdateAdminTheme_Handler,
},
{
MethodName: "updateAdminLang",
Handler: _AdminService_UpdateAdminLang_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_admin.proto",

View File

@@ -575,7 +575,8 @@ type FindEnabledDNSProviderRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DnsProviderId int64 `protobuf:"varint,1,opt,name=dnsProviderId,proto3" json:"dnsProviderId,omitempty"`
DnsProviderId int64 `protobuf:"varint,1,opt,name=dnsProviderId,proto3" json:"dnsProviderId,omitempty"` // DNS服务商ID
MaskParams bool `protobuf:"varint,2,opt,name=maskParams,proto3" json:"maskParams,omitempty"` // 是否对参数中的密钥进行掩码
}
func (x *FindEnabledDNSProviderRequest) Reset() {
@@ -617,12 +618,19 @@ func (x *FindEnabledDNSProviderRequest) GetDnsProviderId() int64 {
return 0
}
func (x *FindEnabledDNSProviderRequest) GetMaskParams() bool {
if x != nil {
return x.MaskParams
}
return false
}
type FindEnabledDNSProviderResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DnsProvider *DNSProvider `protobuf:"bytes,1,opt,name=dnsProvider,proto3" json:"dnsProvider,omitempty"`
DnsProvider *DNSProvider `protobuf:"bytes,1,opt,name=dnsProvider,proto3" json:"dnsProvider,omitempty"` // DNS服务商信息
}
func (x *FindEnabledDNSProviderResponse) Reset() {
@@ -978,11 +986,13 @@ var file_service_dns_provider_proto_rawDesc = []byte{
0x4e, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x64, 0x6e, 0x73, 0x50, 0x72, 0x6f,
0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x45,
0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x65, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x4e, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6e, 0x73, 0x50,
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0d, 0x64, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x53,
0x0d, 0x64, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e,
0x0a, 0x0a, 0x6d, 0x61, 0x73, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0a, 0x6d, 0x61, 0x73, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x53,
0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x44, 0x4e, 0x53,
0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x31, 0x0a, 0x0b, 0x64, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18,

View File

@@ -379,8 +379,10 @@ type UpdateHTTPFirewallPolicyRequest struct {
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
FirewallGroupCodes []string `protobuf:"bytes,5,rep,name=firewallGroupCodes,proto3" json:"firewallGroupCodes,omitempty"`
BlockOptionsJSON []byte `protobuf:"bytes,6,opt,name=blockOptionsJSON,proto3" json:"blockOptionsJSON,omitempty"`
CaptchaOptionsJSON []byte `protobuf:"bytes,11,opt,name=captchaOptionsJSON,proto3" json:"captchaOptionsJSON,omitempty"`
BlockOptionsJSON []byte `protobuf:"bytes,6,opt,name=blockOptionsJSON,proto3" json:"blockOptionsJSON,omitempty"` // 阻止动作配置
PageOptionsJSON []byte `protobuf:"bytes,15,opt,name=pageOptionsJSON,proto3" json:"pageOptionsJSON,omitempty"` // 显示网页动作配置
CaptchaOptionsJSON []byte `protobuf:"bytes,11,opt,name=captchaOptionsJSON,proto3" json:"captchaOptionsJSON,omitempty"` // 验证码动作配置
JsCookieOptionsJSON []byte `protobuf:"bytes,16,opt,name=jsCookieOptionsJSON,proto3" json:"jsCookieOptionsJSON,omitempty"` // JSCookie动作配置
Mode string `protobuf:"bytes,7,opt,name=mode,proto3" json:"mode,omitempty"`
UseLocalFirewall bool `protobuf:"varint,8,opt,name=useLocalFirewall,proto3" json:"useLocalFirewall,omitempty"` // 是否使用本地防火墙
SynFloodJSON []byte `protobuf:"bytes,9,opt,name=synFloodJSON,proto3" json:"synFloodJSON,omitempty"` // SYN Flood相关配置
@@ -464,6 +466,13 @@ func (x *UpdateHTTPFirewallPolicyRequest) GetBlockOptionsJSON() []byte {
return nil
}
func (x *UpdateHTTPFirewallPolicyRequest) GetPageOptionsJSON() []byte {
if x != nil {
return x.PageOptionsJSON
}
return nil
}
func (x *UpdateHTTPFirewallPolicyRequest) GetCaptchaOptionsJSON() []byte {
if x != nil {
return x.CaptchaOptionsJSON
@@ -471,6 +480,13 @@ func (x *UpdateHTTPFirewallPolicyRequest) GetCaptchaOptionsJSON() []byte {
return nil
}
func (x *UpdateHTTPFirewallPolicyRequest) GetJsCookieOptionsJSON() []byte {
if x != nil {
return x.JsCookieOptionsJSON
}
return nil
}
func (x *UpdateHTTPFirewallPolicyRequest) GetMode() string {
if x != nil {
return x.Mode
@@ -1170,8 +1186,8 @@ type CheckHTTPFirewallPolicyIPStatusResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
IsOk bool `protobuf:"varint,1,opt,name=isOk,proto3" json:"isOk,omitempty"` // 是否查询成功
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
IsOk bool `protobuf:"varint,1,opt,name=isOk,proto3" json:"isOk,omitempty"` // 是否查询成功
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // 错误信息
IsFound bool `protobuf:"varint,3,opt,name=isFound,proto3" json:"isFound,omitempty"` // 是否找到
IsAllowed bool `protobuf:"varint,4,opt,name=isAllowed,proto3" json:"isAllowed,omitempty"` // 是否允许
IpList *IPList `protobuf:"bytes,5,opt,name=ipList,proto3" json:"ipList,omitempty"` // 匹配的IPList
@@ -1268,6 +1284,101 @@ func (x *CheckHTTPFirewallPolicyIPStatusResponse) GetRegionProvince() *RegionPro
return nil
}
// 获取防火墙对应的网站ID
type FindServerIdWithHTTPFirewallPolicyIdRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
HttpFirewallPolicyId int64 `protobuf:"varint,1,opt,name=httpFirewallPolicyId,proto3" json:"httpFirewallPolicyId,omitempty"` // 防火墙策略ID
}
func (x *FindServerIdWithHTTPFirewallPolicyIdRequest) Reset() {
*x = FindServerIdWithHTTPFirewallPolicyIdRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_firewall_policy_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindServerIdWithHTTPFirewallPolicyIdRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindServerIdWithHTTPFirewallPolicyIdRequest) ProtoMessage() {}
func (x *FindServerIdWithHTTPFirewallPolicyIdRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_http_firewall_policy_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindServerIdWithHTTPFirewallPolicyIdRequest.ProtoReflect.Descriptor instead.
func (*FindServerIdWithHTTPFirewallPolicyIdRequest) Descriptor() ([]byte, []int) {
return file_service_http_firewall_policy_proto_rawDescGZIP(), []int{20}
}
func (x *FindServerIdWithHTTPFirewallPolicyIdRequest) GetHttpFirewallPolicyId() int64 {
if x != nil {
return x.HttpFirewallPolicyId
}
return 0
}
type FindServerIdWithHTTPFirewallPolicyIdResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` // 防火墙策略对应的网站ID公共的防火墙策略的网站ID为0
}
func (x *FindServerIdWithHTTPFirewallPolicyIdResponse) Reset() {
*x = FindServerIdWithHTTPFirewallPolicyIdResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_firewall_policy_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindServerIdWithHTTPFirewallPolicyIdResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindServerIdWithHTTPFirewallPolicyIdResponse) ProtoMessage() {}
func (x *FindServerIdWithHTTPFirewallPolicyIdResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_http_firewall_policy_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindServerIdWithHTTPFirewallPolicyIdResponse.ProtoReflect.Descriptor instead.
func (*FindServerIdWithHTTPFirewallPolicyIdResponse) Descriptor() ([]byte, []int) {
return file_service_http_firewall_policy_proto_rawDescGZIP(), []int{21}
}
func (x *FindServerIdWithHTTPFirewallPolicyIdResponse) GetServerId() int64 {
if x != nil {
return x.ServerId
}
return 0
}
var File_service_http_firewall_policy_proto protoreflect.FileDescriptor
var file_service_http_firewall_policy_proto_rawDesc = []byte{
@@ -1332,7 +1443,7 @@ var file_service_http_firewall_policy_proto_rawDesc = []byte{
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0xaf, 0x04, 0x0a,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0x8b, 0x05, 0x0a,
0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
@@ -1348,226 +1459,251 @@ var file_service_http_firewall_policy_proto_rawDesc = []byte{
0x77, 0x61, 0x6c, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x2a,
0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53,
0x4f, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61,
0x70, 0x74, 0x63, 0x68, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e,
0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f,
0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2a,
0x0a, 0x10, 0x75, 0x73, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, 0x73, 0x65, 0x4c, 0x6f, 0x63,
0x61, 0x6c, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x79,
0x6e, 0x46, 0x6c, 0x6f, 0x6f, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0c, 0x73, 0x79, 0x6e, 0x46, 0x6c, 0x6f, 0x6f, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18,
0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x07, 0x4c, 0x6f, 0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x0c,
0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x42, 0x6f, 0x64, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x6e, 0x79,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x54, 0x4d, 0x4c, 0x18, 0x0d, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0f, 0x64, 0x65, 0x6e, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x54,
0x4d, 0x4c, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x65, 0x6e, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e,
0x63, 0x65, 0x48, 0x54, 0x4d, 0x4c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65,
0x6e, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x48, 0x54, 0x4d, 0x4c, 0x22, 0xa1,
0x01, 0x0a, 0x25, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x70, 0x61,
0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0f, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x4f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x12, 0x63, 0x61, 0x70, 0x74, 0x63, 0x68, 0x61, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x30, 0x0a, 0x13, 0x6a, 0x73, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65,
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x10, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x13, 0x6a, 0x73, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x75, 0x73,
0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x18, 0x08,
0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, 0x73, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x79, 0x6e, 0x46, 0x6c, 0x6f,
0x6f, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x79,
0x6e, 0x46, 0x6c, 0x6f, 0x6f, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f,
0x67, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x4c, 0x6f, 0x67,
0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03,
0x52, 0x12, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79,
0x53, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x64, 0x65, 0x6e, 0x79, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x72, 0x79, 0x48, 0x54, 0x4d, 0x4c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64,
0x65, 0x6e, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x54, 0x4d, 0x4c, 0x12, 0x2a,
0x0a, 0x10, 0x64, 0x65, 0x6e, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x48, 0x54,
0x4d, 0x4c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x6e, 0x79, 0x50, 0x72,
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x48, 0x54, 0x4d, 0x4c, 0x22, 0xa1, 0x01, 0x0a, 0x25, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x62, 0x6f,
0x75, 0x6e, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x69,
0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x75,
0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0c, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x7e,
0x0a, 0x26, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b,
0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x0b, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x12, 0x22,
0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x53,
0x4f, 0x4e, 0x22, 0x7e, 0x0a, 0x26, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14,
0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64,
0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x53,
0x4f, 0x4e, 0x22, 0x6c, 0x0a, 0x2a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f,
0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64,
0x22, 0x94, 0x01, 0x0a, 0x26, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x69, 0x65, 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, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f,
0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72,
0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x75, 0x0a, 0x27, 0x4c, 0x69, 0x73, 0x74, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x4a, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x55,
0x0a, 0x1f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0c, 0x52, 0x0b, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x6c,
0x0a, 0x2a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07,
0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b,
0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e,
0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x94, 0x01, 0x0a,
0x26, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 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, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x0a,
0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
0x72, 0x49, 0x64, 0x22, 0x75, 0x0a, 0x27, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a,
0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70,
0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x55, 0x0a, 0x1f, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a,
0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0x60, 0x0a, 0x2a, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0x65, 0x0a, 0x2b, 0x46, 0x69, 0x6e, 0x64, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x53, 0x4f, 0x4e,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x5a,
0x0a, 0x24, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54,
0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0x6f, 0x0a, 0x25, 0x46, 0x69,
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x12, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x16, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x12, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x8d, 0x01, 0x0a, 0x1f,
0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x68, 0x74, 0x74,
0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49,
0x64, 0x22, 0x60, 0x0a, 0x2a, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x68,
0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63,
0x79, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x6c, 0x0a, 0x26, 0x43,
0x68, 0x65, 0x63, 0x6b, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0xc8, 0x02, 0x0a, 0x27, 0x43, 0x68,
0x65, 0x63, 0x6b, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x01, 0x20,
0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72,
0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12,
0x18, 0x0a, 0x07, 0x69, 0x73, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
0x52, 0x07, 0x69, 0x73, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x41,
0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73,
0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x06, 0x69, 0x70, 0x4c, 0x69, 0x73,
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x4c,
0x69, 0x73, 0x74, 0x52, 0x06, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x69,
0x70, 0x49, 0x74, 0x65, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62,
0x2e, 0x49, 0x50, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x69, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x12,
0x37, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x6e, 0x63, 0x65, 0x32, 0x91, 0x0b, 0x0a, 0x19, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x22, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e,
0x79, 0x49, 0x64, 0x22, 0x65, 0x0a, 0x2b, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x5a, 0x0a, 0x24, 0x46, 0x69,
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x22, 0x6f, 0x0a, 0x25, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54,
0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x74, 0x0a, 0x1d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x12, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x54, 0x54, 0x50, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63,
0x79, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 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, 0x5b, 0x0a, 0x1e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x46, 0x0a, 0x12, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62,
0x2e, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x52, 0x12, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x8d, 0x01, 0x0a, 0x1f, 0x49, 0x6d, 0x70, 0x6f,
0x72, 0x74, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x68,
0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63,
0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12,
0x36, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
0x16, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x6c, 0x0a, 0x26, 0x43, 0x68, 0x65, 0x63, 0x6b,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 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, 0x48, 0x54, 0x54,
0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x49, 0x6e,
0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 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, 0x6b, 0x0a, 0x23, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x70, 0x62, 0x2e, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69,
0x65, 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,
0x7a, 0x0a, 0x1f, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69,
0x65, 0x73, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b,
0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48,
0x63, 0x79, 0x49, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0xc8, 0x02, 0x0a, 0x27, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48,
0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63,
0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x18, 0x64,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50,
0x6f, 0x6c, 0x69, 0x63, 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, 0x86, 0x01, 0x0a,
0x23, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x79, 0x49, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
0x04, 0x69, 0x73, 0x4f, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x69,
0x73, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73,
0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77,
0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x41, 0x6c, 0x6c, 0x6f,
0x77, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x06, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x06, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x69, 0x70, 0x49, 0x74, 0x65,
0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x49,
0x74, 0x65, 0x6d, 0x52, 0x06, 0x69, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x37, 0x0a, 0x0d, 0x72,
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x3a, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72,
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70,
0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65,
0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65,
0x22, 0x61, 0x0a, 0x2b, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64,
0x57, 0x69, 0x74, 0x68, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x32, 0x0a, 0x14, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x68,
0x74, 0x74, 0x70, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63,
0x79, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x2c, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65,
0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x32,
0x9d, 0x0c, 0x0a, 0x19, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c,
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x83, 0x01,
0x0a, 0x22, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c,
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x18, 0x69,
0x6d, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6d, 0x70,
0x6f, 0x72, 0x74, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50,
0x6f, 0x6c, 0x69, 0x63, 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, 0x7a, 0x0a, 0x1f,
0x63, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x50, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x62,
0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12,
0x23, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x1d, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x70, 0x62,
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x54, 0x54, 0x50,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61,
0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x4f, 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x23, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 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, 0x5b, 0x0a, 0x1e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x46,
0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x73, 0x12, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63,
0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 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, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64,
0x43, 0x6f, 0x6e, 0x66, 0x69, 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, 0x6b, 0x0a,
0x23, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x69, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41,
0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 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, 0x7a, 0x0a, 0x1f, 0x6c, 0x69,
0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72,
0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2a, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69,
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69,
0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x18, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 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, 0x86, 0x01, 0x0a, 0x23, 0x66, 0x69, 0x6e, 0x64,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77,
0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
0x2e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x2f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x74, 0x0a, 0x1d, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48,
0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63,
0x79, 0x12, 0x28, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x18, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x54,
0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 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, 0x7a, 0x0a, 0x1f, 0x63, 0x68, 0x65, 0x63, 0x6b,
0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69,
0x63, 0x79, 0x49, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x70, 0x62, 0x2e,
0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c,
0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63,
0x6b, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c,
0x69, 0x63, 0x79, 0x49, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x89, 0x01, 0x0a, 0x24, 0x66, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65,
0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x2f, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x57, 0x69,
0x74, 0x68, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e,
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x57,
0x69, 0x74, 0x68, 0x48, 0x54, 0x54, 0x50, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x50,
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -1582,44 +1718,46 @@ func file_service_http_firewall_policy_proto_rawDescGZIP() []byte {
return file_service_http_firewall_policy_proto_rawDescData
}
var file_service_http_firewall_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_service_http_firewall_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_service_http_firewall_policy_proto_goTypes = []interface{}{
(*FindAllEnabledHTTPFirewallPoliciesRequest)(nil), // 0: pb.FindAllEnabledHTTPFirewallPoliciesRequest
(*FindAllEnabledHTTPFirewallPoliciesResponse)(nil), // 1: pb.FindAllEnabledHTTPFirewallPoliciesResponse
(*CreateHTTPFirewallPolicyRequest)(nil), // 2: pb.CreateHTTPFirewallPolicyRequest
(*CreateHTTPFirewallPolicyResponse)(nil), // 3: pb.CreateHTTPFirewallPolicyResponse
(*CreateEmptyHTTPFirewallPolicyRequest)(nil), // 4: pb.CreateEmptyHTTPFirewallPolicyRequest
(*CreateEmptyHTTPFirewallPolicyResponse)(nil), // 5: pb.CreateEmptyHTTPFirewallPolicyResponse
(*UpdateHTTPFirewallPolicyRequest)(nil), // 6: pb.UpdateHTTPFirewallPolicyRequest
(*UpdateHTTPFirewallPolicyGroupsRequest)(nil), // 7: pb.UpdateHTTPFirewallPolicyGroupsRequest
(*UpdateHTTPFirewallInboundConfigRequest)(nil), // 8: pb.UpdateHTTPFirewallInboundConfigRequest
(*CountAllEnabledHTTPFirewallPoliciesRequest)(nil), // 9: pb.CountAllEnabledHTTPFirewallPoliciesRequest
(*ListEnabledHTTPFirewallPoliciesRequest)(nil), // 10: pb.ListEnabledHTTPFirewallPoliciesRequest
(*ListEnabledHTTPFirewallPoliciesResponse)(nil), // 11: pb.ListEnabledHTTPFirewallPoliciesResponse
(*DeleteHTTPFirewallPolicyRequest)(nil), // 12: pb.DeleteHTTPFirewallPolicyRequest
(*FindEnabledHTTPFirewallPolicyConfigRequest)(nil), // 13: pb.FindEnabledHTTPFirewallPolicyConfigRequest
(*FindEnabledHTTPFirewallPolicyConfigResponse)(nil), // 14: pb.FindEnabledHTTPFirewallPolicyConfigResponse
(*FindEnabledHTTPFirewallPolicyRequest)(nil), // 15: pb.FindEnabledHTTPFirewallPolicyRequest
(*FindEnabledHTTPFirewallPolicyResponse)(nil), // 16: pb.FindEnabledHTTPFirewallPolicyResponse
(*ImportHTTPFirewallPolicyRequest)(nil), // 17: pb.ImportHTTPFirewallPolicyRequest
(*CheckHTTPFirewallPolicyIPStatusRequest)(nil), // 18: pb.CheckHTTPFirewallPolicyIPStatusRequest
(*CheckHTTPFirewallPolicyIPStatusResponse)(nil), // 19: pb.CheckHTTPFirewallPolicyIPStatusResponse
(*HTTPFirewallPolicy)(nil), // 20: pb.HTTPFirewallPolicy
(*IPList)(nil), // 21: pb.IPList
(*IPItem)(nil), // 22: pb.IPItem
(*RegionCountry)(nil), // 23: pb.RegionCountry
(*RegionProvince)(nil), // 24: pb.RegionProvince
(*RPCSuccess)(nil), // 25: pb.RPCSuccess
(*RPCCountResponse)(nil), // 26: pb.RPCCountResponse
(*FindAllEnabledHTTPFirewallPoliciesRequest)(nil), // 0: pb.FindAllEnabledHTTPFirewallPoliciesRequest
(*FindAllEnabledHTTPFirewallPoliciesResponse)(nil), // 1: pb.FindAllEnabledHTTPFirewallPoliciesResponse
(*CreateHTTPFirewallPolicyRequest)(nil), // 2: pb.CreateHTTPFirewallPolicyRequest
(*CreateHTTPFirewallPolicyResponse)(nil), // 3: pb.CreateHTTPFirewallPolicyResponse
(*CreateEmptyHTTPFirewallPolicyRequest)(nil), // 4: pb.CreateEmptyHTTPFirewallPolicyRequest
(*CreateEmptyHTTPFirewallPolicyResponse)(nil), // 5: pb.CreateEmptyHTTPFirewallPolicyResponse
(*UpdateHTTPFirewallPolicyRequest)(nil), // 6: pb.UpdateHTTPFirewallPolicyRequest
(*UpdateHTTPFirewallPolicyGroupsRequest)(nil), // 7: pb.UpdateHTTPFirewallPolicyGroupsRequest
(*UpdateHTTPFirewallInboundConfigRequest)(nil), // 8: pb.UpdateHTTPFirewallInboundConfigRequest
(*CountAllEnabledHTTPFirewallPoliciesRequest)(nil), // 9: pb.CountAllEnabledHTTPFirewallPoliciesRequest
(*ListEnabledHTTPFirewallPoliciesRequest)(nil), // 10: pb.ListEnabledHTTPFirewallPoliciesRequest
(*ListEnabledHTTPFirewallPoliciesResponse)(nil), // 11: pb.ListEnabledHTTPFirewallPoliciesResponse
(*DeleteHTTPFirewallPolicyRequest)(nil), // 12: pb.DeleteHTTPFirewallPolicyRequest
(*FindEnabledHTTPFirewallPolicyConfigRequest)(nil), // 13: pb.FindEnabledHTTPFirewallPolicyConfigRequest
(*FindEnabledHTTPFirewallPolicyConfigResponse)(nil), // 14: pb.FindEnabledHTTPFirewallPolicyConfigResponse
(*FindEnabledHTTPFirewallPolicyRequest)(nil), // 15: pb.FindEnabledHTTPFirewallPolicyRequest
(*FindEnabledHTTPFirewallPolicyResponse)(nil), // 16: pb.FindEnabledHTTPFirewallPolicyResponse
(*ImportHTTPFirewallPolicyRequest)(nil), // 17: pb.ImportHTTPFirewallPolicyRequest
(*CheckHTTPFirewallPolicyIPStatusRequest)(nil), // 18: pb.CheckHTTPFirewallPolicyIPStatusRequest
(*CheckHTTPFirewallPolicyIPStatusResponse)(nil), // 19: pb.CheckHTTPFirewallPolicyIPStatusResponse
(*FindServerIdWithHTTPFirewallPolicyIdRequest)(nil), // 20: pb.FindServerIdWithHTTPFirewallPolicyIdRequest
(*FindServerIdWithHTTPFirewallPolicyIdResponse)(nil), // 21: pb.FindServerIdWithHTTPFirewallPolicyIdResponse
(*HTTPFirewallPolicy)(nil), // 22: pb.HTTPFirewallPolicy
(*IPList)(nil), // 23: pb.IPList
(*IPItem)(nil), // 24: pb.IPItem
(*RegionCountry)(nil), // 25: pb.RegionCountry
(*RegionProvince)(nil), // 26: pb.RegionProvince
(*RPCSuccess)(nil), // 27: pb.RPCSuccess
(*RPCCountResponse)(nil), // 28: pb.RPCCountResponse
}
var file_service_http_firewall_policy_proto_depIdxs = []int32{
20, // 0: pb.FindAllEnabledHTTPFirewallPoliciesResponse.firewallPolicies:type_name -> pb.HTTPFirewallPolicy
20, // 1: pb.ListEnabledHTTPFirewallPoliciesResponse.httpFirewallPolicies:type_name -> pb.HTTPFirewallPolicy
20, // 2: pb.FindEnabledHTTPFirewallPolicyResponse.httpFirewallPolicy:type_name -> pb.HTTPFirewallPolicy
21, // 3: pb.CheckHTTPFirewallPolicyIPStatusResponse.ipList:type_name -> pb.IPList
22, // 4: pb.CheckHTTPFirewallPolicyIPStatusResponse.ipItem:type_name -> pb.IPItem
23, // 5: pb.CheckHTTPFirewallPolicyIPStatusResponse.regionCountry:type_name -> pb.RegionCountry
24, // 6: pb.CheckHTTPFirewallPolicyIPStatusResponse.regionProvince:type_name -> pb.RegionProvince
22, // 0: pb.FindAllEnabledHTTPFirewallPoliciesResponse.firewallPolicies:type_name -> pb.HTTPFirewallPolicy
22, // 1: pb.ListEnabledHTTPFirewallPoliciesResponse.httpFirewallPolicies:type_name -> pb.HTTPFirewallPolicy
22, // 2: pb.FindEnabledHTTPFirewallPolicyResponse.httpFirewallPolicy:type_name -> pb.HTTPFirewallPolicy
23, // 3: pb.CheckHTTPFirewallPolicyIPStatusResponse.ipList:type_name -> pb.IPList
24, // 4: pb.CheckHTTPFirewallPolicyIPStatusResponse.ipItem:type_name -> pb.IPItem
25, // 5: pb.CheckHTTPFirewallPolicyIPStatusResponse.regionCountry:type_name -> pb.RegionCountry
26, // 6: pb.CheckHTTPFirewallPolicyIPStatusResponse.regionProvince:type_name -> pb.RegionProvince
0, // 7: pb.HTTPFirewallPolicyService.findAllEnabledHTTPFirewallPolicies:input_type -> pb.FindAllEnabledHTTPFirewallPoliciesRequest
2, // 8: pb.HTTPFirewallPolicyService.createHTTPFirewallPolicy:input_type -> pb.CreateHTTPFirewallPolicyRequest
4, // 9: pb.HTTPFirewallPolicyService.createEmptyHTTPFirewallPolicy:input_type -> pb.CreateEmptyHTTPFirewallPolicyRequest
@@ -1633,21 +1771,23 @@ var file_service_http_firewall_policy_proto_depIdxs = []int32{
15, // 17: pb.HTTPFirewallPolicyService.findEnabledHTTPFirewallPolicy:input_type -> pb.FindEnabledHTTPFirewallPolicyRequest
17, // 18: pb.HTTPFirewallPolicyService.importHTTPFirewallPolicy:input_type -> pb.ImportHTTPFirewallPolicyRequest
18, // 19: pb.HTTPFirewallPolicyService.checkHTTPFirewallPolicyIPStatus:input_type -> pb.CheckHTTPFirewallPolicyIPStatusRequest
1, // 20: pb.HTTPFirewallPolicyService.findAllEnabledHTTPFirewallPolicies:output_type -> pb.FindAllEnabledHTTPFirewallPoliciesResponse
3, // 21: pb.HTTPFirewallPolicyService.createHTTPFirewallPolicy:output_type -> pb.CreateHTTPFirewallPolicyResponse
5, // 22: pb.HTTPFirewallPolicyService.createEmptyHTTPFirewallPolicy:output_type -> pb.CreateEmptyHTTPFirewallPolicyResponse
25, // 23: pb.HTTPFirewallPolicyService.updateHTTPFirewallPolicy:output_type -> pb.RPCSuccess
25, // 24: pb.HTTPFirewallPolicyService.updateHTTPFirewallPolicyGroups:output_type -> pb.RPCSuccess
25, // 25: pb.HTTPFirewallPolicyService.updateHTTPFirewallInboundConfig:output_type -> pb.RPCSuccess
26, // 26: pb.HTTPFirewallPolicyService.countAllEnabledHTTPFirewallPolicies:output_type -> pb.RPCCountResponse
11, // 27: pb.HTTPFirewallPolicyService.listEnabledHTTPFirewallPolicies:output_type -> pb.ListEnabledHTTPFirewallPoliciesResponse
25, // 28: pb.HTTPFirewallPolicyService.deleteHTTPFirewallPolicy:output_type -> pb.RPCSuccess
14, // 29: pb.HTTPFirewallPolicyService.findEnabledHTTPFirewallPolicyConfig:output_type -> pb.FindEnabledHTTPFirewallPolicyConfigResponse
16, // 30: pb.HTTPFirewallPolicyService.findEnabledHTTPFirewallPolicy:output_type -> pb.FindEnabledHTTPFirewallPolicyResponse
25, // 31: pb.HTTPFirewallPolicyService.importHTTPFirewallPolicy:output_type -> pb.RPCSuccess
19, // 32: pb.HTTPFirewallPolicyService.checkHTTPFirewallPolicyIPStatus:output_type -> pb.CheckHTTPFirewallPolicyIPStatusResponse
20, // [20:33] is the sub-list for method output_type
7, // [7:20] is the sub-list for method input_type
20, // 20: pb.HTTPFirewallPolicyService.findServerIdWithHTTPFirewallPolicyId:input_type -> pb.FindServerIdWithHTTPFirewallPolicyIdRequest
1, // 21: pb.HTTPFirewallPolicyService.findAllEnabledHTTPFirewallPolicies:output_type -> pb.FindAllEnabledHTTPFirewallPoliciesResponse
3, // 22: pb.HTTPFirewallPolicyService.createHTTPFirewallPolicy:output_type -> pb.CreateHTTPFirewallPolicyResponse
5, // 23: pb.HTTPFirewallPolicyService.createEmptyHTTPFirewallPolicy:output_type -> pb.CreateEmptyHTTPFirewallPolicyResponse
27, // 24: pb.HTTPFirewallPolicyService.updateHTTPFirewallPolicy:output_type -> pb.RPCSuccess
27, // 25: pb.HTTPFirewallPolicyService.updateHTTPFirewallPolicyGroups:output_type -> pb.RPCSuccess
27, // 26: pb.HTTPFirewallPolicyService.updateHTTPFirewallInboundConfig:output_type -> pb.RPCSuccess
28, // 27: pb.HTTPFirewallPolicyService.countAllEnabledHTTPFirewallPolicies:output_type -> pb.RPCCountResponse
11, // 28: pb.HTTPFirewallPolicyService.listEnabledHTTPFirewallPolicies:output_type -> pb.ListEnabledHTTPFirewallPoliciesResponse
27, // 29: pb.HTTPFirewallPolicyService.deleteHTTPFirewallPolicy:output_type -> pb.RPCSuccess
14, // 30: pb.HTTPFirewallPolicyService.findEnabledHTTPFirewallPolicyConfig:output_type -> pb.FindEnabledHTTPFirewallPolicyConfigResponse
16, // 31: pb.HTTPFirewallPolicyService.findEnabledHTTPFirewallPolicy:output_type -> pb.FindEnabledHTTPFirewallPolicyResponse
27, // 32: pb.HTTPFirewallPolicyService.importHTTPFirewallPolicy:output_type -> pb.RPCSuccess
19, // 33: pb.HTTPFirewallPolicyService.checkHTTPFirewallPolicyIPStatus:output_type -> pb.CheckHTTPFirewallPolicyIPStatusResponse
21, // 34: pb.HTTPFirewallPolicyService.findServerIdWithHTTPFirewallPolicyId:output_type -> pb.FindServerIdWithHTTPFirewallPolicyIdResponse
21, // [21:35] is the sub-list for method output_type
7, // [7:21] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
@@ -1905,6 +2045,30 @@ func file_service_http_firewall_policy_proto_init() {
return nil
}
}
file_service_http_firewall_policy_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindServerIdWithHTTPFirewallPolicyIdRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_http_firewall_policy_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindServerIdWithHTTPFirewallPolicyIdResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -1912,7 +2076,7 @@ func file_service_http_firewall_policy_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_http_firewall_policy_proto_rawDesc,
NumEnums: 0,
NumMessages: 20,
NumMessages: 22,
NumExtensions: 0,
NumServices: 1,
},

View File

@@ -19,19 +19,20 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
HTTPFirewallPolicyService_FindAllEnabledHTTPFirewallPolicies_FullMethodName = "/pb.HTTPFirewallPolicyService/findAllEnabledHTTPFirewallPolicies"
HTTPFirewallPolicyService_CreateHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/createHTTPFirewallPolicy"
HTTPFirewallPolicyService_CreateEmptyHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/createEmptyHTTPFirewallPolicy"
HTTPFirewallPolicyService_UpdateHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/updateHTTPFirewallPolicy"
HTTPFirewallPolicyService_UpdateHTTPFirewallPolicyGroups_FullMethodName = "/pb.HTTPFirewallPolicyService/updateHTTPFirewallPolicyGroups"
HTTPFirewallPolicyService_UpdateHTTPFirewallInboundConfig_FullMethodName = "/pb.HTTPFirewallPolicyService/updateHTTPFirewallInboundConfig"
HTTPFirewallPolicyService_CountAllEnabledHTTPFirewallPolicies_FullMethodName = "/pb.HTTPFirewallPolicyService/countAllEnabledHTTPFirewallPolicies"
HTTPFirewallPolicyService_ListEnabledHTTPFirewallPolicies_FullMethodName = "/pb.HTTPFirewallPolicyService/listEnabledHTTPFirewallPolicies"
HTTPFirewallPolicyService_DeleteHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/deleteHTTPFirewallPolicy"
HTTPFirewallPolicyService_FindEnabledHTTPFirewallPolicyConfig_FullMethodName = "/pb.HTTPFirewallPolicyService/findEnabledHTTPFirewallPolicyConfig"
HTTPFirewallPolicyService_FindEnabledHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/findEnabledHTTPFirewallPolicy"
HTTPFirewallPolicyService_ImportHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/importHTTPFirewallPolicy"
HTTPFirewallPolicyService_CheckHTTPFirewallPolicyIPStatus_FullMethodName = "/pb.HTTPFirewallPolicyService/checkHTTPFirewallPolicyIPStatus"
HTTPFirewallPolicyService_FindAllEnabledHTTPFirewallPolicies_FullMethodName = "/pb.HTTPFirewallPolicyService/findAllEnabledHTTPFirewallPolicies"
HTTPFirewallPolicyService_CreateHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/createHTTPFirewallPolicy"
HTTPFirewallPolicyService_CreateEmptyHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/createEmptyHTTPFirewallPolicy"
HTTPFirewallPolicyService_UpdateHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/updateHTTPFirewallPolicy"
HTTPFirewallPolicyService_UpdateHTTPFirewallPolicyGroups_FullMethodName = "/pb.HTTPFirewallPolicyService/updateHTTPFirewallPolicyGroups"
HTTPFirewallPolicyService_UpdateHTTPFirewallInboundConfig_FullMethodName = "/pb.HTTPFirewallPolicyService/updateHTTPFirewallInboundConfig"
HTTPFirewallPolicyService_CountAllEnabledHTTPFirewallPolicies_FullMethodName = "/pb.HTTPFirewallPolicyService/countAllEnabledHTTPFirewallPolicies"
HTTPFirewallPolicyService_ListEnabledHTTPFirewallPolicies_FullMethodName = "/pb.HTTPFirewallPolicyService/listEnabledHTTPFirewallPolicies"
HTTPFirewallPolicyService_DeleteHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/deleteHTTPFirewallPolicy"
HTTPFirewallPolicyService_FindEnabledHTTPFirewallPolicyConfig_FullMethodName = "/pb.HTTPFirewallPolicyService/findEnabledHTTPFirewallPolicyConfig"
HTTPFirewallPolicyService_FindEnabledHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/findEnabledHTTPFirewallPolicy"
HTTPFirewallPolicyService_ImportHTTPFirewallPolicy_FullMethodName = "/pb.HTTPFirewallPolicyService/importHTTPFirewallPolicy"
HTTPFirewallPolicyService_CheckHTTPFirewallPolicyIPStatus_FullMethodName = "/pb.HTTPFirewallPolicyService/checkHTTPFirewallPolicyIPStatus"
HTTPFirewallPolicyService_FindServerIdWithHTTPFirewallPolicyId_FullMethodName = "/pb.HTTPFirewallPolicyService/findServerIdWithHTTPFirewallPolicyId"
)
// HTTPFirewallPolicyServiceClient is the client API for HTTPFirewallPolicyService service.
@@ -64,6 +65,8 @@ type HTTPFirewallPolicyServiceClient interface {
ImportHTTPFirewallPolicy(ctx context.Context, in *ImportHTTPFirewallPolicyRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 检查IP状态
CheckHTTPFirewallPolicyIPStatus(ctx context.Context, in *CheckHTTPFirewallPolicyIPStatusRequest, opts ...grpc.CallOption) (*CheckHTTPFirewallPolicyIPStatusResponse, error)
// 获取防火墙对应的网站ID
FindServerIdWithHTTPFirewallPolicyId(ctx context.Context, in *FindServerIdWithHTTPFirewallPolicyIdRequest, opts ...grpc.CallOption) (*FindServerIdWithHTTPFirewallPolicyIdResponse, error)
}
type hTTPFirewallPolicyServiceClient struct {
@@ -191,6 +194,15 @@ func (c *hTTPFirewallPolicyServiceClient) CheckHTTPFirewallPolicyIPStatus(ctx co
return out, nil
}
func (c *hTTPFirewallPolicyServiceClient) FindServerIdWithHTTPFirewallPolicyId(ctx context.Context, in *FindServerIdWithHTTPFirewallPolicyIdRequest, opts ...grpc.CallOption) (*FindServerIdWithHTTPFirewallPolicyIdResponse, error) {
out := new(FindServerIdWithHTTPFirewallPolicyIdResponse)
err := c.cc.Invoke(ctx, HTTPFirewallPolicyService_FindServerIdWithHTTPFirewallPolicyId_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HTTPFirewallPolicyServiceServer is the server API for HTTPFirewallPolicyService service.
// All implementations should embed UnimplementedHTTPFirewallPolicyServiceServer
// for forward compatibility
@@ -221,6 +233,8 @@ type HTTPFirewallPolicyServiceServer interface {
ImportHTTPFirewallPolicy(context.Context, *ImportHTTPFirewallPolicyRequest) (*RPCSuccess, error)
// 检查IP状态
CheckHTTPFirewallPolicyIPStatus(context.Context, *CheckHTTPFirewallPolicyIPStatusRequest) (*CheckHTTPFirewallPolicyIPStatusResponse, error)
// 获取防火墙对应的网站ID
FindServerIdWithHTTPFirewallPolicyId(context.Context, *FindServerIdWithHTTPFirewallPolicyIdRequest) (*FindServerIdWithHTTPFirewallPolicyIdResponse, error)
}
// UnimplementedHTTPFirewallPolicyServiceServer should be embedded to have forward compatible implementations.
@@ -266,6 +280,9 @@ func (UnimplementedHTTPFirewallPolicyServiceServer) ImportHTTPFirewallPolicy(con
func (UnimplementedHTTPFirewallPolicyServiceServer) CheckHTTPFirewallPolicyIPStatus(context.Context, *CheckHTTPFirewallPolicyIPStatusRequest) (*CheckHTTPFirewallPolicyIPStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckHTTPFirewallPolicyIPStatus not implemented")
}
func (UnimplementedHTTPFirewallPolicyServiceServer) FindServerIdWithHTTPFirewallPolicyId(context.Context, *FindServerIdWithHTTPFirewallPolicyIdRequest) (*FindServerIdWithHTTPFirewallPolicyIdResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindServerIdWithHTTPFirewallPolicyId not implemented")
}
// UnsafeHTTPFirewallPolicyServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HTTPFirewallPolicyServiceServer will
@@ -512,6 +529,24 @@ func _HTTPFirewallPolicyService_CheckHTTPFirewallPolicyIPStatus_Handler(srv inte
return interceptor(ctx, in, info, handler)
}
func _HTTPFirewallPolicyService_FindServerIdWithHTTPFirewallPolicyId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindServerIdWithHTTPFirewallPolicyIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPFirewallPolicyServiceServer).FindServerIdWithHTTPFirewallPolicyId(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: HTTPFirewallPolicyService_FindServerIdWithHTTPFirewallPolicyId_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPFirewallPolicyServiceServer).FindServerIdWithHTTPFirewallPolicyId(ctx, req.(*FindServerIdWithHTTPFirewallPolicyIdRequest))
}
return interceptor(ctx, in, info, handler)
}
// HTTPFirewallPolicyService_ServiceDesc is the grpc.ServiceDesc for HTTPFirewallPolicyService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -571,6 +606,10 @@ var HTTPFirewallPolicyService_ServiceDesc = grpc.ServiceDesc{
MethodName: "checkHTTPFirewallPolicyIPStatus",
Handler: _HTTPFirewallPolicyService_CheckHTTPFirewallPolicyIPStatus_Handler,
},
{
MethodName: "findServerIdWithHTTPFirewallPolicyId",
Handler: _HTTPFirewallPolicyService_FindServerIdWithHTTPFirewallPolicyId_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_http_firewall_policy.proto",

View File

@@ -2538,6 +2538,252 @@ func (x *FindHTTPWebUserAgentResponse) GetUserAgentJSON() []byte {
return nil
}
// 修改HLS设置
type UpdateHTTPWebHLSRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
HttpWebId int64 `protobuf:"varint,1,opt,name=httpWebId,proto3" json:"httpWebId,omitempty"` // Web配置ID
HlsJSON []byte `protobuf:"bytes,2,opt,name=hlsJSON,proto3" json:"hlsJSON,omitempty"` // HLS配置
}
func (x *UpdateHTTPWebHLSRequest) Reset() {
*x = UpdateHTTPWebHLSRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_web_proto_msgTypes[48]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateHTTPWebHLSRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateHTTPWebHLSRequest) ProtoMessage() {}
func (x *UpdateHTTPWebHLSRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_http_web_proto_msgTypes[48]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateHTTPWebHLSRequest.ProtoReflect.Descriptor instead.
func (*UpdateHTTPWebHLSRequest) Descriptor() ([]byte, []int) {
return file_service_http_web_proto_rawDescGZIP(), []int{48}
}
func (x *UpdateHTTPWebHLSRequest) GetHttpWebId() int64 {
if x != nil {
return x.HttpWebId
}
return 0
}
func (x *UpdateHTTPWebHLSRequest) GetHlsJSON() []byte {
if x != nil {
return x.HlsJSON
}
return nil
}
// 查找HLS设置
type FindHTTPWebHLSRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
HttpWebId int64 `protobuf:"varint,1,opt,name=httpWebId,proto3" json:"httpWebId,omitempty"` // Web配置ID
}
func (x *FindHTTPWebHLSRequest) Reset() {
*x = FindHTTPWebHLSRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_web_proto_msgTypes[49]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindHTTPWebHLSRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindHTTPWebHLSRequest) ProtoMessage() {}
func (x *FindHTTPWebHLSRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_http_web_proto_msgTypes[49]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindHTTPWebHLSRequest.ProtoReflect.Descriptor instead.
func (*FindHTTPWebHLSRequest) Descriptor() ([]byte, []int) {
return file_service_http_web_proto_rawDescGZIP(), []int{49}
}
func (x *FindHTTPWebHLSRequest) GetHttpWebId() int64 {
if x != nil {
return x.HttpWebId
}
return 0
}
type FindHTTPWebHLSResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
HlsJSON []byte `protobuf:"bytes,1,opt,name=hlsJSON,proto3" json:"hlsJSON,omitempty"` // HLS配置
}
func (x *FindHTTPWebHLSResponse) Reset() {
*x = FindHTTPWebHLSResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_web_proto_msgTypes[50]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindHTTPWebHLSResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindHTTPWebHLSResponse) ProtoMessage() {}
func (x *FindHTTPWebHLSResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_http_web_proto_msgTypes[50]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindHTTPWebHLSResponse.ProtoReflect.Descriptor instead.
func (*FindHTTPWebHLSResponse) Descriptor() ([]byte, []int) {
return file_service_http_web_proto_rawDescGZIP(), []int{50}
}
func (x *FindHTTPWebHLSResponse) GetHlsJSON() []byte {
if x != nil {
return x.HlsJSON
}
return nil
}
// 根据WebId查找ServerId
type FindServerIdWithHTTPWebIdRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
HttpWebId int64 `protobuf:"varint,1,opt,name=httpWebId,proto3" json:"httpWebId,omitempty"` // Web设置ID
}
func (x *FindServerIdWithHTTPWebIdRequest) Reset() {
*x = FindServerIdWithHTTPWebIdRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_web_proto_msgTypes[51]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindServerIdWithHTTPWebIdRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindServerIdWithHTTPWebIdRequest) ProtoMessage() {}
func (x *FindServerIdWithHTTPWebIdRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_http_web_proto_msgTypes[51]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindServerIdWithHTTPWebIdRequest.ProtoReflect.Descriptor instead.
func (*FindServerIdWithHTTPWebIdRequest) Descriptor() ([]byte, []int) {
return file_service_http_web_proto_rawDescGZIP(), []int{51}
}
func (x *FindServerIdWithHTTPWebIdRequest) GetHttpWebId() int64 {
if x != nil {
return x.HttpWebId
}
return 0
}
type FindServerIdWithHTTPWebIdResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` // 网站ID
}
func (x *FindServerIdWithHTTPWebIdResponse) Reset() {
*x = FindServerIdWithHTTPWebIdResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_http_web_proto_msgTypes[52]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindServerIdWithHTTPWebIdResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindServerIdWithHTTPWebIdResponse) ProtoMessage() {}
func (x *FindServerIdWithHTTPWebIdResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_http_web_proto_msgTypes[52]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindServerIdWithHTTPWebIdResponse.ProtoReflect.Descriptor instead.
func (*FindServerIdWithHTTPWebIdResponse) Descriptor() ([]byte, []int) {
return file_service_http_web_proto_rawDescGZIP(), []int{52}
}
func (x *FindServerIdWithHTTPWebIdResponse) GetServerId() int64 {
if x != nil {
return x.ServerId
}
return 0
}
var File_service_http_web_proto protoreflect.FileDescriptor
var file_service_http_web_proto_rawDesc = []byte{
@@ -2798,197 +3044,232 @@ var file_service_http_web_proto_rawDesc = []byte{
0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24,
0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74,
0x4a, 0x53, 0x4f, 0x4e, 0x32, 0xcf, 0x17, 0x0a, 0x0e, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a,
0x12, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71,
0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x51, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x48, 0x4c, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x1c, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x57, 0x65, 0x62, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x09, 0x68, 0x74, 0x74, 0x70, 0x57, 0x65, 0x62, 0x49, 0x64, 0x12, 0x18, 0x0a,
0x07, 0x68, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
0x68, 0x6c, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x35, 0x0a, 0x15, 0x46, 0x69, 0x6e, 0x64, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x48, 0x4c, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x1c, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x57, 0x65, 0x62, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x09, 0x68, 0x74, 0x74, 0x70, 0x57, 0x65, 0x62, 0x49, 0x64, 0x22, 0x32,
0x0a, 0x16, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x48, 0x4c, 0x53,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x6c, 0x73, 0x4a,
0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x68, 0x6c, 0x73, 0x4a, 0x53,
0x4f, 0x4e, 0x22, 0x40, 0x0a, 0x20, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x49, 0x64, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x57, 0x65,
0x62, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x68, 0x74, 0x74, 0x70, 0x57,
0x65, 0x62, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x21, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x49,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72,
0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72,
0x76, 0x65, 0x72, 0x49, 0x64, 0x32, 0xc3, 0x19, 0x0a, 0x0e, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53,
0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x12, 0x18, 0x2e, 0x70, 0x62,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4f, 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 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, 0x51, 0x0a, 0x19, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 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, 0x41, 0x0a, 0x11, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x57, 0x65, 0x62, 0x50, 0x12, 0x1c,
0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x57, 0x65, 0x62, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70,
0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x17,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x6d,
0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62,
0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x14, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x68, 0x61, 0x72,
0x73, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x12, 0x4f, 0x0a, 0x18, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
0x63, 0x65, 0x73, 0x73, 0x12, 0x53, 0x0a, 0x1a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52,
0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x1b, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
0x12, 0x49, 0x0a, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x53, 0x68, 0x75, 0x74,
0x64, 0x6f, 0x77, 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, 0x43, 0x0a, 0x12, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x50, 0x61, 0x67, 0x65,
0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x50, 0x61, 0x67, 0x65, 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, 0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x41, 0x63, 0x63,
0x65, 0x73, 0x73, 0x4c, 0x6f, 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, 0x41, 0x0a,
0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x53, 0x74,
0x61, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x53, 0x74, 0x61, 0x74, 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, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x12, 0x20,
0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
0x12, 0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x4c, 0x6f, 0x63,
0x61, 0x74, 0x69, 0x6f, 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, 0x57, 0x0a,
0x1c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65,
0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x48, 0x54, 0x54, 0x50, 0x53, 0x12, 0x27, 0x2e,
0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x48, 0x54, 0x54, 0x50, 0x53, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x46, 0x61, 0x73, 0x74, 0x63, 0x67, 0x69, 0x12, 0x1f, 0x2e, 0x70, 0x62,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x46, 0x61,
0x73, 0x74, 0x63, 0x67, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70,
0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x51, 0x0a, 0x19,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x77,
0x72, 0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x77, 0x72,
0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 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,
0x53, 0x0a, 0x1a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x12, 0x25, 0x2e,
0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 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, 0x65, 0x0a, 0x18, 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73,
0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65,
0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x11, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68,
0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x45,
0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 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, 0x51, 0x0a, 0x19, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
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, 0x41, 0x0a, 0x11, 0x75, 0x70, 0x64, 0x61,
0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x57, 0x65, 0x62, 0x50, 0x12, 0x1c, 0x2e,
0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x57, 0x65, 0x62, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62,
0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x6d, 0x6f,
0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41,
0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e,
0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x14, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x68, 0x61, 0x72, 0x73,
0x65, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x12, 0x53, 0x0a, 0x1a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65,
0x72, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65,
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50,
0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x55, 0x0a, 0x1b, 0x75, 0x70, 0x64, 0x61,
0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12,
0x49, 0x0a, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x53, 0x68, 0x75, 0x74, 0x64,
0x6f, 0x77, 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, 0x43, 0x0a, 0x12, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x50, 0x61, 0x67, 0x65, 0x73,
0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x50, 0x61, 0x67, 0x65, 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,
0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x41, 0x63, 0x63, 0x65,
0x73, 0x73, 0x4c, 0x6f, 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, 0x41, 0x0a, 0x11,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x53, 0x74, 0x61,
0x74, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x53, 0x74, 0x61, 0x74, 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, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63,
0x63, 0x65, 0x73, 0x73, 0x12, 0x49, 0x0a, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x12, 0x20, 0x2e,
0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x46, 0x69, 0x72, 0x65, 0x77, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12,
0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x4c, 0x6f, 0x63, 0x61,
0x74, 0x69, 0x6f, 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, 0x57, 0x0a, 0x1c,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x64,
0x69, 0x72, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x48, 0x54, 0x54, 0x50, 0x53, 0x12, 0x27, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52,
0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x48, 0x54, 0x54, 0x50, 0x53, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12,
0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57,
0x65, 0x62, 0x57, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65,
0x73, 0x73, 0x12, 0x47, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x46, 0x61, 0x73, 0x74, 0x63, 0x67, 0x69, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x46, 0x61, 0x73,
0x74, 0x63, 0x67, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62,
0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x51, 0x0a, 0x19, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x77, 0x72,
0x69, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x77, 0x72, 0x69,
0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 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, 0x53,
0x0a, 0x1a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x48,
0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x48,
0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 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, 0x65, 0x0a, 0x18, 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57,
0x65, 0x62, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x12,
0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63,
0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x11, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x12,
0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57,
0x65, 0x62, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x45, 0x0a,
0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f,
0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 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, 0x51, 0x0a, 0x19, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69,
0x74, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43,
0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6d,
0x69, 0x74, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x69, 0x74, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50,
0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69,
0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x1b, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 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, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x12,
0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x63, 0x72,
0x69, 0x70, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x41, 0x4d,
0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50,
0x57, 0x65, 0x62, 0x55, 0x41, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a,
0x0e, 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x41, 0x4d, 0x12,
0x19, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x55, 0x41, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e,
0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x41, 0x4d, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x43, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x43, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x43, 0x43, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x43, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x43, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x15, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x66, 0x65,
0x72, 0x65, 0x72, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x73, 0x52,
0x6d, 0x69, 0x74, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e,
0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c,
0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x1b,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x70, 0x62,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 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, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57,
0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73,
0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x63,
0x72, 0x69, 0x70, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a,
0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x41,
0x4d, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x55, 0x41, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47,
0x0a, 0x0e, 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x41, 0x4d,
0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x55, 0x41, 0x4d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x41, 0x4d, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74,
0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x43, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x43, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e,
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65,
0x66, 0x65, 0x72, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65,
0x66, 0x65, 0x72, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b,
0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55,
0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x73, 0x65, 0x72, 0x41,
0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62,
0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x66,
0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x73, 0x65, 0x72, 0x41, 0x67,
0x65, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54,
0x50, 0x57, 0x65, 0x62, 0x55, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x64, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x43, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e,
0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x43, 0x43, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57,
0x65, 0x62, 0x43, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x15,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x66,
0x65, 0x72, 0x65, 0x72, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 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, 0x56, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x64, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x73, 0x12, 0x1e,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52,
0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x52,
0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x4b, 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62,
0x55, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x73, 0x65, 0x72,
0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70,
0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x14,
0x66, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x73, 0x65, 0x72, 0x41,
0x67, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48, 0x54,
0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x55, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74,
0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x48, 0x4c, 0x53, 0x12, 0x1b, 0x2e, 0x70, 0x62,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x48, 0x4c,
0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50,
0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x0e, 0x66, 0x69, 0x6e, 0x64,
0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x48, 0x4c, 0x53, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e,
0x46, 0x69, 0x6e, 0x64, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x48, 0x4c, 0x53, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x48,
0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x48, 0x4c, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x68, 0x0a, 0x19, 0x66, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49,
0x64, 0x57, 0x69, 0x74, 0x68, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x49, 0x64, 0x12, 0x24,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64,
0x57, 0x69, 0x74, 0x68, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65, 0x62, 0x49, 0x64, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65,
0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x48, 0x54, 0x54, 0x50, 0x57, 0x65,
0x62, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -3003,7 +3284,7 @@ func file_service_http_web_proto_rawDescGZIP() []byte {
return file_service_http_web_proto_rawDescData
}
var file_service_http_web_proto_msgTypes = make([]protoimpl.MessageInfo, 48)
var file_service_http_web_proto_msgTypes = make([]protoimpl.MessageInfo, 53)
var file_service_http_web_proto_goTypes = []interface{}{
(*CreateHTTPWebRequest)(nil), // 0: pb.CreateHTTPWebRequest
(*CreateHTTPWebResponse)(nil), // 1: pb.CreateHTTPWebResponse
@@ -3053,11 +3334,16 @@ var file_service_http_web_proto_goTypes = []interface{}{
(*UpdateHTTPWebUserAgentRequest)(nil), // 45: pb.UpdateHTTPWebUserAgentRequest
(*FindHTTPWebUserAgentRequest)(nil), // 46: pb.FindHTTPWebUserAgentRequest
(*FindHTTPWebUserAgentResponse)(nil), // 47: pb.FindHTTPWebUserAgentResponse
(*HTTPWeb)(nil), // 48: pb.HTTPWeb
(*RPCSuccess)(nil), // 49: pb.RPCSuccess
(*UpdateHTTPWebHLSRequest)(nil), // 48: pb.UpdateHTTPWebHLSRequest
(*FindHTTPWebHLSRequest)(nil), // 49: pb.FindHTTPWebHLSRequest
(*FindHTTPWebHLSResponse)(nil), // 50: pb.FindHTTPWebHLSResponse
(*FindServerIdWithHTTPWebIdRequest)(nil), // 51: pb.FindServerIdWithHTTPWebIdRequest
(*FindServerIdWithHTTPWebIdResponse)(nil), // 52: pb.FindServerIdWithHTTPWebIdResponse
(*HTTPWeb)(nil), // 53: pb.HTTPWeb
(*RPCSuccess)(nil), // 54: pb.RPCSuccess
}
var file_service_http_web_proto_depIdxs = []int32{
48, // 0: pb.FindEnabledHTTPWebResponse.httpWeb:type_name -> pb.HTTPWeb
53, // 0: pb.FindEnabledHTTPWebResponse.httpWeb:type_name -> pb.HTTPWeb
0, // 1: pb.HTTPWebService.createHTTPWeb:input_type -> pb.CreateHTTPWebRequest
2, // 2: pb.HTTPWebService.findEnabledHTTPWeb:input_type -> pb.FindEnabledHTTPWebRequest
4, // 3: pb.HTTPWebService.findEnabledHTTPWebConfig:input_type -> pb.FindEnabledHTTPWebConfigRequest
@@ -3096,46 +3382,52 @@ var file_service_http_web_proto_depIdxs = []int32{
43, // 36: pb.HTTPWebService.findHTTPWebReferers:input_type -> pb.FindHTTPWebReferersRequest
45, // 37: pb.HTTPWebService.updateHTTPWebUserAgent:input_type -> pb.UpdateHTTPWebUserAgentRequest
46, // 38: pb.HTTPWebService.findHTTPWebUserAgent:input_type -> pb.FindHTTPWebUserAgentRequest
1, // 39: pb.HTTPWebService.createHTTPWeb:output_type -> pb.CreateHTTPWebResponse
3, // 40: pb.HTTPWebService.findEnabledHTTPWeb:output_type -> pb.FindEnabledHTTPWebResponse
5, // 41: pb.HTTPWebService.findEnabledHTTPWebConfig:output_type -> pb.FindEnabledHTTPWebConfigResponse
49, // 42: pb.HTTPWebService.updateHTTPWeb:output_type -> pb.RPCSuccess
49, // 43: pb.HTTPWebService.updateHTTPWebCompression:output_type -> pb.RPCSuccess
49, // 44: pb.HTTPWebService.updateHTTPWebOptimization:output_type -> pb.RPCSuccess
49, // 45: pb.HTTPWebService.updateHTTPWebWebP:output_type -> pb.RPCSuccess
49, // 46: pb.HTTPWebService.updateHTTPWebRemoteAddr:output_type -> pb.RPCSuccess
49, // 47: pb.HTTPWebService.updateHTTPWebCharset:output_type -> pb.RPCSuccess
49, // 48: pb.HTTPWebService.updateHTTPWebRequestHeader:output_type -> pb.RPCSuccess
49, // 49: pb.HTTPWebService.updateHTTPWebResponseHeader:output_type -> pb.RPCSuccess
49, // 50: pb.HTTPWebService.updateHTTPWebShutdown:output_type -> pb.RPCSuccess
49, // 51: pb.HTTPWebService.updateHTTPWebPages:output_type -> pb.RPCSuccess
49, // 52: pb.HTTPWebService.updateHTTPWebAccessLog:output_type -> pb.RPCSuccess
49, // 53: pb.HTTPWebService.updateHTTPWebStat:output_type -> pb.RPCSuccess
49, // 54: pb.HTTPWebService.updateHTTPWebCache:output_type -> pb.RPCSuccess
49, // 55: pb.HTTPWebService.updateHTTPWebFirewall:output_type -> pb.RPCSuccess
49, // 56: pb.HTTPWebService.updateHTTPWebLocations:output_type -> pb.RPCSuccess
49, // 57: pb.HTTPWebService.updateHTTPWebRedirectToHTTPS:output_type -> pb.RPCSuccess
49, // 58: pb.HTTPWebService.updateHTTPWebWebsocket:output_type -> pb.RPCSuccess
49, // 59: pb.HTTPWebService.updateHTTPWebFastcgi:output_type -> pb.RPCSuccess
49, // 60: pb.HTTPWebService.updateHTTPWebRewriteRules:output_type -> pb.RPCSuccess
49, // 61: pb.HTTPWebService.updateHTTPWebHostRedirects:output_type -> pb.RPCSuccess
27, // 62: pb.HTTPWebService.findHTTPWebHostRedirects:output_type -> pb.FindHTTPWebHostRedirectsResponse
49, // 63: pb.HTTPWebService.updateHTTPWebAuth:output_type -> pb.RPCSuccess
49, // 64: pb.HTTPWebService.updateHTTPWebCommon:output_type -> pb.RPCSuccess
49, // 65: pb.HTTPWebService.updateHTTPWebRequestLimit:output_type -> pb.RPCSuccess
32, // 66: pb.HTTPWebService.findHTTPWebRequestLimit:output_type -> pb.FindHTTPWebRequestLimitResponse
49, // 67: pb.HTTPWebService.updateHTTPWebRequestScripts:output_type -> pb.RPCSuccess
35, // 68: pb.HTTPWebService.findHTTPWebRequestScripts:output_type -> pb.FindHTTPWebRequestScriptsResponse
49, // 69: pb.HTTPWebService.updateHTTPWebUAM:output_type -> pb.RPCSuccess
38, // 70: pb.HTTPWebService.findHTTPWebUAM:output_type -> pb.FindHTTPWebUAMResponse
49, // 71: pb.HTTPWebService.updateHTTPWebCC:output_type -> pb.RPCSuccess
41, // 72: pb.HTTPWebService.findHTTPWebCC:output_type -> pb.FindHTTPWebCCResponse
49, // 73: pb.HTTPWebService.updateHTTPWebReferers:output_type -> pb.RPCSuccess
44, // 74: pb.HTTPWebService.findHTTPWebReferers:output_type -> pb.FindHTTPWebReferersResponse
49, // 75: pb.HTTPWebService.updateHTTPWebUserAgent:output_type -> pb.RPCSuccess
47, // 76: pb.HTTPWebService.findHTTPWebUserAgent:output_type -> pb.FindHTTPWebUserAgentResponse
39, // [39:77] is the sub-list for method output_type
1, // [1:39] is the sub-list for method input_type
48, // 39: pb.HTTPWebService.updateHTTPWebHLS:input_type -> pb.UpdateHTTPWebHLSRequest
49, // 40: pb.HTTPWebService.findHTTPWebHLS:input_type -> pb.FindHTTPWebHLSRequest
51, // 41: pb.HTTPWebService.findServerIdWithHTTPWebId:input_type -> pb.FindServerIdWithHTTPWebIdRequest
1, // 42: pb.HTTPWebService.createHTTPWeb:output_type -> pb.CreateHTTPWebResponse
3, // 43: pb.HTTPWebService.findEnabledHTTPWeb:output_type -> pb.FindEnabledHTTPWebResponse
5, // 44: pb.HTTPWebService.findEnabledHTTPWebConfig:output_type -> pb.FindEnabledHTTPWebConfigResponse
54, // 45: pb.HTTPWebService.updateHTTPWeb:output_type -> pb.RPCSuccess
54, // 46: pb.HTTPWebService.updateHTTPWebCompression:output_type -> pb.RPCSuccess
54, // 47: pb.HTTPWebService.updateHTTPWebOptimization:output_type -> pb.RPCSuccess
54, // 48: pb.HTTPWebService.updateHTTPWebWebP:output_type -> pb.RPCSuccess
54, // 49: pb.HTTPWebService.updateHTTPWebRemoteAddr:output_type -> pb.RPCSuccess
54, // 50: pb.HTTPWebService.updateHTTPWebCharset:output_type -> pb.RPCSuccess
54, // 51: pb.HTTPWebService.updateHTTPWebRequestHeader:output_type -> pb.RPCSuccess
54, // 52: pb.HTTPWebService.updateHTTPWebResponseHeader:output_type -> pb.RPCSuccess
54, // 53: pb.HTTPWebService.updateHTTPWebShutdown:output_type -> pb.RPCSuccess
54, // 54: pb.HTTPWebService.updateHTTPWebPages:output_type -> pb.RPCSuccess
54, // 55: pb.HTTPWebService.updateHTTPWebAccessLog:output_type -> pb.RPCSuccess
54, // 56: pb.HTTPWebService.updateHTTPWebStat:output_type -> pb.RPCSuccess
54, // 57: pb.HTTPWebService.updateHTTPWebCache:output_type -> pb.RPCSuccess
54, // 58: pb.HTTPWebService.updateHTTPWebFirewall:output_type -> pb.RPCSuccess
54, // 59: pb.HTTPWebService.updateHTTPWebLocations:output_type -> pb.RPCSuccess
54, // 60: pb.HTTPWebService.updateHTTPWebRedirectToHTTPS:output_type -> pb.RPCSuccess
54, // 61: pb.HTTPWebService.updateHTTPWebWebsocket:output_type -> pb.RPCSuccess
54, // 62: pb.HTTPWebService.updateHTTPWebFastcgi:output_type -> pb.RPCSuccess
54, // 63: pb.HTTPWebService.updateHTTPWebRewriteRules:output_type -> pb.RPCSuccess
54, // 64: pb.HTTPWebService.updateHTTPWebHostRedirects:output_type -> pb.RPCSuccess
27, // 65: pb.HTTPWebService.findHTTPWebHostRedirects:output_type -> pb.FindHTTPWebHostRedirectsResponse
54, // 66: pb.HTTPWebService.updateHTTPWebAuth:output_type -> pb.RPCSuccess
54, // 67: pb.HTTPWebService.updateHTTPWebCommon:output_type -> pb.RPCSuccess
54, // 68: pb.HTTPWebService.updateHTTPWebRequestLimit:output_type -> pb.RPCSuccess
32, // 69: pb.HTTPWebService.findHTTPWebRequestLimit:output_type -> pb.FindHTTPWebRequestLimitResponse
54, // 70: pb.HTTPWebService.updateHTTPWebRequestScripts:output_type -> pb.RPCSuccess
35, // 71: pb.HTTPWebService.findHTTPWebRequestScripts:output_type -> pb.FindHTTPWebRequestScriptsResponse
54, // 72: pb.HTTPWebService.updateHTTPWebUAM:output_type -> pb.RPCSuccess
38, // 73: pb.HTTPWebService.findHTTPWebUAM:output_type -> pb.FindHTTPWebUAMResponse
54, // 74: pb.HTTPWebService.updateHTTPWebCC:output_type -> pb.RPCSuccess
41, // 75: pb.HTTPWebService.findHTTPWebCC:output_type -> pb.FindHTTPWebCCResponse
54, // 76: pb.HTTPWebService.updateHTTPWebReferers:output_type -> pb.RPCSuccess
44, // 77: pb.HTTPWebService.findHTTPWebReferers:output_type -> pb.FindHTTPWebReferersResponse
54, // 78: pb.HTTPWebService.updateHTTPWebUserAgent:output_type -> pb.RPCSuccess
47, // 79: pb.HTTPWebService.findHTTPWebUserAgent:output_type -> pb.FindHTTPWebUserAgentResponse
54, // 80: pb.HTTPWebService.updateHTTPWebHLS:output_type -> pb.RPCSuccess
50, // 81: pb.HTTPWebService.findHTTPWebHLS:output_type -> pb.FindHTTPWebHLSResponse
52, // 82: pb.HTTPWebService.findServerIdWithHTTPWebId:output_type -> pb.FindServerIdWithHTTPWebIdResponse
42, // [42:83] is the sub-list for method output_type
1, // [1:42] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
@@ -3725,6 +4017,66 @@ func file_service_http_web_proto_init() {
return nil
}
}
file_service_http_web_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateHTTPWebHLSRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_http_web_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindHTTPWebHLSRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_http_web_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindHTTPWebHLSResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_http_web_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindServerIdWithHTTPWebIdRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_http_web_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindServerIdWithHTTPWebIdResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -3732,7 +4084,7 @@ func file_service_http_web_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_http_web_proto_rawDesc,
NumEnums: 0,
NumMessages: 48,
NumMessages: 53,
NumExtensions: 0,
NumServices: 1,
},

View File

@@ -57,6 +57,9 @@ const (
HTTPWebService_FindHTTPWebReferers_FullMethodName = "/pb.HTTPWebService/findHTTPWebReferers"
HTTPWebService_UpdateHTTPWebUserAgent_FullMethodName = "/pb.HTTPWebService/updateHTTPWebUserAgent"
HTTPWebService_FindHTTPWebUserAgent_FullMethodName = "/pb.HTTPWebService/findHTTPWebUserAgent"
HTTPWebService_UpdateHTTPWebHLS_FullMethodName = "/pb.HTTPWebService/updateHTTPWebHLS"
HTTPWebService_FindHTTPWebHLS_FullMethodName = "/pb.HTTPWebService/findHTTPWebHLS"
HTTPWebService_FindServerIdWithHTTPWebId_FullMethodName = "/pb.HTTPWebService/findServerIdWithHTTPWebId"
)
// HTTPWebServiceClient is the client API for HTTPWebService service.
@@ -139,6 +142,12 @@ type HTTPWebServiceClient interface {
UpdateHTTPWebUserAgent(ctx context.Context, in *UpdateHTTPWebUserAgentRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查找UserAgent设置
FindHTTPWebUserAgent(ctx context.Context, in *FindHTTPWebUserAgentRequest, opts ...grpc.CallOption) (*FindHTTPWebUserAgentResponse, error)
// 修改HLS设置
UpdateHTTPWebHLS(ctx context.Context, in *UpdateHTTPWebHLSRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查找HLS设置
FindHTTPWebHLS(ctx context.Context, in *FindHTTPWebHLSRequest, opts ...grpc.CallOption) (*FindHTTPWebHLSResponse, error)
// 根据WebId查找ServerId
FindServerIdWithHTTPWebId(ctx context.Context, in *FindServerIdWithHTTPWebIdRequest, opts ...grpc.CallOption) (*FindServerIdWithHTTPWebIdResponse, error)
}
type hTTPWebServiceClient struct {
@@ -491,6 +500,33 @@ func (c *hTTPWebServiceClient) FindHTTPWebUserAgent(ctx context.Context, in *Fin
return out, nil
}
func (c *hTTPWebServiceClient) UpdateHTTPWebHLS(ctx context.Context, in *UpdateHTTPWebHLSRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, HTTPWebService_UpdateHTTPWebHLS_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPWebServiceClient) FindHTTPWebHLS(ctx context.Context, in *FindHTTPWebHLSRequest, opts ...grpc.CallOption) (*FindHTTPWebHLSResponse, error) {
out := new(FindHTTPWebHLSResponse)
err := c.cc.Invoke(ctx, HTTPWebService_FindHTTPWebHLS_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *hTTPWebServiceClient) FindServerIdWithHTTPWebId(ctx context.Context, in *FindServerIdWithHTTPWebIdRequest, opts ...grpc.CallOption) (*FindServerIdWithHTTPWebIdResponse, error) {
out := new(FindServerIdWithHTTPWebIdResponse)
err := c.cc.Invoke(ctx, HTTPWebService_FindServerIdWithHTTPWebId_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HTTPWebServiceServer is the server API for HTTPWebService service.
// All implementations should embed UnimplementedHTTPWebServiceServer
// for forward compatibility
@@ -571,6 +607,12 @@ type HTTPWebServiceServer interface {
UpdateHTTPWebUserAgent(context.Context, *UpdateHTTPWebUserAgentRequest) (*RPCSuccess, error)
// 查找UserAgent设置
FindHTTPWebUserAgent(context.Context, *FindHTTPWebUserAgentRequest) (*FindHTTPWebUserAgentResponse, error)
// 修改HLS设置
UpdateHTTPWebHLS(context.Context, *UpdateHTTPWebHLSRequest) (*RPCSuccess, error)
// 查找HLS设置
FindHTTPWebHLS(context.Context, *FindHTTPWebHLSRequest) (*FindHTTPWebHLSResponse, error)
// 根据WebId查找ServerId
FindServerIdWithHTTPWebId(context.Context, *FindServerIdWithHTTPWebIdRequest) (*FindServerIdWithHTTPWebIdResponse, error)
}
// UnimplementedHTTPWebServiceServer should be embedded to have forward compatible implementations.
@@ -691,6 +733,15 @@ func (UnimplementedHTTPWebServiceServer) UpdateHTTPWebUserAgent(context.Context,
func (UnimplementedHTTPWebServiceServer) FindHTTPWebUserAgent(context.Context, *FindHTTPWebUserAgentRequest) (*FindHTTPWebUserAgentResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindHTTPWebUserAgent not implemented")
}
func (UnimplementedHTTPWebServiceServer) UpdateHTTPWebHLS(context.Context, *UpdateHTTPWebHLSRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateHTTPWebHLS not implemented")
}
func (UnimplementedHTTPWebServiceServer) FindHTTPWebHLS(context.Context, *FindHTTPWebHLSRequest) (*FindHTTPWebHLSResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindHTTPWebHLS not implemented")
}
func (UnimplementedHTTPWebServiceServer) FindServerIdWithHTTPWebId(context.Context, *FindServerIdWithHTTPWebIdRequest) (*FindServerIdWithHTTPWebIdResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindServerIdWithHTTPWebId not implemented")
}
// UnsafeHTTPWebServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HTTPWebServiceServer will
@@ -1387,6 +1438,60 @@ func _HTTPWebService_FindHTTPWebUserAgent_Handler(srv interface{}, ctx context.C
return interceptor(ctx, in, info, handler)
}
func _HTTPWebService_UpdateHTTPWebHLS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateHTTPWebHLSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPWebServiceServer).UpdateHTTPWebHLS(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: HTTPWebService_UpdateHTTPWebHLS_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPWebServiceServer).UpdateHTTPWebHLS(ctx, req.(*UpdateHTTPWebHLSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPWebService_FindHTTPWebHLS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindHTTPWebHLSRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPWebServiceServer).FindHTTPWebHLS(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: HTTPWebService_FindHTTPWebHLS_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPWebServiceServer).FindHTTPWebHLS(ctx, req.(*FindHTTPWebHLSRequest))
}
return interceptor(ctx, in, info, handler)
}
func _HTTPWebService_FindServerIdWithHTTPWebId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindServerIdWithHTTPWebIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HTTPWebServiceServer).FindServerIdWithHTTPWebId(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: HTTPWebService_FindServerIdWithHTTPWebId_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HTTPWebServiceServer).FindServerIdWithHTTPWebId(ctx, req.(*FindServerIdWithHTTPWebIdRequest))
}
return interceptor(ctx, in, info, handler)
}
// HTTPWebService_ServiceDesc is the grpc.ServiceDesc for HTTPWebService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -1546,6 +1651,18 @@ var HTTPWebService_ServiceDesc = grpc.ServiceDesc{
MethodName: "findHTTPWebUserAgent",
Handler: _HTTPWebService_FindHTTPWebUserAgent_Handler,
},
{
MethodName: "updateHTTPWebHLS",
Handler: _HTTPWebService_UpdateHTTPWebHLS_Handler,
},
{
MethodName: "findHTTPWebHLS",
Handler: _HTTPWebService_FindHTTPWebHLS_Handler,
},
{
MethodName: "findServerIdWithHTTPWebId",
Handler: _HTTPWebService_FindServerIdWithHTTPWebId_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_http_web.proto",

File diff suppressed because it is too large Load Diff

View File

@@ -19,20 +19,22 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
IPItemService_CreateIPItem_FullMethodName = "/pb.IPItemService/createIPItem"
IPItemService_CreateIPItems_FullMethodName = "/pb.IPItemService/createIPItems"
IPItemService_UpdateIPItem_FullMethodName = "/pb.IPItemService/updateIPItem"
IPItemService_DeleteIPItem_FullMethodName = "/pb.IPItemService/deleteIPItem"
IPItemService_DeleteIPItems_FullMethodName = "/pb.IPItemService/deleteIPItems"
IPItemService_CountIPItemsWithListId_FullMethodName = "/pb.IPItemService/countIPItemsWithListId"
IPItemService_ListIPItemsWithListId_FullMethodName = "/pb.IPItemService/listIPItemsWithListId"
IPItemService_FindEnabledIPItem_FullMethodName = "/pb.IPItemService/findEnabledIPItem"
IPItemService_ListIPItemsAfterVersion_FullMethodName = "/pb.IPItemService/listIPItemsAfterVersion"
IPItemService_CheckIPItemStatus_FullMethodName = "/pb.IPItemService/checkIPItemStatus"
IPItemService_ExistsEnabledIPItem_FullMethodName = "/pb.IPItemService/existsEnabledIPItem"
IPItemService_CountAllEnabledIPItems_FullMethodName = "/pb.IPItemService/countAllEnabledIPItems"
IPItemService_ListAllEnabledIPItems_FullMethodName = "/pb.IPItemService/listAllEnabledIPItems"
IPItemService_UpdateIPItemsRead_FullMethodName = "/pb.IPItemService/updateIPItemsRead"
IPItemService_CreateIPItem_FullMethodName = "/pb.IPItemService/createIPItem"
IPItemService_CreateIPItems_FullMethodName = "/pb.IPItemService/createIPItems"
IPItemService_UpdateIPItem_FullMethodName = "/pb.IPItemService/updateIPItem"
IPItemService_DeleteIPItem_FullMethodName = "/pb.IPItemService/deleteIPItem"
IPItemService_DeleteIPItems_FullMethodName = "/pb.IPItemService/deleteIPItems"
IPItemService_CountIPItemsWithListId_FullMethodName = "/pb.IPItemService/countIPItemsWithListId"
IPItemService_ListIPItemsWithListId_FullMethodName = "/pb.IPItemService/listIPItemsWithListId"
IPItemService_FindEnabledIPItem_FullMethodName = "/pb.IPItemService/findEnabledIPItem"
IPItemService_ListIPItemsAfterVersion_FullMethodName = "/pb.IPItemService/listIPItemsAfterVersion"
IPItemService_CheckIPItemStatus_FullMethodName = "/pb.IPItemService/checkIPItemStatus"
IPItemService_ExistsEnabledIPItem_FullMethodName = "/pb.IPItemService/existsEnabledIPItem"
IPItemService_CountAllEnabledIPItems_FullMethodName = "/pb.IPItemService/countAllEnabledIPItems"
IPItemService_ListAllEnabledIPItems_FullMethodName = "/pb.IPItemService/listAllEnabledIPItems"
IPItemService_ListAllIPItemIds_FullMethodName = "/pb.IPItemService/listAllIPItemIds"
IPItemService_UpdateIPItemsRead_FullMethodName = "/pb.IPItemService/updateIPItemsRead"
IPItemService_FindServerIdWithIPItemId_FullMethodName = "/pb.IPItemService/findServerIdWithIPItemId"
)
// IPItemServiceClient is the client API for IPItemService service.
@@ -65,8 +67,12 @@ type IPItemServiceClient interface {
CountAllEnabledIPItems(ctx context.Context, in *CountAllEnabledIPItemsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 列出所有名单中的IP
ListAllEnabledIPItems(ctx context.Context, in *ListAllEnabledIPItemsRequest, opts ...grpc.CallOption) (*ListAllEnabledIPItemsResponse, error)
// 列出所有名单中的IP ID
ListAllIPItemIds(ctx context.Context, in *ListAllIPItemIdsRequest, opts ...grpc.CallOption) (*ListAllIPItemIdsResponse, error)
// 设置所有为已读
UpdateIPItemsRead(ctx context.Context, in *UpdateIPItemsReadRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查找IP对应的名单所属网站ID
FindServerIdWithIPItemId(ctx context.Context, in *FindServerIdWithIPItemIdRequest, opts ...grpc.CallOption) (*FindServerIdWithIPItemIdResponse, error)
}
type iPItemServiceClient struct {
@@ -194,6 +200,15 @@ func (c *iPItemServiceClient) ListAllEnabledIPItems(ctx context.Context, in *Lis
return out, nil
}
func (c *iPItemServiceClient) ListAllIPItemIds(ctx context.Context, in *ListAllIPItemIdsRequest, opts ...grpc.CallOption) (*ListAllIPItemIdsResponse, error) {
out := new(ListAllIPItemIdsResponse)
err := c.cc.Invoke(ctx, IPItemService_ListAllIPItemIds_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *iPItemServiceClient) UpdateIPItemsRead(ctx context.Context, in *UpdateIPItemsReadRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, IPItemService_UpdateIPItemsRead_FullMethodName, in, out, opts...)
@@ -203,6 +218,15 @@ func (c *iPItemServiceClient) UpdateIPItemsRead(ctx context.Context, in *UpdateI
return out, nil
}
func (c *iPItemServiceClient) FindServerIdWithIPItemId(ctx context.Context, in *FindServerIdWithIPItemIdRequest, opts ...grpc.CallOption) (*FindServerIdWithIPItemIdResponse, error) {
out := new(FindServerIdWithIPItemIdResponse)
err := c.cc.Invoke(ctx, IPItemService_FindServerIdWithIPItemId_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// IPItemServiceServer is the server API for IPItemService service.
// All implementations should embed UnimplementedIPItemServiceServer
// for forward compatibility
@@ -233,8 +257,12 @@ type IPItemServiceServer interface {
CountAllEnabledIPItems(context.Context, *CountAllEnabledIPItemsRequest) (*RPCCountResponse, error)
// 列出所有名单中的IP
ListAllEnabledIPItems(context.Context, *ListAllEnabledIPItemsRequest) (*ListAllEnabledIPItemsResponse, error)
// 列出所有名单中的IP ID
ListAllIPItemIds(context.Context, *ListAllIPItemIdsRequest) (*ListAllIPItemIdsResponse, error)
// 设置所有为已读
UpdateIPItemsRead(context.Context, *UpdateIPItemsReadRequest) (*RPCSuccess, error)
// 查找IP对应的名单所属网站ID
FindServerIdWithIPItemId(context.Context, *FindServerIdWithIPItemIdRequest) (*FindServerIdWithIPItemIdResponse, error)
}
// UnimplementedIPItemServiceServer should be embedded to have forward compatible implementations.
@@ -280,9 +308,15 @@ func (UnimplementedIPItemServiceServer) CountAllEnabledIPItems(context.Context,
func (UnimplementedIPItemServiceServer) ListAllEnabledIPItems(context.Context, *ListAllEnabledIPItemsRequest) (*ListAllEnabledIPItemsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAllEnabledIPItems not implemented")
}
func (UnimplementedIPItemServiceServer) ListAllIPItemIds(context.Context, *ListAllIPItemIdsRequest) (*ListAllIPItemIdsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAllIPItemIds not implemented")
}
func (UnimplementedIPItemServiceServer) UpdateIPItemsRead(context.Context, *UpdateIPItemsReadRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateIPItemsRead not implemented")
}
func (UnimplementedIPItemServiceServer) FindServerIdWithIPItemId(context.Context, *FindServerIdWithIPItemIdRequest) (*FindServerIdWithIPItemIdResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindServerIdWithIPItemId not implemented")
}
// UnsafeIPItemServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to IPItemServiceServer will
@@ -529,6 +563,24 @@ func _IPItemService_ListAllEnabledIPItems_Handler(srv interface{}, ctx context.C
return interceptor(ctx, in, info, handler)
}
func _IPItemService_ListAllIPItemIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListAllIPItemIdsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IPItemServiceServer).ListAllIPItemIds(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: IPItemService_ListAllIPItemIds_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IPItemServiceServer).ListAllIPItemIds(ctx, req.(*ListAllIPItemIdsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _IPItemService_UpdateIPItemsRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateIPItemsReadRequest)
if err := dec(in); err != nil {
@@ -547,6 +599,24 @@ func _IPItemService_UpdateIPItemsRead_Handler(srv interface{}, ctx context.Conte
return interceptor(ctx, in, info, handler)
}
func _IPItemService_FindServerIdWithIPItemId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindServerIdWithIPItemIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IPItemServiceServer).FindServerIdWithIPItemId(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: IPItemService_FindServerIdWithIPItemId_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IPItemServiceServer).FindServerIdWithIPItemId(ctx, req.(*FindServerIdWithIPItemIdRequest))
}
return interceptor(ctx, in, info, handler)
}
// IPItemService_ServiceDesc is the grpc.ServiceDesc for IPItemService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -606,10 +676,18 @@ var IPItemService_ServiceDesc = grpc.ServiceDesc{
MethodName: "listAllEnabledIPItems",
Handler: _IPItemService_ListAllEnabledIPItems_Handler,
},
{
MethodName: "listAllIPItemIds",
Handler: _IPItemService_ListAllIPItemIds_Handler,
},
{
MethodName: "updateIPItemsRead",
Handler: _IPItemService_UpdateIPItemsRead_Handler,
},
{
MethodName: "findServerIdWithIPItemId",
Handler: _IPItemService_FindServerIdWithIPItemId_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_ip_item.proto",

View File

@@ -775,6 +775,101 @@ func (x *FindEnabledIPListContainsIPResponse) GetIpLists() []*IPList {
return nil
}
// 查找IP名单对应的网站ID
type FindServerIdWithIPListIdRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
IpListId int64 `protobuf:"varint,1,opt,name=ipListId,proto3" json:"ipListId,omitempty"` // IP名单ID
}
func (x *FindServerIdWithIPListIdRequest) Reset() {
*x = FindServerIdWithIPListIdRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ip_list_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindServerIdWithIPListIdRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindServerIdWithIPListIdRequest) ProtoMessage() {}
func (x *FindServerIdWithIPListIdRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_ip_list_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindServerIdWithIPListIdRequest.ProtoReflect.Descriptor instead.
func (*FindServerIdWithIPListIdRequest) Descriptor() ([]byte, []int) {
return file_service_ip_list_proto_rawDescGZIP(), []int{13}
}
func (x *FindServerIdWithIPListIdRequest) GetIpListId() int64 {
if x != nil {
return x.IpListId
}
return 0
}
type FindServerIdWithIPListIdResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` // 网站ID如果是公共IP名单则对应的网站ID为0
}
func (x *FindServerIdWithIPListIdResponse) Reset() {
*x = FindServerIdWithIPListIdResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ip_list_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindServerIdWithIPListIdResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindServerIdWithIPListIdResponse) ProtoMessage() {}
func (x *FindServerIdWithIPListIdResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_ip_list_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindServerIdWithIPListIdResponse.ProtoReflect.Descriptor instead.
func (*FindServerIdWithIPListIdResponse) Descriptor() ([]byte, []int) {
return file_service_ip_list_proto_rawDescGZIP(), []int{14}
}
func (x *FindServerIdWithIPListIdResponse) GetServerId() int64 {
if x != nil {
return x.ServerId
}
return 0
}
var File_service_ip_list_proto protoreflect.FileDescriptor
var file_service_ip_list_proto_rawDesc = []byte{
@@ -857,48 +952,63 @@ var file_service_ip_list_proto_rawDesc = []byte{
0x74, 0x61, 0x69, 0x6e, 0x73, 0x49, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x24, 0x0a, 0x07, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x07, 0x69, 0x70,
0x4c, 0x69, 0x73, 0x74, 0x73, 0x32, 0x86, 0x05, 0x0a, 0x0d, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69,
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x16, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12,
0x21, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 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, 0x53, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1d,
0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49,
0x50, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x73, 0x22, 0x3d, 0x0a, 0x1f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72,
0x76, 0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x70, 0x4c, 0x69,
0x73, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x70, 0x4c, 0x69,
0x73, 0x74, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x20, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x49, 0x64, 0x32, 0xed, 0x05, 0x0a, 0x0d, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65,
0x73, 0x73, 0x12, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e,
0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x16, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x21,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 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, 0x53, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1d, 0x2e,
0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50,
0x4c, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a,
0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e,
0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53,
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x13, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e,
0x70, 0x62, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,
0x70, 0x62, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e,
0x0a, 0x1b, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c,
0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x49, 0x50, 0x12, 0x26, 0x2e,
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50,
0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x49, 0x50, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x73, 0x49, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x4c, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70,
0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c,
0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c,
0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x70,
0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x56, 0x0a, 0x13, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x70,
0x62, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49,
0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70,
0x62, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49,
0x50, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a,
0x1b, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69,
0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x49, 0x50, 0x12, 0x26, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c,
0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x49, 0x50, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x73, 0x49, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a,
0x18, 0x66, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74,
0x68, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x12, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x49,
0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64,
0x57, 0x69, 0x74, 0x68, 0x49, 0x50, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -913,7 +1023,7 @@ func file_service_ip_list_proto_rawDescGZIP() []byte {
return file_service_ip_list_proto_rawDescData
}
var file_service_ip_list_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_service_ip_list_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_service_ip_list_proto_goTypes = []interface{}{
(*CreateIPListRequest)(nil), // 0: pb.CreateIPListRequest
(*CreateIPListResponse)(nil), // 1: pb.CreateIPListResponse
@@ -928,14 +1038,16 @@ var file_service_ip_list_proto_goTypes = []interface{}{
(*ExistsEnabledIPListResponse)(nil), // 10: pb.ExistsEnabledIPListResponse
(*FindEnabledIPListContainsIPRequest)(nil), // 11: pb.FindEnabledIPListContainsIPRequest
(*FindEnabledIPListContainsIPResponse)(nil), // 12: pb.FindEnabledIPListContainsIPResponse
(*IPList)(nil), // 13: pb.IPList
(*RPCSuccess)(nil), // 14: pb.RPCSuccess
(*RPCCountResponse)(nil), // 15: pb.RPCCountResponse
(*FindServerIdWithIPListIdRequest)(nil), // 13: pb.FindServerIdWithIPListIdRequest
(*FindServerIdWithIPListIdResponse)(nil), // 14: pb.FindServerIdWithIPListIdResponse
(*IPList)(nil), // 15: pb.IPList
(*RPCSuccess)(nil), // 16: pb.RPCSuccess
(*RPCCountResponse)(nil), // 17: pb.RPCCountResponse
}
var file_service_ip_list_proto_depIdxs = []int32{
13, // 0: pb.FindEnabledIPListResponse.ipList:type_name -> pb.IPList
13, // 1: pb.ListEnabledIPListsResponse.ipLists:type_name -> pb.IPList
13, // 2: pb.FindEnabledIPListContainsIPResponse.ipLists:type_name -> pb.IPList
15, // 0: pb.FindEnabledIPListResponse.ipList:type_name -> pb.IPList
15, // 1: pb.ListEnabledIPListsResponse.ipLists:type_name -> pb.IPList
15, // 2: pb.FindEnabledIPListContainsIPResponse.ipLists:type_name -> pb.IPList
0, // 3: pb.IPListService.createIPList:input_type -> pb.CreateIPListRequest
2, // 4: pb.IPListService.updateIPList:input_type -> pb.UpdateIPListRequest
3, // 5: pb.IPListService.findEnabledIPList:input_type -> pb.FindEnabledIPListRequest
@@ -944,16 +1056,18 @@ var file_service_ip_list_proto_depIdxs = []int32{
8, // 8: pb.IPListService.deleteIPList:input_type -> pb.DeleteIPListRequest
9, // 9: pb.IPListService.existsEnabledIPList:input_type -> pb.ExistsEnabledIPListRequest
11, // 10: pb.IPListService.findEnabledIPListContainsIP:input_type -> pb.FindEnabledIPListContainsIPRequest
1, // 11: pb.IPListService.createIPList:output_type -> pb.CreateIPListResponse
14, // 12: pb.IPListService.updateIPList:output_type -> pb.RPCSuccess
4, // 13: pb.IPListService.findEnabledIPList:output_type -> pb.FindEnabledIPListResponse
15, // 14: pb.IPListService.countAllEnabledIPLists:output_type -> pb.RPCCountResponse
7, // 15: pb.IPListService.listEnabledIPLists:output_type -> pb.ListEnabledIPListsResponse
14, // 16: pb.IPListService.deleteIPList:output_type -> pb.RPCSuccess
10, // 17: pb.IPListService.existsEnabledIPList:output_type -> pb.ExistsEnabledIPListResponse
12, // 18: pb.IPListService.findEnabledIPListContainsIP:output_type -> pb.FindEnabledIPListContainsIPResponse
11, // [11:19] is the sub-list for method output_type
3, // [3:11] is the sub-list for method input_type
13, // 11: pb.IPListService.findServerIdWithIPListId:input_type -> pb.FindServerIdWithIPListIdRequest
1, // 12: pb.IPListService.createIPList:output_type -> pb.CreateIPListResponse
16, // 13: pb.IPListService.updateIPList:output_type -> pb.RPCSuccess
4, // 14: pb.IPListService.findEnabledIPList:output_type -> pb.FindEnabledIPListResponse
17, // 15: pb.IPListService.countAllEnabledIPLists:output_type -> pb.RPCCountResponse
7, // 16: pb.IPListService.listEnabledIPLists:output_type -> pb.ListEnabledIPListsResponse
16, // 17: pb.IPListService.deleteIPList:output_type -> pb.RPCSuccess
10, // 18: pb.IPListService.existsEnabledIPList:output_type -> pb.ExistsEnabledIPListResponse
12, // 19: pb.IPListService.findEnabledIPListContainsIP:output_type -> pb.FindEnabledIPListContainsIPResponse
14, // 20: pb.IPListService.findServerIdWithIPListId:output_type -> pb.FindServerIdWithIPListIdResponse
12, // [12:21] is the sub-list for method output_type
3, // [3:12] 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
@@ -1123,6 +1237,30 @@ func file_service_ip_list_proto_init() {
return nil
}
}
file_service_ip_list_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindServerIdWithIPListIdRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_ip_list_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindServerIdWithIPListIdResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -1130,7 +1268,7 @@ func file_service_ip_list_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_ip_list_proto_rawDesc,
NumEnums: 0,
NumMessages: 13,
NumMessages: 15,
NumExtensions: 0,
NumServices: 1,
},

View File

@@ -27,6 +27,7 @@ const (
IPListService_DeleteIPList_FullMethodName = "/pb.IPListService/deleteIPList"
IPListService_ExistsEnabledIPList_FullMethodName = "/pb.IPListService/existsEnabledIPList"
IPListService_FindEnabledIPListContainsIP_FullMethodName = "/pb.IPListService/findEnabledIPListContainsIP"
IPListService_FindServerIdWithIPListId_FullMethodName = "/pb.IPListService/findServerIdWithIPListId"
)
// IPListServiceClient is the client API for IPListService service.
@@ -49,6 +50,8 @@ type IPListServiceClient interface {
ExistsEnabledIPList(ctx context.Context, in *ExistsEnabledIPListRequest, opts ...grpc.CallOption) (*ExistsEnabledIPListResponse, error)
// 根据IP来搜索IP名单
FindEnabledIPListContainsIP(ctx context.Context, in *FindEnabledIPListContainsIPRequest, opts ...grpc.CallOption) (*FindEnabledIPListContainsIPResponse, error)
// 查找IP名单对应的网站ID
FindServerIdWithIPListId(ctx context.Context, in *FindServerIdWithIPListIdRequest, opts ...grpc.CallOption) (*FindServerIdWithIPListIdResponse, error)
}
type iPListServiceClient struct {
@@ -131,6 +134,15 @@ func (c *iPListServiceClient) FindEnabledIPListContainsIP(ctx context.Context, i
return out, nil
}
func (c *iPListServiceClient) FindServerIdWithIPListId(ctx context.Context, in *FindServerIdWithIPListIdRequest, opts ...grpc.CallOption) (*FindServerIdWithIPListIdResponse, error) {
out := new(FindServerIdWithIPListIdResponse)
err := c.cc.Invoke(ctx, IPListService_FindServerIdWithIPListId_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// IPListServiceServer is the server API for IPListService service.
// All implementations should embed UnimplementedIPListServiceServer
// for forward compatibility
@@ -151,6 +163,8 @@ type IPListServiceServer interface {
ExistsEnabledIPList(context.Context, *ExistsEnabledIPListRequest) (*ExistsEnabledIPListResponse, error)
// 根据IP来搜索IP名单
FindEnabledIPListContainsIP(context.Context, *FindEnabledIPListContainsIPRequest) (*FindEnabledIPListContainsIPResponse, error)
// 查找IP名单对应的网站ID
FindServerIdWithIPListId(context.Context, *FindServerIdWithIPListIdRequest) (*FindServerIdWithIPListIdResponse, error)
}
// UnimplementedIPListServiceServer should be embedded to have forward compatible implementations.
@@ -181,6 +195,9 @@ func (UnimplementedIPListServiceServer) ExistsEnabledIPList(context.Context, *Ex
func (UnimplementedIPListServiceServer) FindEnabledIPListContainsIP(context.Context, *FindEnabledIPListContainsIPRequest) (*FindEnabledIPListContainsIPResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledIPListContainsIP not implemented")
}
func (UnimplementedIPListServiceServer) FindServerIdWithIPListId(context.Context, *FindServerIdWithIPListIdRequest) (*FindServerIdWithIPListIdResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindServerIdWithIPListId not implemented")
}
// UnsafeIPListServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to IPListServiceServer will
@@ -337,6 +354,24 @@ func _IPListService_FindEnabledIPListContainsIP_Handler(srv interface{}, ctx con
return interceptor(ctx, in, info, handler)
}
func _IPListService_FindServerIdWithIPListId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindServerIdWithIPListIdRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IPListServiceServer).FindServerIdWithIPListId(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: IPListService_FindServerIdWithIPListId_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IPListServiceServer).FindServerIdWithIPListId(ctx, req.(*FindServerIdWithIPListIdRequest))
}
return interceptor(ctx, in, info, handler)
}
// IPListService_ServiceDesc is the grpc.ServiceDesc for IPListService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -376,6 +411,10 @@ var IPListService_ServiceDesc = grpc.ServiceDesc{
MethodName: "findEnabledIPListContainsIP",
Handler: _IPListService_FindEnabledIPListContainsIP_Handler,
},
{
MethodName: "findServerIdWithIPListId",
Handler: _IPListService_FindServerIdWithIPListId_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_ip_list.proto",

View File

@@ -26,13 +26,14 @@ type UploadMetricStatsRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"`
Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
Count int64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
Total float32 `protobuf:"fixed32,4,opt,name=total,proto3" json:"total,omitempty"`
Version int32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
ItemId int64 `protobuf:"varint,6,opt,name=itemId,proto3" json:"itemId,omitempty"`
MetricStats []*UploadingMetricStat `protobuf:"bytes,7,rep,name=metricStats,proto3" json:"metricStats,omitempty"`
ServerId int64 `protobuf:"varint,1,opt,name=serverId,proto3" json:"serverId,omitempty"` // 网站ID
Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` // 时间
Count int64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` // 数量
Total float32 `protobuf:"fixed32,4,opt,name=total,proto3" json:"total,omitempty"` // 总数
Version int32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` // 版本号
ItemId int64 `protobuf:"varint,6,opt,name=itemId,proto3" json:"itemId,omitempty"` // 指标ID
MetricStats []*UploadingMetricStat `protobuf:"bytes,7,rep,name=metricStats,proto3" json:"metricStats,omitempty"` // 指标统计数据
KeepKeys []string `protobuf:"bytes,8,rep,name=keepKeys,proto3" json:"keepKeys,omitempty"` // 需要保留的指标值
}
func (x *UploadMetricStatsRequest) Reset() {
@@ -116,6 +117,13 @@ func (x *UploadMetricStatsRequest) GetMetricStats() []*UploadingMetricStat {
return nil
}
func (x *UploadMetricStatsRequest) GetKeepKeys() []string {
if x != nil {
return x.KeepKeys
}
return nil
}
// 计算指标数据数量
type CountMetricStatsRequest struct {
state protoimpl.MessageState
@@ -283,7 +291,7 @@ var file_service_metric_stat_proto_rawDesc = []byte{
0x1e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6d, 0x65,
0x74, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 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, 0xe3, 0x01, 0x0a, 0x18, 0x55,
0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x01, 0x0a, 0x18, 0x55,
0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65,
@@ -298,38 +306,39 @@ var file_service_metric_stat_proto_rawDesc = []byte{
0x74, 0x61, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53,
0x74, 0x61, 0x74, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73,
0x22, 0x3d, 0x0a, 0x17, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53,
0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6d,
0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x22,
0x68, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61,
0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a,
0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f,
0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x4b, 0x0a, 0x17, 0x4c, 0x69, 0x73,
0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74,
0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x4d,
0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x32, 0xe9, 0x01, 0x0a, 0x11, 0x4d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x53, 0x74, 0x61, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x11,
0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74,
0x73, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 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,
0x45, 0x0a, 0x10, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74,
0x61, 0x74, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65,
0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 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, 0x4a, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x4d, 0x65,
0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4c,
0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x65, 0x70, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x08, 0x20, 0x03,
0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x3d, 0x0a, 0x17,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d,
0x65, 0x74, 0x72, 0x69, 0x63, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x22, 0x68, 0x0a, 0x16, 0x4c,
0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d,
0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x49,
0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66,
0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65,
0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x4b, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x30, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x53, 0x74, 0x61, 0x74, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61,
0x74, 0x73, 0x32, 0xe9, 0x01, 0x0a, 0x11, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x11, 0x75, 0x70, 0x6c, 0x6f,
0x61, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1c, 0x2e,
0x70, 0x62, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53,
0x74, 0x61, 0x74, 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, 0x45, 0x0a, 0x10, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12,
0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63,
0x53, 0x74, 0x61, 0x74, 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, 0x4a, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63,
0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d,
0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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

File diff suppressed because it is too large Load Diff

View File

@@ -83,6 +83,8 @@ const (
NodeService_CopyNodeActionsToNodeCluster_FullMethodName = "/pb.NodeService/copyNodeActionsToNodeCluster"
NodeService_FindNodeTOAConfig_FullMethodName = "/pb.NodeService/findNodeTOAConfig"
NodeService_FindNodeNetworkSecurityPolicy_FullMethodName = "/pb.NodeService/findNodeNetworkSecurityPolicy"
NodeService_FindNodeWebPPolicies_FullMethodName = "/pb.NodeService/findNodeWebPPolicies"
NodeService_UpdateNodeIsOn_FullMethodName = "/pb.NodeService/updateNodeIsOn"
)
// NodeServiceClient is the client API for NodeService service.
@@ -217,6 +219,10 @@ type NodeServiceClient interface {
FindNodeTOAConfig(ctx context.Context, in *FindNodeTOAConfigRequest, opts ...grpc.CallOption) (*FindNodeTOAConfigResponse, error)
// 查找节点的网络安全策略
FindNodeNetworkSecurityPolicy(ctx context.Context, in *FindNodeNetworkSecurityPolicyRequest, opts ...grpc.CallOption) (*FindNodeNetworkSecurityPolicyResponse, error)
// 查找节点的WebP策略
FindNodeWebPPolicies(ctx context.Context, in *FindNodeWebPPoliciesRequest, opts ...grpc.CallOption) (*FindNodeWebPPoliciesResponse, error)
// 修改节点的启用状态
UpdateNodeIsOn(ctx context.Context, in *UpdateNodeIsOnRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type nodeServiceClient struct {
@@ -825,6 +831,24 @@ func (c *nodeServiceClient) FindNodeNetworkSecurityPolicy(ctx context.Context, i
return out, nil
}
func (c *nodeServiceClient) FindNodeWebPPolicies(ctx context.Context, in *FindNodeWebPPoliciesRequest, opts ...grpc.CallOption) (*FindNodeWebPPoliciesResponse, error) {
out := new(FindNodeWebPPoliciesResponse)
err := c.cc.Invoke(ctx, NodeService_FindNodeWebPPolicies_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeServiceClient) UpdateNodeIsOn(ctx context.Context, in *UpdateNodeIsOnRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, NodeService_UpdateNodeIsOn_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NodeServiceServer is the server API for NodeService service.
// All implementations should embed UnimplementedNodeServiceServer
// for forward compatibility
@@ -957,6 +981,10 @@ type NodeServiceServer interface {
FindNodeTOAConfig(context.Context, *FindNodeTOAConfigRequest) (*FindNodeTOAConfigResponse, error)
// 查找节点的网络安全策略
FindNodeNetworkSecurityPolicy(context.Context, *FindNodeNetworkSecurityPolicyRequest) (*FindNodeNetworkSecurityPolicyResponse, error)
// 查找节点的WebP策略
FindNodeWebPPolicies(context.Context, *FindNodeWebPPoliciesRequest) (*FindNodeWebPPoliciesResponse, error)
// 修改节点的启用状态
UpdateNodeIsOn(context.Context, *UpdateNodeIsOnRequest) (*RPCSuccess, error)
}
// UnimplementedNodeServiceServer should be embedded to have forward compatible implementations.
@@ -1155,6 +1183,12 @@ func (UnimplementedNodeServiceServer) FindNodeTOAConfig(context.Context, *FindNo
func (UnimplementedNodeServiceServer) FindNodeNetworkSecurityPolicy(context.Context, *FindNodeNetworkSecurityPolicyRequest) (*FindNodeNetworkSecurityPolicyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindNodeNetworkSecurityPolicy not implemented")
}
func (UnimplementedNodeServiceServer) FindNodeWebPPolicies(context.Context, *FindNodeWebPPoliciesRequest) (*FindNodeWebPPoliciesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindNodeWebPPolicies not implemented")
}
func (UnimplementedNodeServiceServer) UpdateNodeIsOn(context.Context, *UpdateNodeIsOnRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateNodeIsOn not implemented")
}
// UnsafeNodeServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NodeServiceServer will
@@ -2327,6 +2361,42 @@ func _NodeService_FindNodeNetworkSecurityPolicy_Handler(srv interface{}, ctx con
return interceptor(ctx, in, info, handler)
}
func _NodeService_FindNodeWebPPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindNodeWebPPoliciesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeServiceServer).FindNodeWebPPolicies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NodeService_FindNodeWebPPolicies_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServiceServer).FindNodeWebPPolicies(ctx, req.(*FindNodeWebPPoliciesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NodeService_UpdateNodeIsOn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateNodeIsOnRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeServiceServer).UpdateNodeIsOn(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: NodeService_UpdateNodeIsOn_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServiceServer).UpdateNodeIsOn(ctx, req.(*UpdateNodeIsOnRequest))
}
return interceptor(ctx, in, info, handler)
}
// NodeService_ServiceDesc is the grpc.ServiceDesc for NodeService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -2586,6 +2656,14 @@ var NodeService_ServiceDesc = grpc.ServiceDesc{
MethodName: "findNodeNetworkSecurityPolicy",
Handler: _NodeService_FindNodeNetworkSecurityPolicy_Handler,
},
{
MethodName: "findNodeWebPPolicies",
Handler: _NodeService_FindNodeWebPPolicies_Handler,
},
{
MethodName: "updateNodeIsOn",
Handler: _NodeService_UpdateNodeIsOn_Handler,
},
},
Streams: []grpc.StreamDesc{
{

View File

@@ -31,7 +31,7 @@ type CreateOriginRequest struct {
OssJSON []byte `protobuf:"bytes,15,opt,name=ossJSON,proto3" json:"ossJSON,omitempty"` // OSS配置信息源站网络地址中protocol为oss:开头时需要设置此项
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // 描述,为可选项
Weight int32 `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty"` // 权重不小于0一般设置为10
IsOn bool `protobuf:"varint,5,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
IsOn bool `protobuf:"varint,5,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用一般为true
ConnTimeoutJSON []byte `protobuf:"bytes,6,opt,name=connTimeoutJSON,proto3" json:"connTimeoutJSON,omitempty"` // 可选项,连接超时时间
ReadTimeoutJSON []byte `protobuf:"bytes,7,opt,name=readTimeoutJSON,proto3" json:"readTimeoutJSON,omitempty"` // 可选项,读取超时时间
IdleTimeoutJSON []byte `protobuf:"bytes,8,opt,name=idleTimeoutJSON,proto3" json:"idleTimeoutJSON,omitempty"` // 可选项,空闲超时时间
@@ -417,7 +417,7 @@ type FindEnabledOriginRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OriginId int64 `protobuf:"varint,1,opt,name=originId,proto3" json:"originId,omitempty"`
OriginId int64 `protobuf:"varint,1,opt,name=originId,proto3" json:"originId,omitempty"` // 源站ID
}
func (x *FindEnabledOriginRequest) Reset() {
@@ -464,7 +464,7 @@ type FindEnabledOriginResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Origin *Origin `protobuf:"bytes,1,opt,name=Origin,proto3" json:"Origin,omitempty"`
Origin *Origin `protobuf:"bytes,1,opt,name=Origin,proto3" json:"Origin,omitempty"` // 源站信息
}
func (x *FindEnabledOriginResponse) Reset() {
@@ -512,7 +512,7 @@ type FindEnabledOriginConfigRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OriginId int64 `protobuf:"varint,1,opt,name=originId,proto3" json:"originId,omitempty"`
OriginId int64 `protobuf:"varint,1,opt,name=originId,proto3" json:"originId,omitempty"` // 源站ID
}
func (x *FindEnabledOriginConfigRequest) Reset() {
@@ -559,7 +559,7 @@ type FindEnabledOriginConfigResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OriginJSON []byte `protobuf:"bytes,1,opt,name=originJSON,proto3" json:"originJSON,omitempty"`
OriginJSON []byte `protobuf:"bytes,1,opt,name=originJSON,proto3" json:"originJSON,omitempty"` // 源站信息
}
func (x *FindEnabledOriginConfigResponse) Reset() {
@@ -601,6 +601,62 @@ func (x *FindEnabledOriginConfigResponse) GetOriginJSON() []byte {
return nil
}
// 设置源站是否启用
type UpdateOriginIsOnRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OriginId int64 `protobuf:"varint,1,opt,name=originId,proto3" json:"originId,omitempty"` // 源站ID
IsOn bool `protobuf:"varint,2,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
}
func (x *UpdateOriginIsOnRequest) Reset() {
*x = UpdateOriginIsOnRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_origin_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateOriginIsOnRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateOriginIsOnRequest) ProtoMessage() {}
func (x *UpdateOriginIsOnRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_origin_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateOriginIsOnRequest.ProtoReflect.Descriptor instead.
func (*UpdateOriginIsOnRequest) Descriptor() ([]byte, []int) {
return file_service_origin_proto_rawDescGZIP(), []int{7}
}
func (x *UpdateOriginIsOnRequest) GetOriginId() int64 {
if x != nil {
return x.OriginId
}
return 0
}
func (x *UpdateOriginIsOnRequest) GetIsOn() bool {
if x != nil {
return x.IsOn
}
return false
}
var File_service_origin_proto protoreflect.FileDescriptor
var file_service_origin_proto_rawDesc = []byte{
@@ -697,28 +753,37 @@ var file_service_origin_proto_rawDesc = []byte{
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x72,
0x69, 0x67, 0x69, 0x6e, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a,
0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4a, 0x53, 0x4f, 0x4e, 0x32, 0xc1, 0x02, 0x0a, 0x0d, 0x4f,
0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x17, 0x2e, 0x70,
0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x37, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12,
0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69,
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, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x1c, 0x2e,
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72,
0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67,
0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69,
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45,
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x49, 0x0a, 0x17, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x73, 0x4f, 0x6e, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49,
0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
0x04, 0x69, 0x73, 0x4f, 0x6e, 0x32, 0x82, 0x03, 0x0a, 0x0d, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67,
0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 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, 0x50, 0x0a, 0x11, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x17, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x12, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49, 0x73, 0x4f, 0x6e, 0x12, 0x1b, 0x2e,
0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x49,
0x73, 0x4f, 0x6e, 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 (
@@ -733,7 +798,7 @@ func file_service_origin_proto_rawDescGZIP() []byte {
return file_service_origin_proto_rawDescData
}
var file_service_origin_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_service_origin_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_service_origin_proto_goTypes = []interface{}{
(*CreateOriginRequest)(nil), // 0: pb.CreateOriginRequest
(*CreateOriginResponse)(nil), // 1: pb.CreateOriginResponse
@@ -742,27 +807,30 @@ var file_service_origin_proto_goTypes = []interface{}{
(*FindEnabledOriginResponse)(nil), // 4: pb.FindEnabledOriginResponse
(*FindEnabledOriginConfigRequest)(nil), // 5: pb.FindEnabledOriginConfigRequest
(*FindEnabledOriginConfigResponse)(nil), // 6: pb.FindEnabledOriginConfigResponse
(*NetworkAddress)(nil), // 7: pb.NetworkAddress
(*Origin)(nil), // 8: pb.Origin
(*RPCSuccess)(nil), // 9: pb.RPCSuccess
(*UpdateOriginIsOnRequest)(nil), // 7: pb.UpdateOriginIsOnRequest
(*NetworkAddress)(nil), // 8: pb.NetworkAddress
(*Origin)(nil), // 9: pb.Origin
(*RPCSuccess)(nil), // 10: pb.RPCSuccess
}
var file_service_origin_proto_depIdxs = []int32{
7, // 0: pb.CreateOriginRequest.addr:type_name -> pb.NetworkAddress
7, // 1: pb.UpdateOriginRequest.addr:type_name -> pb.NetworkAddress
8, // 2: pb.FindEnabledOriginResponse.Origin:type_name -> pb.Origin
0, // 3: pb.OriginService.createOrigin:input_type -> pb.CreateOriginRequest
2, // 4: pb.OriginService.updateOrigin:input_type -> pb.UpdateOriginRequest
3, // 5: pb.OriginService.findEnabledOrigin:input_type -> pb.FindEnabledOriginRequest
5, // 6: pb.OriginService.findEnabledOriginConfig:input_type -> pb.FindEnabledOriginConfigRequest
1, // 7: pb.OriginService.createOrigin:output_type -> pb.CreateOriginResponse
9, // 8: pb.OriginService.updateOrigin:output_type -> pb.RPCSuccess
4, // 9: pb.OriginService.findEnabledOrigin:output_type -> pb.FindEnabledOriginResponse
6, // 10: pb.OriginService.findEnabledOriginConfig:output_type -> pb.FindEnabledOriginConfigResponse
7, // [7:11] is the sub-list for method output_type
3, // [3:7] 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
8, // 0: pb.CreateOriginRequest.addr:type_name -> pb.NetworkAddress
8, // 1: pb.UpdateOriginRequest.addr:type_name -> pb.NetworkAddress
9, // 2: pb.FindEnabledOriginResponse.Origin:type_name -> pb.Origin
0, // 3: pb.OriginService.createOrigin:input_type -> pb.CreateOriginRequest
2, // 4: pb.OriginService.updateOrigin:input_type -> pb.UpdateOriginRequest
3, // 5: pb.OriginService.findEnabledOrigin:input_type -> pb.FindEnabledOriginRequest
5, // 6: pb.OriginService.findEnabledOriginConfig:input_type -> pb.FindEnabledOriginConfigRequest
7, // 7: pb.OriginService.updateOriginIsOn:input_type -> pb.UpdateOriginIsOnRequest
1, // 8: pb.OriginService.createOrigin:output_type -> pb.CreateOriginResponse
10, // 9: pb.OriginService.updateOrigin:output_type -> pb.RPCSuccess
4, // 10: pb.OriginService.findEnabledOrigin:output_type -> pb.FindEnabledOriginResponse
6, // 11: pb.OriginService.findEnabledOriginConfig:output_type -> pb.FindEnabledOriginConfigResponse
10, // 12: pb.OriginService.updateOriginIsOn:output_type -> pb.RPCSuccess
8, // [8:13] is the sub-list for method output_type
3, // [3:8] 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
}
func init() { file_service_origin_proto_init() }
@@ -858,6 +926,18 @@ func file_service_origin_proto_init() {
return nil
}
}
file_service_origin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateOriginIsOnRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -865,7 +945,7 @@ func file_service_origin_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_origin_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},

View File

@@ -23,6 +23,7 @@ const (
OriginService_UpdateOrigin_FullMethodName = "/pb.OriginService/updateOrigin"
OriginService_FindEnabledOrigin_FullMethodName = "/pb.OriginService/findEnabledOrigin"
OriginService_FindEnabledOriginConfig_FullMethodName = "/pb.OriginService/findEnabledOriginConfig"
OriginService_UpdateOriginIsOn_FullMethodName = "/pb.OriginService/updateOriginIsOn"
)
// OriginServiceClient is the client API for OriginService service.
@@ -37,6 +38,8 @@ type OriginServiceClient interface {
FindEnabledOrigin(ctx context.Context, in *FindEnabledOriginRequest, opts ...grpc.CallOption) (*FindEnabledOriginResponse, error)
// 查找源站配置
FindEnabledOriginConfig(ctx context.Context, in *FindEnabledOriginConfigRequest, opts ...grpc.CallOption) (*FindEnabledOriginConfigResponse, error)
// 设置源站是否启用
UpdateOriginIsOn(ctx context.Context, in *UpdateOriginIsOnRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type originServiceClient struct {
@@ -83,6 +86,15 @@ func (c *originServiceClient) FindEnabledOriginConfig(ctx context.Context, in *F
return out, nil
}
func (c *originServiceClient) UpdateOriginIsOn(ctx context.Context, in *UpdateOriginIsOnRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, OriginService_UpdateOriginIsOn_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OriginServiceServer is the server API for OriginService service.
// All implementations should embed UnimplementedOriginServiceServer
// for forward compatibility
@@ -95,6 +107,8 @@ type OriginServiceServer interface {
FindEnabledOrigin(context.Context, *FindEnabledOriginRequest) (*FindEnabledOriginResponse, error)
// 查找源站配置
FindEnabledOriginConfig(context.Context, *FindEnabledOriginConfigRequest) (*FindEnabledOriginConfigResponse, error)
// 设置源站是否启用
UpdateOriginIsOn(context.Context, *UpdateOriginIsOnRequest) (*RPCSuccess, error)
}
// UnimplementedOriginServiceServer should be embedded to have forward compatible implementations.
@@ -113,6 +127,9 @@ func (UnimplementedOriginServiceServer) FindEnabledOrigin(context.Context, *Find
func (UnimplementedOriginServiceServer) FindEnabledOriginConfig(context.Context, *FindEnabledOriginConfigRequest) (*FindEnabledOriginConfigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledOriginConfig not implemented")
}
func (UnimplementedOriginServiceServer) UpdateOriginIsOn(context.Context, *UpdateOriginIsOnRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateOriginIsOn not implemented")
}
// UnsafeOriginServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to OriginServiceServer will
@@ -197,6 +214,24 @@ func _OriginService_FindEnabledOriginConfig_Handler(srv interface{}, ctx context
return interceptor(ctx, in, info, handler)
}
func _OriginService_UpdateOriginIsOn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateOriginIsOnRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OriginServiceServer).UpdateOriginIsOn(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: OriginService_UpdateOriginIsOn_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OriginServiceServer).UpdateOriginIsOn(ctx, req.(*UpdateOriginIsOnRequest))
}
return interceptor(ctx, in, info, handler)
}
// OriginService_ServiceDesc is the grpc.ServiceDesc for OriginService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -220,6 +255,10 @@ var OriginService_ServiceDesc = grpc.ServiceDesc{
MethodName: "findEnabledOriginConfig",
Handler: _OriginService_FindEnabledOriginConfig_Handler,
},
{
MethodName: "updateOriginIsOn",
Handler: _OriginService_UpdateOriginIsOn_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_origin.proto",

File diff suppressed because it is too large Load Diff

View File

@@ -19,13 +19,16 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
PlanService_CreatePlan_FullMethodName = "/pb.PlanService/createPlan"
PlanService_UpdatePlan_FullMethodName = "/pb.PlanService/updatePlan"
PlanService_DeletePlan_FullMethodName = "/pb.PlanService/deletePlan"
PlanService_FindEnabledPlan_FullMethodName = "/pb.PlanService/findEnabledPlan"
PlanService_CountAllEnabledPlans_FullMethodName = "/pb.PlanService/countAllEnabledPlans"
PlanService_ListEnabledPlans_FullMethodName = "/pb.PlanService/listEnabledPlans"
PlanService_SortPlans_FullMethodName = "/pb.PlanService/sortPlans"
PlanService_CreatePlan_FullMethodName = "/pb.PlanService/createPlan"
PlanService_UpdatePlan_FullMethodName = "/pb.PlanService/updatePlan"
PlanService_DeletePlan_FullMethodName = "/pb.PlanService/deletePlan"
PlanService_FindEnabledPlan_FullMethodName = "/pb.PlanService/findEnabledPlan"
PlanService_FindBasicPlan_FullMethodName = "/pb.PlanService/findBasicPlan"
PlanService_CountAllEnabledPlans_FullMethodName = "/pb.PlanService/countAllEnabledPlans"
PlanService_ListEnabledPlans_FullMethodName = "/pb.PlanService/listEnabledPlans"
PlanService_FindAllAvailablePlans_FullMethodName = "/pb.PlanService/findAllAvailablePlans"
PlanService_FindAllAvailableBasicPlans_FullMethodName = "/pb.PlanService/findAllAvailableBasicPlans"
PlanService_SortPlans_FullMethodName = "/pb.PlanService/sortPlans"
)
// PlanServiceClient is the client API for PlanService service.
@@ -40,10 +43,16 @@ type PlanServiceClient interface {
DeletePlan(ctx context.Context, in *DeletePlanRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 查找单个套餐
FindEnabledPlan(ctx context.Context, in *FindEnabledPlanRequest, opts ...grpc.CallOption) (*FindEnabledPlanResponse, error)
// 查找套餐基本信息
FindBasicPlan(ctx context.Context, in *FindBasicPlanRequest, opts ...grpc.CallOption) (*FindBasicPlanResponse, error)
// 计算套餐数量
CountAllEnabledPlans(ctx context.Context, in *CountAllEnabledPlansRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 列出单页套餐
ListEnabledPlans(ctx context.Context, in *ListEnabledPlansRequest, opts ...grpc.CallOption) (*ListEnabledPlansResponse, error)
// 列出所有可用的套餐
FindAllAvailablePlans(ctx context.Context, in *FindAllAvailablePlansRequest, opts ...grpc.CallOption) (*FindAllAvailablePlansResponse, error)
// 列出所有可用的套餐的基本信息
FindAllAvailableBasicPlans(ctx context.Context, in *FindAllAvailableBasicPlansRequest, opts ...grpc.CallOption) (*FindAllAvailableBasicPlansResponse, error)
// 对套餐进行排序
SortPlans(ctx context.Context, in *SortPlansRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
@@ -92,6 +101,15 @@ func (c *planServiceClient) FindEnabledPlan(ctx context.Context, in *FindEnabled
return out, nil
}
func (c *planServiceClient) FindBasicPlan(ctx context.Context, in *FindBasicPlanRequest, opts ...grpc.CallOption) (*FindBasicPlanResponse, error) {
out := new(FindBasicPlanResponse)
err := c.cc.Invoke(ctx, PlanService_FindBasicPlan_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *planServiceClient) CountAllEnabledPlans(ctx context.Context, in *CountAllEnabledPlansRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, PlanService_CountAllEnabledPlans_FullMethodName, in, out, opts...)
@@ -110,6 +128,24 @@ func (c *planServiceClient) ListEnabledPlans(ctx context.Context, in *ListEnable
return out, nil
}
func (c *planServiceClient) FindAllAvailablePlans(ctx context.Context, in *FindAllAvailablePlansRequest, opts ...grpc.CallOption) (*FindAllAvailablePlansResponse, error) {
out := new(FindAllAvailablePlansResponse)
err := c.cc.Invoke(ctx, PlanService_FindAllAvailablePlans_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *planServiceClient) FindAllAvailableBasicPlans(ctx context.Context, in *FindAllAvailableBasicPlansRequest, opts ...grpc.CallOption) (*FindAllAvailableBasicPlansResponse, error) {
out := new(FindAllAvailableBasicPlansResponse)
err := c.cc.Invoke(ctx, PlanService_FindAllAvailableBasicPlans_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *planServiceClient) SortPlans(ctx context.Context, in *SortPlansRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, PlanService_SortPlans_FullMethodName, in, out, opts...)
@@ -131,10 +167,16 @@ type PlanServiceServer interface {
DeletePlan(context.Context, *DeletePlanRequest) (*RPCSuccess, error)
// 查找单个套餐
FindEnabledPlan(context.Context, *FindEnabledPlanRequest) (*FindEnabledPlanResponse, error)
// 查找套餐基本信息
FindBasicPlan(context.Context, *FindBasicPlanRequest) (*FindBasicPlanResponse, error)
// 计算套餐数量
CountAllEnabledPlans(context.Context, *CountAllEnabledPlansRequest) (*RPCCountResponse, error)
// 列出单页套餐
ListEnabledPlans(context.Context, *ListEnabledPlansRequest) (*ListEnabledPlansResponse, error)
// 列出所有可用的套餐
FindAllAvailablePlans(context.Context, *FindAllAvailablePlansRequest) (*FindAllAvailablePlansResponse, error)
// 列出所有可用的套餐的基本信息
FindAllAvailableBasicPlans(context.Context, *FindAllAvailableBasicPlansRequest) (*FindAllAvailableBasicPlansResponse, error)
// 对套餐进行排序
SortPlans(context.Context, *SortPlansRequest) (*RPCSuccess, error)
}
@@ -155,12 +197,21 @@ func (UnimplementedPlanServiceServer) DeletePlan(context.Context, *DeletePlanReq
func (UnimplementedPlanServiceServer) FindEnabledPlan(context.Context, *FindEnabledPlanRequest) (*FindEnabledPlanResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindEnabledPlan not implemented")
}
func (UnimplementedPlanServiceServer) FindBasicPlan(context.Context, *FindBasicPlanRequest) (*FindBasicPlanResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindBasicPlan not implemented")
}
func (UnimplementedPlanServiceServer) CountAllEnabledPlans(context.Context, *CountAllEnabledPlansRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountAllEnabledPlans not implemented")
}
func (UnimplementedPlanServiceServer) ListEnabledPlans(context.Context, *ListEnabledPlansRequest) (*ListEnabledPlansResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEnabledPlans not implemented")
}
func (UnimplementedPlanServiceServer) FindAllAvailablePlans(context.Context, *FindAllAvailablePlansRequest) (*FindAllAvailablePlansResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllAvailablePlans not implemented")
}
func (UnimplementedPlanServiceServer) FindAllAvailableBasicPlans(context.Context, *FindAllAvailableBasicPlansRequest) (*FindAllAvailableBasicPlansResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllAvailableBasicPlans not implemented")
}
func (UnimplementedPlanServiceServer) SortPlans(context.Context, *SortPlansRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method SortPlans not implemented")
}
@@ -248,6 +299,24 @@ func _PlanService_FindEnabledPlan_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
func _PlanService_FindBasicPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindBasicPlanRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PlanServiceServer).FindBasicPlan(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PlanService_FindBasicPlan_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlanServiceServer).FindBasicPlan(ctx, req.(*FindBasicPlanRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PlanService_CountAllEnabledPlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountAllEnabledPlansRequest)
if err := dec(in); err != nil {
@@ -284,6 +353,42 @@ func _PlanService_ListEnabledPlans_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
func _PlanService_FindAllAvailablePlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllAvailablePlansRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PlanServiceServer).FindAllAvailablePlans(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PlanService_FindAllAvailablePlans_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlanServiceServer).FindAllAvailablePlans(ctx, req.(*FindAllAvailablePlansRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PlanService_FindAllAvailableBasicPlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllAvailableBasicPlansRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PlanServiceServer).FindAllAvailableBasicPlans(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PlanService_FindAllAvailableBasicPlans_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PlanServiceServer).FindAllAvailableBasicPlans(ctx, req.(*FindAllAvailableBasicPlansRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PlanService_SortPlans_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SortPlansRequest)
if err := dec(in); err != nil {
@@ -325,6 +430,10 @@ var PlanService_ServiceDesc = grpc.ServiceDesc{
MethodName: "findEnabledPlan",
Handler: _PlanService_FindEnabledPlan_Handler,
},
{
MethodName: "findBasicPlan",
Handler: _PlanService_FindBasicPlan_Handler,
},
{
MethodName: "countAllEnabledPlans",
Handler: _PlanService_CountAllEnabledPlans_Handler,
@@ -333,6 +442,14 @@ var PlanService_ServiceDesc = grpc.ServiceDesc{
MethodName: "listEnabledPlans",
Handler: _PlanService_ListEnabledPlans_Handler,
},
{
MethodName: "findAllAvailablePlans",
Handler: _PlanService_FindAllAvailablePlans_Handler,
},
{
MethodName: "findAllAvailableBasicPlans",
Handler: _PlanService_FindAllAvailableBasicPlans_Handler,
},
{
MethodName: "sortPlans",
Handler: _PlanService_SortPlans_Handler,

View File

@@ -0,0 +1,966 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.19.4
// source: service_post.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 创建文章
type CreatePostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostCategoryId int64 `protobuf:"varint,1,opt,name=postCategoryId,proto3" json:"postCategoryId,omitempty"` // 文章分类ID
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // 类型normal, url
ProductCode string `protobuf:"bytes,3,opt,name=productCode,proto3" json:"productCode,omitempty"` // 产品代号
Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` // 标题
Url string `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"` // 跳转的URLtype=url
Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` // 文章内容type=normal
}
func (x *CreatePostRequest) Reset() {
*x = CreatePostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreatePostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreatePostRequest) ProtoMessage() {}
func (x *CreatePostRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreatePostRequest.ProtoReflect.Descriptor instead.
func (*CreatePostRequest) Descriptor() ([]byte, []int) {
return file_service_post_proto_rawDescGZIP(), []int{0}
}
func (x *CreatePostRequest) GetPostCategoryId() int64 {
if x != nil {
return x.PostCategoryId
}
return 0
}
func (x *CreatePostRequest) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *CreatePostRequest) GetProductCode() string {
if x != nil {
return x.ProductCode
}
return ""
}
func (x *CreatePostRequest) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
func (x *CreatePostRequest) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *CreatePostRequest) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
type CreatePostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostId int64 `protobuf:"varint,1,opt,name=postId,proto3" json:"postId,omitempty"` // 文章ID
}
func (x *CreatePostResponse) Reset() {
*x = CreatePostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreatePostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreatePostResponse) ProtoMessage() {}
func (x *CreatePostResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_post_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreatePostResponse.ProtoReflect.Descriptor instead.
func (*CreatePostResponse) Descriptor() ([]byte, []int) {
return file_service_post_proto_rawDescGZIP(), []int{1}
}
func (x *CreatePostResponse) GetPostId() int64 {
if x != nil {
return x.PostId
}
return 0
}
// 修改文章
type UpdatePostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostId int64 `protobuf:"varint,1,opt,name=postId,proto3" json:"postId,omitempty"` // 文章ID
PostCategoryId int64 `protobuf:"varint,2,opt,name=postCategoryId,proto3" json:"postCategoryId,omitempty"` // 文章分类ID
ProductCode string `protobuf:"bytes,3,opt,name=productCode,proto3" json:"productCode,omitempty"` // 产品代号
Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` // 标题
Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` // 类型normal, url
Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"` // 跳转的URLtype=url
Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` // 文章内容type=normal
}
func (x *UpdatePostRequest) Reset() {
*x = UpdatePostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdatePostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdatePostRequest) ProtoMessage() {}
func (x *UpdatePostRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdatePostRequest.ProtoReflect.Descriptor instead.
func (*UpdatePostRequest) Descriptor() ([]byte, []int) {
return file_service_post_proto_rawDescGZIP(), []int{2}
}
func (x *UpdatePostRequest) GetPostId() int64 {
if x != nil {
return x.PostId
}
return 0
}
func (x *UpdatePostRequest) GetPostCategoryId() int64 {
if x != nil {
return x.PostCategoryId
}
return 0
}
func (x *UpdatePostRequest) GetProductCode() string {
if x != nil {
return x.ProductCode
}
return ""
}
func (x *UpdatePostRequest) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
func (x *UpdatePostRequest) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *UpdatePostRequest) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *UpdatePostRequest) GetBody() string {
if x != nil {
return x.Body
}
return ""
}
// 删除文章
type DeletePostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostId int64 `protobuf:"varint,1,opt,name=postId,proto3" json:"postId,omitempty"` // 文章ID
}
func (x *DeletePostRequest) Reset() {
*x = DeletePostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeletePostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeletePostRequest) ProtoMessage() {}
func (x *DeletePostRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeletePostRequest.ProtoReflect.Descriptor instead.
func (*DeletePostRequest) Descriptor() ([]byte, []int) {
return file_service_post_proto_rawDescGZIP(), []int{3}
}
func (x *DeletePostRequest) GetPostId() int64 {
if x != nil {
return x.PostId
}
return 0
}
// 发布文章
type PublishPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostId int64 `protobuf:"varint,1,opt,name=postId,proto3" json:"postId,omitempty"` // 文章ID
}
func (x *PublishPostRequest) Reset() {
*x = PublishPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PublishPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PublishPostRequest) ProtoMessage() {}
func (x *PublishPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PublishPostRequest.ProtoReflect.Descriptor instead.
func (*PublishPostRequest) Descriptor() ([]byte, []int) {
return file_service_post_proto_rawDescGZIP(), []int{4}
}
func (x *PublishPostRequest) GetPostId() int64 {
if x != nil {
return x.PostId
}
return 0
}
// 计算文章数量
type CountPostsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostCategoryId int64 `protobuf:"varint,1,opt,name=postCategoryId,proto3" json:"postCategoryId,omitempty"` // 分类ID
ProductCode string `protobuf:"bytes,2,opt,name=productCode,proto3" json:"productCode,omitempty"` // 产品代号
PublishedOnly bool `protobuf:"varint,3,opt,name=publishedOnly,proto3" json:"publishedOnly,omitempty"` // 只列出已发布的
}
func (x *CountPostsRequest) Reset() {
*x = CountPostsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CountPostsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CountPostsRequest) ProtoMessage() {}
func (x *CountPostsRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CountPostsRequest.ProtoReflect.Descriptor instead.
func (*CountPostsRequest) Descriptor() ([]byte, []int) {
return file_service_post_proto_rawDescGZIP(), []int{5}
}
func (x *CountPostsRequest) GetPostCategoryId() int64 {
if x != nil {
return x.PostCategoryId
}
return 0
}
func (x *CountPostsRequest) GetProductCode() string {
if x != nil {
return x.ProductCode
}
return ""
}
func (x *CountPostsRequest) GetPublishedOnly() bool {
if x != nil {
return x.PublishedOnly
}
return false
}
// 列出单页文章
type ListPostsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
ProductCode string `protobuf:"bytes,3,opt,name=productCode,proto3" json:"productCode,omitempty"` // 产品代号
PostCategoryId int64 `protobuf:"varint,4,opt,name=postCategoryId,proto3" json:"postCategoryId,omitempty"` // 分类ID
PostCategoryCode string `protobuf:"bytes,5,opt,name=postCategoryCode,proto3" json:"postCategoryCode,omitempty"` // 分类代号
ExcludingPostCategoryCode string `protobuf:"bytes,6,opt,name=excludingPostCategoryCode,proto3" json:"excludingPostCategoryCode,omitempty"` // 排除的分类代号
PublishedOnly bool `protobuf:"varint,7,opt,name=publishedOnly,proto3" json:"publishedOnly,omitempty"` // 只列出已发布的
ContainsBody bool `protobuf:"varint,8,opt,name=containsBody,proto3" json:"containsBody,omitempty"` // 是否包含文章内容
}
func (x *ListPostsRequest) Reset() {
*x = ListPostsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPostsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPostsRequest) ProtoMessage() {}
func (x *ListPostsRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPostsRequest.ProtoReflect.Descriptor instead.
func (*ListPostsRequest) Descriptor() ([]byte, []int) {
return file_service_post_proto_rawDescGZIP(), []int{6}
}
func (x *ListPostsRequest) GetOffset() int64 {
if x != nil {
return x.Offset
}
return 0
}
func (x *ListPostsRequest) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
func (x *ListPostsRequest) GetProductCode() string {
if x != nil {
return x.ProductCode
}
return ""
}
func (x *ListPostsRequest) GetPostCategoryId() int64 {
if x != nil {
return x.PostCategoryId
}
return 0
}
func (x *ListPostsRequest) GetPostCategoryCode() string {
if x != nil {
return x.PostCategoryCode
}
return ""
}
func (x *ListPostsRequest) GetExcludingPostCategoryCode() string {
if x != nil {
return x.ExcludingPostCategoryCode
}
return ""
}
func (x *ListPostsRequest) GetPublishedOnly() bool {
if x != nil {
return x.PublishedOnly
}
return false
}
func (x *ListPostsRequest) GetContainsBody() bool {
if x != nil {
return x.ContainsBody
}
return false
}
type ListPostsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` // 文章列表
}
func (x *ListPostsResponse) Reset() {
*x = ListPostsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListPostsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListPostsResponse) ProtoMessage() {}
func (x *ListPostsResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_post_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListPostsResponse.ProtoReflect.Descriptor instead.
func (*ListPostsResponse) Descriptor() ([]byte, []int) {
return file_service_post_proto_rawDescGZIP(), []int{7}
}
func (x *ListPostsResponse) GetPosts() []*Post {
if x != nil {
return x.Posts
}
return nil
}
// 查询单篇文章
type FindPostRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostId int64 `protobuf:"varint,1,opt,name=postId,proto3" json:"postId,omitempty"` // 文章ID
}
func (x *FindPostRequest) Reset() {
*x = FindPostRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindPostRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindPostRequest) ProtoMessage() {}
func (x *FindPostRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindPostRequest.ProtoReflect.Descriptor instead.
func (*FindPostRequest) Descriptor() ([]byte, []int) {
return file_service_post_proto_rawDescGZIP(), []int{8}
}
func (x *FindPostRequest) GetPostId() int64 {
if x != nil {
return x.PostId
}
return 0
}
type FindPostResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Post *Post `protobuf:"bytes,1,opt,name=post,proto3" json:"post,omitempty"` // 文章信息
}
func (x *FindPostResponse) Reset() {
*x = FindPostResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindPostResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindPostResponse) ProtoMessage() {}
func (x *FindPostResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_post_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindPostResponse.ProtoReflect.Descriptor instead.
func (*FindPostResponse) Descriptor() ([]byte, []int) {
return file_service_post_proto_rawDescGZIP(), []int{9}
}
func (x *FindPostResponse) GetPost() *Post {
if x != nil {
return x.Post
}
return nil
}
var File_service_post_proto protoreflect.FileDescriptor
var file_service_post_proto_rawDesc = []byte{
0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x17, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73,
0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x70, 0x6f, 0x73, 0x74, 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, 0xb1, 0x01, 0x0a,
0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74,
0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,
0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20,
0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72,
0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04,
0x62, 0x6f, 0x64, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79,
0x22, 0x2c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0xc9,
0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e,
0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43,
0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75,
0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63,
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74,
0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x2b, 0x0a, 0x11, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69,
0x73, 0x68, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70,
0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x11, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x50,
0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x70,
0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
0x79, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43, 0x6f,
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68,
0x65, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x70, 0x75,
0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0xbc, 0x02, 0x0a, 0x10,
0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73, 0x74, 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, 0x12, 0x20, 0x0a, 0x0b,
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x26,
0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64,
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65,
0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x10, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x43, 0x6f,
0x64, 0x65, 0x12, 0x3c, 0x0a, 0x19, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x50,
0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18,
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67,
0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65,
0x12, 0x24, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x4f, 0x6e, 0x6c,
0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68,
0x65, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x73, 0x42, 0x6f, 0x64, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x33, 0x0a, 0x11, 0x4c, 0x69,
0x73, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x1e, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08,
0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x22,
0x29, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x10, 0x46, 0x69,
0x6e, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c,
0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70,
0x62, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x32, 0x97, 0x03, 0x0a,
0x0b, 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x0a,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 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, 0x6f, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x70,
0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63,
0x65, 0x73, 0x73, 0x12, 0x35, 0x0a, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x50, 0x6f,
0x73, 0x74, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x50,
0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e,
0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x50, 0x6f, 0x73, 0x74, 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, 0x38, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73,
0x74, 0x73, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x73, 0x74,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x35, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_service_post_proto_rawDescOnce sync.Once
file_service_post_proto_rawDescData = file_service_post_proto_rawDesc
)
func file_service_post_proto_rawDescGZIP() []byte {
file_service_post_proto_rawDescOnce.Do(func() {
file_service_post_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_post_proto_rawDescData)
})
return file_service_post_proto_rawDescData
}
var file_service_post_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_service_post_proto_goTypes = []interface{}{
(*CreatePostRequest)(nil), // 0: pb.CreatePostRequest
(*CreatePostResponse)(nil), // 1: pb.CreatePostResponse
(*UpdatePostRequest)(nil), // 2: pb.UpdatePostRequest
(*DeletePostRequest)(nil), // 3: pb.DeletePostRequest
(*PublishPostRequest)(nil), // 4: pb.PublishPostRequest
(*CountPostsRequest)(nil), // 5: pb.CountPostsRequest
(*ListPostsRequest)(nil), // 6: pb.ListPostsRequest
(*ListPostsResponse)(nil), // 7: pb.ListPostsResponse
(*FindPostRequest)(nil), // 8: pb.FindPostRequest
(*FindPostResponse)(nil), // 9: pb.FindPostResponse
(*Post)(nil), // 10: pb.Post
(*RPCSuccess)(nil), // 11: pb.RPCSuccess
(*RPCCountResponse)(nil), // 12: pb.RPCCountResponse
}
var file_service_post_proto_depIdxs = []int32{
10, // 0: pb.ListPostsResponse.posts:type_name -> pb.Post
10, // 1: pb.FindPostResponse.post:type_name -> pb.Post
0, // 2: pb.PostService.createPost:input_type -> pb.CreatePostRequest
2, // 3: pb.PostService.updatePost:input_type -> pb.UpdatePostRequest
3, // 4: pb.PostService.deletePost:input_type -> pb.DeletePostRequest
4, // 5: pb.PostService.publishPost:input_type -> pb.PublishPostRequest
5, // 6: pb.PostService.countPosts:input_type -> pb.CountPostsRequest
6, // 7: pb.PostService.listPosts:input_type -> pb.ListPostsRequest
8, // 8: pb.PostService.findPost:input_type -> pb.FindPostRequest
1, // 9: pb.PostService.createPost:output_type -> pb.CreatePostResponse
11, // 10: pb.PostService.updatePost:output_type -> pb.RPCSuccess
11, // 11: pb.PostService.deletePost:output_type -> pb.RPCSuccess
11, // 12: pb.PostService.publishPost:output_type -> pb.RPCSuccess
12, // 13: pb.PostService.countPosts:output_type -> pb.RPCCountResponse
7, // 14: pb.PostService.listPosts:output_type -> pb.ListPostsResponse
9, // 15: pb.PostService.findPost:output_type -> pb.FindPostResponse
9, // [9:16] is the sub-list for method output_type
2, // [2:9] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_service_post_proto_init() }
func file_service_post_proto_init() {
if File_service_post_proto != nil {
return
}
file_models_model_post_proto_init()
file_models_rpc_messages_proto_init()
if !protoimpl.UnsafeEnabled {
file_service_post_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreatePostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreatePostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdatePostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeletePostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PublishPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CountPostsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPostsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListPostsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindPostRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindPostResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_post_proto_rawDesc,
NumEnums: 0,
NumMessages: 10,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_service_post_proto_goTypes,
DependencyIndexes: file_service_post_proto_depIdxs,
MessageInfos: file_service_post_proto_msgTypes,
}.Build()
File_service_post_proto = out.File
file_service_post_proto_rawDesc = nil
file_service_post_proto_goTypes = nil
file_service_post_proto_depIdxs = nil
}

View File

@@ -0,0 +1,875 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.19.4
// source: service_post_category.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 创建分类
type CreatePostCategoryRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // 分类名称
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // 分类代号
}
func (x *CreatePostCategoryRequest) Reset() {
*x = CreatePostCategoryRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreatePostCategoryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreatePostCategoryRequest) ProtoMessage() {}
func (x *CreatePostCategoryRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreatePostCategoryRequest.ProtoReflect.Descriptor instead.
func (*CreatePostCategoryRequest) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{0}
}
func (x *CreatePostCategoryRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CreatePostCategoryRequest) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
type CreatePostCategoryResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostCategoryId int64 `protobuf:"varint,1,opt,name=postCategoryId,proto3" json:"postCategoryId,omitempty"` // 分类ID
}
func (x *CreatePostCategoryResponse) Reset() {
*x = CreatePostCategoryResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreatePostCategoryResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreatePostCategoryResponse) ProtoMessage() {}
func (x *CreatePostCategoryResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreatePostCategoryResponse.ProtoReflect.Descriptor instead.
func (*CreatePostCategoryResponse) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{1}
}
func (x *CreatePostCategoryResponse) GetPostCategoryId() int64 {
if x != nil {
return x.PostCategoryId
}
return 0
}
// 修改分类
type UpdatePostCategoryRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostCategoryId int64 `protobuf:"varint,1,opt,name=postCategoryId,proto3" json:"postCategoryId,omitempty"` // 分类ID
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 分类名称
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // 分类代号
IsOn bool `protobuf:"varint,4,opt,name=isOn,proto3" json:"isOn,omitempty"` // 是否启用
}
func (x *UpdatePostCategoryRequest) Reset() {
*x = UpdatePostCategoryRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdatePostCategoryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdatePostCategoryRequest) ProtoMessage() {}
func (x *UpdatePostCategoryRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdatePostCategoryRequest.ProtoReflect.Descriptor instead.
func (*UpdatePostCategoryRequest) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{2}
}
func (x *UpdatePostCategoryRequest) GetPostCategoryId() int64 {
if x != nil {
return x.PostCategoryId
}
return 0
}
func (x *UpdatePostCategoryRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *UpdatePostCategoryRequest) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *UpdatePostCategoryRequest) GetIsOn() bool {
if x != nil {
return x.IsOn
}
return false
}
// 删除分类
type DeletePostCategoryRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostCategoryId int64 `protobuf:"varint,1,opt,name=postCategoryId,proto3" json:"postCategoryId,omitempty"` // 分类ID
}
func (x *DeletePostCategoryRequest) Reset() {
*x = DeletePostCategoryRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeletePostCategoryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeletePostCategoryRequest) ProtoMessage() {}
func (x *DeletePostCategoryRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeletePostCategoryRequest.ProtoReflect.Descriptor instead.
func (*DeletePostCategoryRequest) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{3}
}
func (x *DeletePostCategoryRequest) GetPostCategoryId() int64 {
if x != nil {
return x.PostCategoryId
}
return 0
}
// 列出所有分类
type FindAllPostCategoriesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *FindAllPostCategoriesRequest) Reset() {
*x = FindAllPostCategoriesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllPostCategoriesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllPostCategoriesRequest) ProtoMessage() {}
func (x *FindAllPostCategoriesRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindAllPostCategoriesRequest.ProtoReflect.Descriptor instead.
func (*FindAllPostCategoriesRequest) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{4}
}
type FindAllPostCategoriesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostCategories []*PostCategory `protobuf:"bytes,1,rep,name=postCategories,proto3" json:"postCategories,omitempty"` // 分类列表
}
func (x *FindAllPostCategoriesResponse) Reset() {
*x = FindAllPostCategoriesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllPostCategoriesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllPostCategoriesResponse) ProtoMessage() {}
func (x *FindAllPostCategoriesResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindAllPostCategoriesResponse.ProtoReflect.Descriptor instead.
func (*FindAllPostCategoriesResponse) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{5}
}
func (x *FindAllPostCategoriesResponse) GetPostCategories() []*PostCategory {
if x != nil {
return x.PostCategories
}
return nil
}
// 列出所有可用分类
type FindAllAvailablePostCategoriesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *FindAllAvailablePostCategoriesRequest) Reset() {
*x = FindAllAvailablePostCategoriesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllAvailablePostCategoriesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllAvailablePostCategoriesRequest) ProtoMessage() {}
func (x *FindAllAvailablePostCategoriesRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindAllAvailablePostCategoriesRequest.ProtoReflect.Descriptor instead.
func (*FindAllAvailablePostCategoriesRequest) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{6}
}
type FindAllAvailablePostCategoriesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostCategories []*PostCategory `protobuf:"bytes,1,rep,name=postCategories,proto3" json:"postCategories,omitempty"` // 分类列表
}
func (x *FindAllAvailablePostCategoriesResponse) Reset() {
*x = FindAllAvailablePostCategoriesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllAvailablePostCategoriesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllAvailablePostCategoriesResponse) ProtoMessage() {}
func (x *FindAllAvailablePostCategoriesResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindAllAvailablePostCategoriesResponse.ProtoReflect.Descriptor instead.
func (*FindAllAvailablePostCategoriesResponse) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{7}
}
func (x *FindAllAvailablePostCategoriesResponse) GetPostCategories() []*PostCategory {
if x != nil {
return x.PostCategories
}
return nil
}
// 查询单个分类
type FindPostCategoryRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostCategoryId int64 `protobuf:"varint,1,opt,name=postCategoryId,proto3" json:"postCategoryId,omitempty"` // 分类ID
}
func (x *FindPostCategoryRequest) Reset() {
*x = FindPostCategoryRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindPostCategoryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindPostCategoryRequest) ProtoMessage() {}
func (x *FindPostCategoryRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindPostCategoryRequest.ProtoReflect.Descriptor instead.
func (*FindPostCategoryRequest) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{8}
}
func (x *FindPostCategoryRequest) GetPostCategoryId() int64 {
if x != nil {
return x.PostCategoryId
}
return 0
}
type FindPostCategoryResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostCategory *PostCategory `protobuf:"bytes,1,opt,name=postCategory,proto3" json:"postCategory,omitempty"` // 分类信息
}
func (x *FindPostCategoryResponse) Reset() {
*x = FindPostCategoryResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindPostCategoryResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindPostCategoryResponse) ProtoMessage() {}
func (x *FindPostCategoryResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindPostCategoryResponse.ProtoReflect.Descriptor instead.
func (*FindPostCategoryResponse) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{9}
}
func (x *FindPostCategoryResponse) GetPostCategory() *PostCategory {
if x != nil {
return x.PostCategory
}
return nil
}
// 对分类进行排序
type SortPostCategoriesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PostCategoryIds []int64 `protobuf:"varint,1,rep,packed,name=postCategoryIds,proto3" json:"postCategoryIds,omitempty"` // 分类ID列表
}
func (x *SortPostCategoriesRequest) Reset() {
*x = SortPostCategoriesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_post_category_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SortPostCategoriesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SortPostCategoriesRequest) ProtoMessage() {}
func (x *SortPostCategoriesRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_post_category_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SortPostCategoriesRequest.ProtoReflect.Descriptor instead.
func (*SortPostCategoriesRequest) Descriptor() ([]byte, []int) {
return file_service_post_category_proto_rawDescGZIP(), []int{10}
}
func (x *SortPostCategoriesRequest) GetPostCategoryIds() []int64 {
if x != nil {
return x.PostCategoryIds
}
return nil
}
var File_service_post_category_proto protoreflect.FileDescriptor
var file_service_post_category_proto_rawDesc = []byte{
0x0a, 0x1b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x63,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70,
0x62, 0x1a, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f,
0x70, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 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, 0x43,
0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65,
0x67, 0x6f, 0x72, 0x79, 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,
0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63,
0x6f, 0x64, 0x65, 0x22, 0x44, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73,
0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22, 0x7f, 0x0a, 0x19, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e,
0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 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, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x18, 0x04,
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6e, 0x22, 0x43, 0x0a, 0x19, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22,
0x1e, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
0x59, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x38, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69,
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f,
0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74,
0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x27, 0x0a, 0x25, 0x46, 0x69,
0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f,
0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x22, 0x62, 0x0a, 0x26, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x76,
0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67,
0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a,
0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74,
0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x41, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64, 0x50,
0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f,
0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74,
0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x18, 0x46, 0x69,
0x6e, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70,
0x62, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x0c,
0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x45, 0x0a, 0x19,
0x53, 0x6f, 0x72, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69,
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x70, 0x6f, 0x73,
0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x03, 0x52, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
0x49, 0x64, 0x73, 0x32, 0xdf, 0x04, 0x0a, 0x13, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65,
0x67, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x63,
0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73,
0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74,
0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x43, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 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, 0x43, 0x0a, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50,
0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62,
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67,
0x6f, 0x72, 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, 0x5c, 0x0a, 0x15, 0x66, 0x69,
0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
0x69, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c,
0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41,
0x6c, 0x6c, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x1e, 0x66, 0x69, 0x6e, 0x64,
0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x74,
0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x70, 0x62, 0x2e,
0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65,
0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41,
0x6c, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6f, 0x73, 0x74, 0x43,
0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x4d, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74,
0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x50,
0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x73, 0x74,
0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x43, 0x0a, 0x12, 0x73, 0x6f, 0x72, 0x74, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65,
0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x6f, 0x72, 0x74,
0x50, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75,
0x63, 0x63, 0x65, 0x73, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_service_post_category_proto_rawDescOnce sync.Once
file_service_post_category_proto_rawDescData = file_service_post_category_proto_rawDesc
)
func file_service_post_category_proto_rawDescGZIP() []byte {
file_service_post_category_proto_rawDescOnce.Do(func() {
file_service_post_category_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_post_category_proto_rawDescData)
})
return file_service_post_category_proto_rawDescData
}
var file_service_post_category_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_service_post_category_proto_goTypes = []interface{}{
(*CreatePostCategoryRequest)(nil), // 0: pb.CreatePostCategoryRequest
(*CreatePostCategoryResponse)(nil), // 1: pb.CreatePostCategoryResponse
(*UpdatePostCategoryRequest)(nil), // 2: pb.UpdatePostCategoryRequest
(*DeletePostCategoryRequest)(nil), // 3: pb.DeletePostCategoryRequest
(*FindAllPostCategoriesRequest)(nil), // 4: pb.FindAllPostCategoriesRequest
(*FindAllPostCategoriesResponse)(nil), // 5: pb.FindAllPostCategoriesResponse
(*FindAllAvailablePostCategoriesRequest)(nil), // 6: pb.FindAllAvailablePostCategoriesRequest
(*FindAllAvailablePostCategoriesResponse)(nil), // 7: pb.FindAllAvailablePostCategoriesResponse
(*FindPostCategoryRequest)(nil), // 8: pb.FindPostCategoryRequest
(*FindPostCategoryResponse)(nil), // 9: pb.FindPostCategoryResponse
(*SortPostCategoriesRequest)(nil), // 10: pb.SortPostCategoriesRequest
(*PostCategory)(nil), // 11: pb.PostCategory
(*RPCSuccess)(nil), // 12: pb.RPCSuccess
}
var file_service_post_category_proto_depIdxs = []int32{
11, // 0: pb.FindAllPostCategoriesResponse.postCategories:type_name -> pb.PostCategory
11, // 1: pb.FindAllAvailablePostCategoriesResponse.postCategories:type_name -> pb.PostCategory
11, // 2: pb.FindPostCategoryResponse.postCategory:type_name -> pb.PostCategory
0, // 3: pb.PostCategoryService.createPostCategory:input_type -> pb.CreatePostCategoryRequest
2, // 4: pb.PostCategoryService.updatePostCategory:input_type -> pb.UpdatePostCategoryRequest
3, // 5: pb.PostCategoryService.deletePostCategory:input_type -> pb.DeletePostCategoryRequest
4, // 6: pb.PostCategoryService.findAllPostCategories:input_type -> pb.FindAllPostCategoriesRequest
6, // 7: pb.PostCategoryService.findAllAvailablePostCategories:input_type -> pb.FindAllAvailablePostCategoriesRequest
8, // 8: pb.PostCategoryService.findPostCategory:input_type -> pb.FindPostCategoryRequest
10, // 9: pb.PostCategoryService.sortPostCategories:input_type -> pb.SortPostCategoriesRequest
1, // 10: pb.PostCategoryService.createPostCategory:output_type -> pb.CreatePostCategoryResponse
12, // 11: pb.PostCategoryService.updatePostCategory:output_type -> pb.RPCSuccess
12, // 12: pb.PostCategoryService.deletePostCategory:output_type -> pb.RPCSuccess
5, // 13: pb.PostCategoryService.findAllPostCategories:output_type -> pb.FindAllPostCategoriesResponse
7, // 14: pb.PostCategoryService.findAllAvailablePostCategories:output_type -> pb.FindAllAvailablePostCategoriesResponse
9, // 15: pb.PostCategoryService.findPostCategory:output_type -> pb.FindPostCategoryResponse
12, // 16: pb.PostCategoryService.sortPostCategories:output_type -> pb.RPCSuccess
10, // [10:17] is the sub-list for method output_type
3, // [3:10] 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
}
func init() { file_service_post_category_proto_init() }
func file_service_post_category_proto_init() {
if File_service_post_category_proto != nil {
return
}
file_models_model_post_category_proto_init()
file_models_rpc_messages_proto_init()
if !protoimpl.UnsafeEnabled {
file_service_post_category_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreatePostCategoryRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_category_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreatePostCategoryResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_category_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdatePostCategoryRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_category_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeletePostCategoryRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_category_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllPostCategoriesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_category_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllPostCategoriesResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_category_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllAvailablePostCategoriesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_category_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindAllAvailablePostCategoriesResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_category_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindPostCategoryRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_category_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindPostCategoryResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_post_category_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SortPostCategoriesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_post_category_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_service_post_category_proto_goTypes,
DependencyIndexes: file_service_post_category_proto_depIdxs,
MessageInfos: file_service_post_category_proto_msgTypes,
}.Build()
File_service_post_category_proto = out.File
file_service_post_category_proto_rawDesc = nil
file_service_post_category_proto_goTypes = nil
file_service_post_category_proto_depIdxs = nil
}

View File

@@ -0,0 +1,343 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.19.4
// source: service_post_category.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
PostCategoryService_CreatePostCategory_FullMethodName = "/pb.PostCategoryService/createPostCategory"
PostCategoryService_UpdatePostCategory_FullMethodName = "/pb.PostCategoryService/updatePostCategory"
PostCategoryService_DeletePostCategory_FullMethodName = "/pb.PostCategoryService/deletePostCategory"
PostCategoryService_FindAllPostCategories_FullMethodName = "/pb.PostCategoryService/findAllPostCategories"
PostCategoryService_FindAllAvailablePostCategories_FullMethodName = "/pb.PostCategoryService/findAllAvailablePostCategories"
PostCategoryService_FindPostCategory_FullMethodName = "/pb.PostCategoryService/findPostCategory"
PostCategoryService_SortPostCategories_FullMethodName = "/pb.PostCategoryService/sortPostCategories"
)
// PostCategoryServiceClient is the client API for PostCategoryService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type PostCategoryServiceClient interface {
// 创建分类
CreatePostCategory(ctx context.Context, in *CreatePostCategoryRequest, opts ...grpc.CallOption) (*CreatePostCategoryResponse, error)
// 修改分类
UpdatePostCategory(ctx context.Context, in *UpdatePostCategoryRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 删除分类
DeletePostCategory(ctx context.Context, in *DeletePostCategoryRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 列出所有分类
FindAllPostCategories(ctx context.Context, in *FindAllPostCategoriesRequest, opts ...grpc.CallOption) (*FindAllPostCategoriesResponse, error)
// 列出所有可用分类
FindAllAvailablePostCategories(ctx context.Context, in *FindAllAvailablePostCategoriesRequest, opts ...grpc.CallOption) (*FindAllAvailablePostCategoriesResponse, error)
// 查询单个分类
FindPostCategory(ctx context.Context, in *FindPostCategoryRequest, opts ...grpc.CallOption) (*FindPostCategoryResponse, error)
// 对分类进行排序
SortPostCategories(ctx context.Context, in *SortPostCategoriesRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
}
type postCategoryServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostCategoryServiceClient(cc grpc.ClientConnInterface) PostCategoryServiceClient {
return &postCategoryServiceClient{cc}
}
func (c *postCategoryServiceClient) CreatePostCategory(ctx context.Context, in *CreatePostCategoryRequest, opts ...grpc.CallOption) (*CreatePostCategoryResponse, error) {
out := new(CreatePostCategoryResponse)
err := c.cc.Invoke(ctx, PostCategoryService_CreatePostCategory_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postCategoryServiceClient) UpdatePostCategory(ctx context.Context, in *UpdatePostCategoryRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, PostCategoryService_UpdatePostCategory_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postCategoryServiceClient) DeletePostCategory(ctx context.Context, in *DeletePostCategoryRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, PostCategoryService_DeletePostCategory_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postCategoryServiceClient) FindAllPostCategories(ctx context.Context, in *FindAllPostCategoriesRequest, opts ...grpc.CallOption) (*FindAllPostCategoriesResponse, error) {
out := new(FindAllPostCategoriesResponse)
err := c.cc.Invoke(ctx, PostCategoryService_FindAllPostCategories_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postCategoryServiceClient) FindAllAvailablePostCategories(ctx context.Context, in *FindAllAvailablePostCategoriesRequest, opts ...grpc.CallOption) (*FindAllAvailablePostCategoriesResponse, error) {
out := new(FindAllAvailablePostCategoriesResponse)
err := c.cc.Invoke(ctx, PostCategoryService_FindAllAvailablePostCategories_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postCategoryServiceClient) FindPostCategory(ctx context.Context, in *FindPostCategoryRequest, opts ...grpc.CallOption) (*FindPostCategoryResponse, error) {
out := new(FindPostCategoryResponse)
err := c.cc.Invoke(ctx, PostCategoryService_FindPostCategory_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postCategoryServiceClient) SortPostCategories(ctx context.Context, in *SortPostCategoriesRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, PostCategoryService_SortPostCategories_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostCategoryServiceServer is the server API for PostCategoryService service.
// All implementations should embed UnimplementedPostCategoryServiceServer
// for forward compatibility
type PostCategoryServiceServer interface {
// 创建分类
CreatePostCategory(context.Context, *CreatePostCategoryRequest) (*CreatePostCategoryResponse, error)
// 修改分类
UpdatePostCategory(context.Context, *UpdatePostCategoryRequest) (*RPCSuccess, error)
// 删除分类
DeletePostCategory(context.Context, *DeletePostCategoryRequest) (*RPCSuccess, error)
// 列出所有分类
FindAllPostCategories(context.Context, *FindAllPostCategoriesRequest) (*FindAllPostCategoriesResponse, error)
// 列出所有可用分类
FindAllAvailablePostCategories(context.Context, *FindAllAvailablePostCategoriesRequest) (*FindAllAvailablePostCategoriesResponse, error)
// 查询单个分类
FindPostCategory(context.Context, *FindPostCategoryRequest) (*FindPostCategoryResponse, error)
// 对分类进行排序
SortPostCategories(context.Context, *SortPostCategoriesRequest) (*RPCSuccess, error)
}
// UnimplementedPostCategoryServiceServer should be embedded to have forward compatible implementations.
type UnimplementedPostCategoryServiceServer struct {
}
func (UnimplementedPostCategoryServiceServer) CreatePostCategory(context.Context, *CreatePostCategoryRequest) (*CreatePostCategoryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreatePostCategory not implemented")
}
func (UnimplementedPostCategoryServiceServer) UpdatePostCategory(context.Context, *UpdatePostCategoryRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdatePostCategory not implemented")
}
func (UnimplementedPostCategoryServiceServer) DeletePostCategory(context.Context, *DeletePostCategoryRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeletePostCategory not implemented")
}
func (UnimplementedPostCategoryServiceServer) FindAllPostCategories(context.Context, *FindAllPostCategoriesRequest) (*FindAllPostCategoriesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllPostCategories not implemented")
}
func (UnimplementedPostCategoryServiceServer) FindAllAvailablePostCategories(context.Context, *FindAllAvailablePostCategoriesRequest) (*FindAllAvailablePostCategoriesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindAllAvailablePostCategories not implemented")
}
func (UnimplementedPostCategoryServiceServer) FindPostCategory(context.Context, *FindPostCategoryRequest) (*FindPostCategoryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindPostCategory not implemented")
}
func (UnimplementedPostCategoryServiceServer) SortPostCategories(context.Context, *SortPostCategoriesRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method SortPostCategories not implemented")
}
// UnsafePostCategoryServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostCategoryServiceServer will
// result in compilation errors.
type UnsafePostCategoryServiceServer interface {
mustEmbedUnimplementedPostCategoryServiceServer()
}
func RegisterPostCategoryServiceServer(s grpc.ServiceRegistrar, srv PostCategoryServiceServer) {
s.RegisterService(&PostCategoryService_ServiceDesc, srv)
}
func _PostCategoryService_CreatePostCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreatePostCategoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostCategoryServiceServer).CreatePostCategory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostCategoryService_CreatePostCategory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostCategoryServiceServer).CreatePostCategory(ctx, req.(*CreatePostCategoryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostCategoryService_UpdatePostCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdatePostCategoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostCategoryServiceServer).UpdatePostCategory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostCategoryService_UpdatePostCategory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostCategoryServiceServer).UpdatePostCategory(ctx, req.(*UpdatePostCategoryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostCategoryService_DeletePostCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeletePostCategoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostCategoryServiceServer).DeletePostCategory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostCategoryService_DeletePostCategory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostCategoryServiceServer).DeletePostCategory(ctx, req.(*DeletePostCategoryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostCategoryService_FindAllPostCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllPostCategoriesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostCategoryServiceServer).FindAllPostCategories(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostCategoryService_FindAllPostCategories_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostCategoryServiceServer).FindAllPostCategories(ctx, req.(*FindAllPostCategoriesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostCategoryService_FindAllAvailablePostCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindAllAvailablePostCategoriesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostCategoryServiceServer).FindAllAvailablePostCategories(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostCategoryService_FindAllAvailablePostCategories_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostCategoryServiceServer).FindAllAvailablePostCategories(ctx, req.(*FindAllAvailablePostCategoriesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostCategoryService_FindPostCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindPostCategoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostCategoryServiceServer).FindPostCategory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostCategoryService_FindPostCategory_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostCategoryServiceServer).FindPostCategory(ctx, req.(*FindPostCategoryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostCategoryService_SortPostCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SortPostCategoriesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostCategoryServiceServer).SortPostCategories(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostCategoryService_SortPostCategories_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostCategoryServiceServer).SortPostCategories(ctx, req.(*SortPostCategoriesRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostCategoryService_ServiceDesc is the grpc.ServiceDesc for PostCategoryService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostCategoryService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.PostCategoryService",
HandlerType: (*PostCategoryServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "createPostCategory",
Handler: _PostCategoryService_CreatePostCategory_Handler,
},
{
MethodName: "updatePostCategory",
Handler: _PostCategoryService_UpdatePostCategory_Handler,
},
{
MethodName: "deletePostCategory",
Handler: _PostCategoryService_DeletePostCategory_Handler,
},
{
MethodName: "findAllPostCategories",
Handler: _PostCategoryService_FindAllPostCategories_Handler,
},
{
MethodName: "findAllAvailablePostCategories",
Handler: _PostCategoryService_FindAllAvailablePostCategories_Handler,
},
{
MethodName: "findPostCategory",
Handler: _PostCategoryService_FindPostCategory_Handler,
},
{
MethodName: "sortPostCategories",
Handler: _PostCategoryService_SortPostCategories_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_post_category.proto",
}

View File

@@ -0,0 +1,343 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.19.4
// source: service_post.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
PostService_CreatePost_FullMethodName = "/pb.PostService/createPost"
PostService_UpdatePost_FullMethodName = "/pb.PostService/updatePost"
PostService_DeletePost_FullMethodName = "/pb.PostService/deletePost"
PostService_PublishPost_FullMethodName = "/pb.PostService/publishPost"
PostService_CountPosts_FullMethodName = "/pb.PostService/countPosts"
PostService_ListPosts_FullMethodName = "/pb.PostService/listPosts"
PostService_FindPost_FullMethodName = "/pb.PostService/findPost"
)
// PostServiceClient is the client API for PostService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type PostServiceClient interface {
// 创建文章
CreatePost(ctx context.Context, in *CreatePostRequest, opts ...grpc.CallOption) (*CreatePostResponse, error)
// 修改文章
UpdatePost(ctx context.Context, in *UpdatePostRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 删除文章
DeletePost(ctx context.Context, in *DeletePostRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 发布文章
PublishPost(ctx context.Context, in *PublishPostRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
// 计算文章数量
CountPosts(ctx context.Context, in *CountPostsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 列出单页文章
ListPosts(ctx context.Context, in *ListPostsRequest, opts ...grpc.CallOption) (*ListPostsResponse, error)
// 查询单篇文章
FindPost(ctx context.Context, in *FindPostRequest, opts ...grpc.CallOption) (*FindPostResponse, error)
}
type postServiceClient struct {
cc grpc.ClientConnInterface
}
func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient {
return &postServiceClient{cc}
}
func (c *postServiceClient) CreatePost(ctx context.Context, in *CreatePostRequest, opts ...grpc.CallOption) (*CreatePostResponse, error) {
out := new(CreatePostResponse)
err := c.cc.Invoke(ctx, PostService_CreatePost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) UpdatePost(ctx context.Context, in *UpdatePostRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, PostService_UpdatePost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) DeletePost(ctx context.Context, in *DeletePostRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, PostService_DeletePost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) PublishPost(ctx context.Context, in *PublishPostRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
out := new(RPCSuccess)
err := c.cc.Invoke(ctx, PostService_PublishPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) CountPosts(ctx context.Context, in *CountPostsRequest, opts ...grpc.CallOption) (*RPCCountResponse, error) {
out := new(RPCCountResponse)
err := c.cc.Invoke(ctx, PostService_CountPosts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) ListPosts(ctx context.Context, in *ListPostsRequest, opts ...grpc.CallOption) (*ListPostsResponse, error) {
out := new(ListPostsResponse)
err := c.cc.Invoke(ctx, PostService_ListPosts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *postServiceClient) FindPost(ctx context.Context, in *FindPostRequest, opts ...grpc.CallOption) (*FindPostResponse, error) {
out := new(FindPostResponse)
err := c.cc.Invoke(ctx, PostService_FindPost_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PostServiceServer is the server API for PostService service.
// All implementations should embed UnimplementedPostServiceServer
// for forward compatibility
type PostServiceServer interface {
// 创建文章
CreatePost(context.Context, *CreatePostRequest) (*CreatePostResponse, error)
// 修改文章
UpdatePost(context.Context, *UpdatePostRequest) (*RPCSuccess, error)
// 删除文章
DeletePost(context.Context, *DeletePostRequest) (*RPCSuccess, error)
// 发布文章
PublishPost(context.Context, *PublishPostRequest) (*RPCSuccess, error)
// 计算文章数量
CountPosts(context.Context, *CountPostsRequest) (*RPCCountResponse, error)
// 列出单页文章
ListPosts(context.Context, *ListPostsRequest) (*ListPostsResponse, error)
// 查询单篇文章
FindPost(context.Context, *FindPostRequest) (*FindPostResponse, error)
}
// UnimplementedPostServiceServer should be embedded to have forward compatible implementations.
type UnimplementedPostServiceServer struct {
}
func (UnimplementedPostServiceServer) CreatePost(context.Context, *CreatePostRequest) (*CreatePostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreatePost not implemented")
}
func (UnimplementedPostServiceServer) UpdatePost(context.Context, *UpdatePostRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdatePost not implemented")
}
func (UnimplementedPostServiceServer) DeletePost(context.Context, *DeletePostRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeletePost not implemented")
}
func (UnimplementedPostServiceServer) PublishPost(context.Context, *PublishPostRequest) (*RPCSuccess, error) {
return nil, status.Errorf(codes.Unimplemented, "method PublishPost not implemented")
}
func (UnimplementedPostServiceServer) CountPosts(context.Context, *CountPostsRequest) (*RPCCountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountPosts not implemented")
}
func (UnimplementedPostServiceServer) ListPosts(context.Context, *ListPostsRequest) (*ListPostsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListPosts not implemented")
}
func (UnimplementedPostServiceServer) FindPost(context.Context, *FindPostRequest) (*FindPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindPost not implemented")
}
// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostServiceServer will
// result in compilation errors.
type UnsafePostServiceServer interface {
mustEmbedUnimplementedPostServiceServer()
}
func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) {
s.RegisterService(&PostService_ServiceDesc, srv)
}
func _PostService_CreatePost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreatePostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).CreatePost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_CreatePost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).CreatePost(ctx, req.(*CreatePostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_UpdatePost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdatePostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).UpdatePost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_UpdatePost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).UpdatePost(ctx, req.(*UpdatePostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_DeletePost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeletePostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).DeletePost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_DeletePost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).DeletePost(ctx, req.(*DeletePostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_PublishPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PublishPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).PublishPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_PublishPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).PublishPost(ctx, req.(*PublishPostRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_CountPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountPostsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).CountPosts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_CountPosts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).CountPosts(ctx, req.(*CountPostsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_ListPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPostsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).ListPosts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_ListPosts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).ListPosts(ctx, req.(*ListPostsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PostService_FindPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindPostRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostServiceServer).FindPost(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PostService_FindPost_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostServiceServer).FindPost(ctx, req.(*FindPostRequest))
}
return interceptor(ctx, in, info, handler)
}
// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PostService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pb.PostService",
HandlerType: (*PostServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "createPost",
Handler: _PostService_CreatePost_Handler,
},
{
MethodName: "updatePost",
Handler: _PostService_UpdatePost_Handler,
},
{
MethodName: "deletePost",
Handler: _PostService_DeletePost_Handler,
},
{
MethodName: "publishPost",
Handler: _PostService_PublishPost_Handler,
},
{
MethodName: "countPosts",
Handler: _PostService_CountPosts_Handler,
},
{
MethodName: "listPosts",
Handler: _PostService_ListPosts_Handler,
},
{
MethodName: "findPost",
Handler: _PostService_FindPost_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_post.proto",
}

View File

@@ -20,13 +20,13 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 查找所有省份
// 根据国家|地区ID查找所有省份
type FindAllEnabledRegionProvincesWithCountryIdRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionCountryId int64 `protobuf:"varint,1,opt,name=regionCountryId,proto3" json:"regionCountryId,omitempty"`
RegionCountryId int64 `protobuf:"varint,1,opt,name=regionCountryId,proto3" json:"regionCountryId,omitempty"` // 国家|地区ID
}
func (x *FindAllEnabledRegionProvincesWithCountryIdRequest) Reset() {
@@ -73,7 +73,7 @@ type FindAllEnabledRegionProvincesWithCountryIdResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionProvinces []*RegionProvince `protobuf:"bytes,1,rep,name=regionProvinces,proto3" json:"regionProvinces,omitempty"`
RegionProvinces []*RegionProvince `protobuf:"bytes,1,rep,name=regionProvinces,proto3" json:"regionProvinces,omitempty"` // 省份列表
}
func (x *FindAllEnabledRegionProvincesWithCountryIdResponse) Reset() {
@@ -121,7 +121,7 @@ type FindEnabledRegionProvinceRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionProvinceId int64 `protobuf:"varint,1,opt,name=regionProvinceId,proto3" json:"regionProvinceId,omitempty"`
RegionProvinceId int64 `protobuf:"varint,1,opt,name=regionProvinceId,proto3" json:"regionProvinceId,omitempty"` // 省份ID
}
func (x *FindEnabledRegionProvinceRequest) Reset() {
@@ -168,7 +168,7 @@ type FindEnabledRegionProvinceResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionProvince *RegionProvince `protobuf:"bytes,1,opt,name=regionProvince,proto3" json:"regionProvince,omitempty"`
RegionProvince *RegionProvince `protobuf:"bytes,1,opt,name=regionProvince,proto3" json:"regionProvince,omitempty"` // 省份信息
}
func (x *FindEnabledRegionProvinceResponse) Reset() {
@@ -210,13 +210,13 @@ func (x *FindEnabledRegionProvinceResponse) GetRegionProvince() *RegionProvince
return nil
}
// 查找所有省份
// 根据国家|地区ID查找所有省份
type FindAllRegionProvincesWithRegionCountryIdRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionCountryId int64 `protobuf:"varint,1,opt,name=regionCountryId,proto3" json:"regionCountryId,omitempty"`
RegionCountryId int64 `protobuf:"varint,1,opt,name=regionCountryId,proto3" json:"regionCountryId,omitempty"` // 国家|地区ID
}
func (x *FindAllRegionProvincesWithRegionCountryIdRequest) Reset() {
@@ -263,7 +263,7 @@ type FindAllRegionProvincesWithRegionCountryIdResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionProvinces []*RegionProvince `protobuf:"bytes,1,rep,name=regionProvinces,proto3" json:"regionProvinces,omitempty"`
RegionProvinces []*RegionProvince `protobuf:"bytes,1,rep,name=regionProvinces,proto3" json:"regionProvinces,omitempty"` // 省份列表
}
func (x *FindAllRegionProvincesWithRegionCountryIdResponse) Reset() {
@@ -305,19 +305,105 @@ func (x *FindAllRegionProvincesWithRegionCountryIdResponse) GetRegionProvinces()
return nil
}
// 查找所有国家|地区的所有省份
type FindAllRegionProvincesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *FindAllRegionProvincesRequest) Reset() {
*x = FindAllRegionProvincesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_region_province_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllRegionProvincesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllRegionProvincesRequest) ProtoMessage() {}
func (x *FindAllRegionProvincesRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_region_province_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindAllRegionProvincesRequest.ProtoReflect.Descriptor instead.
func (*FindAllRegionProvincesRequest) Descriptor() ([]byte, []int) {
return file_service_region_province_proto_rawDescGZIP(), []int{6}
}
type FindAllRegionProvincesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionProvinces []*RegionProvince `protobuf:"bytes,1,rep,name=regionProvinces,proto3" json:"regionProvinces,omitempty"` // 省份列表
}
func (x *FindAllRegionProvincesResponse) Reset() {
*x = FindAllRegionProvincesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_region_province_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FindAllRegionProvincesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FindAllRegionProvincesResponse) ProtoMessage() {}
func (x *FindAllRegionProvincesResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_region_province_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FindAllRegionProvincesResponse.ProtoReflect.Descriptor instead.
func (*FindAllRegionProvincesResponse) Descriptor() ([]byte, []int) {
return file_service_region_province_proto_rawDescGZIP(), []int{7}
}
func (x *FindAllRegionProvincesResponse) GetRegionProvinces() []*RegionProvince {
if x != nil {
return x.RegionProvinces
}
return nil
}
// 查找单个省份信息
type FindRegionProvinceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionProvinceId int64 `protobuf:"varint,1,opt,name=regionProvinceId,proto3" json:"regionProvinceId,omitempty"`
RegionProvinceId int64 `protobuf:"varint,1,opt,name=regionProvinceId,proto3" json:"regionProvinceId,omitempty"` // 省份ID
}
func (x *FindRegionProvinceRequest) Reset() {
*x = FindRegionProvinceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_region_province_proto_msgTypes[6]
mi := &file_service_region_province_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -330,7 +416,7 @@ func (x *FindRegionProvinceRequest) String() string {
func (*FindRegionProvinceRequest) ProtoMessage() {}
func (x *FindRegionProvinceRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_region_province_proto_msgTypes[6]
mi := &file_service_region_province_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -343,7 +429,7 @@ func (x *FindRegionProvinceRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use FindRegionProvinceRequest.ProtoReflect.Descriptor instead.
func (*FindRegionProvinceRequest) Descriptor() ([]byte, []int) {
return file_service_region_province_proto_rawDescGZIP(), []int{6}
return file_service_region_province_proto_rawDescGZIP(), []int{8}
}
func (x *FindRegionProvinceRequest) GetRegionProvinceId() int64 {
@@ -358,13 +444,13 @@ type FindRegionProvinceResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionProvince *RegionProvince `protobuf:"bytes,1,opt,name=regionProvince,proto3" json:"regionProvince,omitempty"`
RegionProvince *RegionProvince `protobuf:"bytes,1,opt,name=regionProvince,proto3" json:"regionProvince,omitempty"` // 省份信息
}
func (x *FindRegionProvinceResponse) Reset() {
*x = FindRegionProvinceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_region_province_proto_msgTypes[7]
mi := &file_service_region_province_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -377,7 +463,7 @@ func (x *FindRegionProvinceResponse) String() string {
func (*FindRegionProvinceResponse) ProtoMessage() {}
func (x *FindRegionProvinceResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_region_province_proto_msgTypes[7]
mi := &file_service_region_province_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -390,7 +476,7 @@ func (x *FindRegionProvinceResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use FindRegionProvinceResponse.ProtoReflect.Descriptor instead.
func (*FindRegionProvinceResponse) Descriptor() ([]byte, []int) {
return file_service_region_province_proto_rawDescGZIP(), []int{7}
return file_service_region_province_proto_rawDescGZIP(), []int{9}
}
func (x *FindRegionProvinceResponse) GetRegionProvince() *RegionProvince {
@@ -406,15 +492,15 @@ type UpdateRegionProvinceCustomRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionProvinceId int64 `protobuf:"varint,1,opt,name=regionProvinceId,proto3" json:"regionProvinceId,omitempty"`
CustomName string `protobuf:"bytes,2,opt,name=customName,proto3" json:"customName,omitempty"`
CustomCodes []string `protobuf:"bytes,3,rep,name=customCodes,proto3" json:"customCodes,omitempty"`
RegionProvinceId int64 `protobuf:"varint,1,opt,name=regionProvinceId,proto3" json:"regionProvinceId,omitempty"` // 省份ID
CustomName string `protobuf:"bytes,2,opt,name=customName,proto3" json:"customName,omitempty"` // 自定义名称
CustomCodes []string `protobuf:"bytes,3,rep,name=customCodes,proto3" json:"customCodes,omitempty"` // 自定义代号
}
func (x *UpdateRegionProvinceCustomRequest) Reset() {
*x = UpdateRegionProvinceCustomRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_region_province_proto_msgTypes[8]
mi := &file_service_region_province_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -427,7 +513,7 @@ func (x *UpdateRegionProvinceCustomRequest) String() string {
func (*UpdateRegionProvinceCustomRequest) ProtoMessage() {}
func (x *UpdateRegionProvinceCustomRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_region_province_proto_msgTypes[8]
mi := &file_service_region_province_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -440,7 +526,7 @@ func (x *UpdateRegionProvinceCustomRequest) ProtoReflect() protoreflect.Message
// Deprecated: Use UpdateRegionProvinceCustomRequest.ProtoReflect.Descriptor instead.
func (*UpdateRegionProvinceCustomRequest) Descriptor() ([]byte, []int) {
return file_service_region_province_proto_rawDescGZIP(), []int{8}
return file_service_region_province_proto_rawDescGZIP(), []int{10}
}
func (x *UpdateRegionProvinceCustomRequest) GetRegionProvinceId() int64 {
@@ -510,66 +596,81 @@ var file_service_region_province_proto_rawDesc = []byte{
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72,
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72,
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x47, 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64, 0x52,
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72,
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10,
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64,
0x22, 0x58, 0x0a, 0x1a, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72,
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a,
0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x21, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69,
0x6e, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e,
0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x32, 0xee,
0x04, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63,
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x2a, 0x66, 0x69, 0x6e,
0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x12, 0x35, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e,
0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65,
0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x6d, 0x0a, 0x19, 0x66,
0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x46, 0x69, 0x6e, 0x64, 0x41,
0x6c, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5e, 0x0a, 0x1e, 0x46, 0x69, 0x6e, 0x64,
0x41, 0x6c, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63,
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0f, 0x72, 0x65,
0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50,
0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50,
0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x47, 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64,
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50,
0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x10, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49,
0x64, 0x22, 0x58, 0x0a, 0x1a, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50,
0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x3a, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x67,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x21,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x6e, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69,
0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x72, 0x65, 0x67,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a,
0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a,
0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x32,
0xcf, 0x05, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e,
0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x2a, 0x66, 0x69,
0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x12, 0x35, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x36, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63,
0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x6d, 0x0a, 0x19,
0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50,
0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52,
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x98, 0x01, 0x0a, 0x29, 0x66,
0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x25, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x98, 0x01, 0x0a, 0x29,
0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f,
0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x12, 0x34, 0x2e, 0x70, 0x62, 0x2e, 0x46,
0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x12, 0x34, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69,
0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35,
0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65,
0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x67,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69,
0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e,
0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e,
0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x1a, 0x75, 0x70,
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e,
0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e,
0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 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,
0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x35, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x57, 0x69, 0x74, 0x68, 0x52,
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x49, 0x64, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x6c,
0x6c, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73,
0x12, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x67,
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x6c, 0x6c,
0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x52,
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x1d, 0x2e,
0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f,
0x76, 0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x1a,
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x6e, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x25, 0x2e, 0x70, 0x62, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x76,
0x69, 0x6e, 0x63, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 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 (
@@ -584,7 +685,7 @@ func file_service_region_province_proto_rawDescGZIP() []byte {
return file_service_region_province_proto_rawDescData
}
var file_service_region_province_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_service_region_province_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_service_region_province_proto_goTypes = []interface{}{
(*FindAllEnabledRegionProvincesWithCountryIdRequest)(nil), // 0: pb.FindAllEnabledRegionProvincesWithCountryIdRequest
(*FindAllEnabledRegionProvincesWithCountryIdResponse)(nil), // 1: pb.FindAllEnabledRegionProvincesWithCountryIdResponse
@@ -592,32 +693,37 @@ var file_service_region_province_proto_goTypes = []interface{}{
(*FindEnabledRegionProvinceResponse)(nil), // 3: pb.FindEnabledRegionProvinceResponse
(*FindAllRegionProvincesWithRegionCountryIdRequest)(nil), // 4: pb.FindAllRegionProvincesWithRegionCountryIdRequest
(*FindAllRegionProvincesWithRegionCountryIdResponse)(nil), // 5: pb.FindAllRegionProvincesWithRegionCountryIdResponse
(*FindRegionProvinceRequest)(nil), // 6: pb.FindRegionProvinceRequest
(*FindRegionProvinceResponse)(nil), // 7: pb.FindRegionProvinceResponse
(*UpdateRegionProvinceCustomRequest)(nil), // 8: pb.UpdateRegionProvinceCustomRequest
(*RegionProvince)(nil), // 9: pb.RegionProvince
(*RPCSuccess)(nil), // 10: pb.RPCSuccess
(*FindAllRegionProvincesRequest)(nil), // 6: pb.FindAllRegionProvincesRequest
(*FindAllRegionProvincesResponse)(nil), // 7: pb.FindAllRegionProvincesResponse
(*FindRegionProvinceRequest)(nil), // 8: pb.FindRegionProvinceRequest
(*FindRegionProvinceResponse)(nil), // 9: pb.FindRegionProvinceResponse
(*UpdateRegionProvinceCustomRequest)(nil), // 10: pb.UpdateRegionProvinceCustomRequest
(*RegionProvince)(nil), // 11: pb.RegionProvince
(*RPCSuccess)(nil), // 12: pb.RPCSuccess
}
var file_service_region_province_proto_depIdxs = []int32{
9, // 0: pb.FindAllEnabledRegionProvincesWithCountryIdResponse.regionProvinces:type_name -> pb.RegionProvince
9, // 1: pb.FindEnabledRegionProvinceResponse.regionProvince:type_name -> pb.RegionProvince
9, // 2: pb.FindAllRegionProvincesWithRegionCountryIdResponse.regionProvinces:type_name -> pb.RegionProvince
9, // 3: pb.FindRegionProvinceResponse.regionProvince:type_name -> pb.RegionProvince
0, // 4: pb.RegionProvinceService.findAllEnabledRegionProvincesWithCountryId:input_type -> pb.FindAllEnabledRegionProvincesWithCountryIdRequest
2, // 5: pb.RegionProvinceService.findEnabledRegionProvince:input_type -> pb.FindEnabledRegionProvinceRequest
4, // 6: pb.RegionProvinceService.findAllRegionProvincesWithRegionCountryId:input_type -> pb.FindAllRegionProvincesWithRegionCountryIdRequest
6, // 7: pb.RegionProvinceService.findRegionProvince:input_type -> pb.FindRegionProvinceRequest
8, // 8: pb.RegionProvinceService.updateRegionProvinceCustom:input_type -> pb.UpdateRegionProvinceCustomRequest
1, // 9: pb.RegionProvinceService.findAllEnabledRegionProvincesWithCountryId:output_type -> pb.FindAllEnabledRegionProvincesWithCountryIdResponse
3, // 10: pb.RegionProvinceService.findEnabledRegionProvince:output_type -> pb.FindEnabledRegionProvinceResponse
5, // 11: pb.RegionProvinceService.findAllRegionProvincesWithRegionCountryId:output_type -> pb.FindAllRegionProvincesWithRegionCountryIdResponse
7, // 12: pb.RegionProvinceService.findRegionProvince:output_type -> pb.FindRegionProvinceResponse
10, // 13: pb.RegionProvinceService.updateRegionProvinceCustom:output_type -> pb.RPCSuccess
9, // [9:14] is the sub-list for method output_type
4, // [4:9] 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
11, // 0: pb.FindAllEnabledRegionProvincesWithCountryIdResponse.regionProvinces:type_name -> pb.RegionProvince
11, // 1: pb.FindEnabledRegionProvinceResponse.regionProvince:type_name -> pb.RegionProvince
11, // 2: pb.FindAllRegionProvincesWithRegionCountryIdResponse.regionProvinces:type_name -> pb.RegionProvince
11, // 3: pb.FindAllRegionProvincesResponse.regionProvinces:type_name -> pb.RegionProvince
11, // 4: pb.FindRegionProvinceResponse.regionProvince:type_name -> pb.RegionProvince
0, // 5: pb.RegionProvinceService.findAllEnabledRegionProvincesWithCountryId:input_type -> pb.FindAllEnabledRegionProvincesWithCountryIdRequest
2, // 6: pb.RegionProvinceService.findEnabledRegionProvince:input_type -> pb.FindEnabledRegionProvinceRequest
4, // 7: pb.RegionProvinceService.findAllRegionProvincesWithRegionCountryId:input_type -> pb.FindAllRegionProvincesWithRegionCountryIdRequest
6, // 8: pb.RegionProvinceService.findAllRegionProvinces:input_type -> pb.FindAllRegionProvincesRequest
8, // 9: pb.RegionProvinceService.findRegionProvince:input_type -> pb.FindRegionProvinceRequest
10, // 10: pb.RegionProvinceService.updateRegionProvinceCustom:input_type -> pb.UpdateRegionProvinceCustomRequest
1, // 11: pb.RegionProvinceService.findAllEnabledRegionProvincesWithCountryId:output_type -> pb.FindAllEnabledRegionProvincesWithCountryIdResponse
3, // 12: pb.RegionProvinceService.findEnabledRegionProvince:output_type -> pb.FindEnabledRegionProvinceResponse
5, // 13: pb.RegionProvinceService.findAllRegionProvincesWithRegionCountryId:output_type -> pb.FindAllRegionProvincesWithRegionCountryIdResponse
7, // 14: pb.RegionProvinceService.findAllRegionProvinces:output_type -> pb.FindAllRegionProvincesResponse
9, // 15: pb.RegionProvinceService.findRegionProvince:output_type -> pb.FindRegionProvinceResponse
12, // 16: pb.RegionProvinceService.updateRegionProvinceCustom:output_type -> pb.RPCSuccess
11, // [11:17] is the sub-list for method output_type
5, // [5:11] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_service_region_province_proto_init() }
@@ -701,7 +807,7 @@ func file_service_region_province_proto_init() {
}
}
file_service_region_province_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindRegionProvinceRequest); i {
switch v := v.(*FindAllRegionProvincesRequest); i {
case 0:
return &v.state
case 1:
@@ -713,7 +819,7 @@ func file_service_region_province_proto_init() {
}
}
file_service_region_province_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindRegionProvinceResponse); i {
switch v := v.(*FindAllRegionProvincesResponse); i {
case 0:
return &v.state
case 1:
@@ -725,6 +831,30 @@ func file_service_region_province_proto_init() {
}
}
file_service_region_province_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindRegionProvinceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_region_province_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FindRegionProvinceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_region_province_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateRegionProvinceCustomRequest); i {
case 0:
return &v.state
@@ -743,7 +873,7 @@ func file_service_region_province_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_region_province_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},

Some files were not shown because too many files have changed in this diff Show More