Compare commits
374 Commits
Author | SHA1 | Date | |
---|---|---|---|
bb7184c480 | |||
633c903f33 | |||
eea1b146eb | |||
6848e73ac6 | |||
f0c81cc22f | |||
6406396d75 | |||
b8e9353a99 | |||
58abfab434 | |||
8f5caf80bf | |||
d1181e4460 | |||
d71d77647f | |||
7934b253b0 | |||
5caf271d18 | |||
06e764dfd1 | |||
23ef741181 | |||
ef16bf69f9 | |||
24fe5e3760 | |||
7ea988ccc5 | |||
7735b710dd | |||
9546978e3c | |||
bbf093e104 | |||
4af106da5d | |||
2fc8ee5cb2 | |||
fe9f4dcc95 | |||
62efe6a80d | |||
ab135ed80e | |||
f583a771d6 | |||
cd40e1c9ca | |||
2ea9d6bc45 | |||
23cf374c95 | |||
b46286c584 | |||
9e3445319b | |||
85567c24a5 | |||
ce9deac980 | |||
e0d7b3775c | |||
b9ca6c67ef | |||
3890d74c0c | |||
b5ec90382f | |||
0d529d47db | |||
44bff5db82 | |||
422b426c37 | |||
a3703f1d52 | |||
786347f0d5 | |||
a30636b387 | |||
490b0d7787 | |||
a8f0107656 | |||
62c48b2ea9 | |||
090538be0d | |||
a6a04bf263 | |||
4344f1ff2c | |||
beb0ab72ab | |||
382a32bec4 | |||
94cf7ba83e | |||
0788c6a770 | |||
7588bf4b28 | |||
a3f38b8377 | |||
e53d3decd7 | |||
81115cee52 | |||
b51d4d39ca | |||
42eac3d70b | |||
cf413538fa | |||
42522327a5 | |||
051f4d9f1d | |||
c20c6871c9 | |||
383f8bef10 | |||
87e9701f72 | |||
e663606c78 | |||
acf472f1ef | |||
7c6edab53d | |||
320e110f8c | |||
736e3b1bd0 | |||
8cfcbf345e | |||
a6e83c162d | |||
c0be49a610 | |||
dff14a45be | |||
2facb5c0fb | |||
686a57ebc5 | |||
bc17428bd6 | |||
301e94808d | |||
6eb8e2cef8 | |||
293f3e5c09 | |||
d96222ba1e | |||
d1d305a638 | |||
3a94e21ab3 | |||
2757de0f03 | |||
480551a738 | |||
e1d750c24a | |||
a9474f1a3d | |||
17e3b6513f | |||
e97bd859fc | |||
eaf04ae02d | |||
03adb50fee | |||
bf28865012 | |||
48a47a8681 | |||
65c14cc10c | |||
0c682db6e8 | |||
543514dae9 | |||
e1fbbfce04 | |||
42b6c1262d | |||
1ba87f9c30 | |||
d42b82381e | |||
62a0a2c0af | |||
65f12cc019 | |||
5c84210272 | |||
ac79481ec5 | |||
039cd019e9 | |||
b39f315ac2 | |||
be6d4dbb63 | |||
1424e76f54 | |||
613057182e | |||
ac5fe7a266 | |||
ef2a15879c | |||
a4e8774077 | |||
70fe9ae034 | |||
eebaada8f6 | |||
4495e996cb | |||
8ba1cd7101 | |||
c98591b2bb | |||
e250a5dbc9 | |||
096f691067 | |||
d00a4d48ad | |||
661eb9c72a | |||
5aaf8d92bf | |||
8f8e28ca3d | |||
e2fb31e67d | |||
7b76dd5142 | |||
28cd572cbd | |||
8d28627e5f | |||
5ad6d318e0 | |||
1fc1ea9285 | |||
e1df94bb5e | |||
0a5cb9f175 | |||
d14dbaaf99 | |||
3fa1bfcb2a | |||
4643de4f6e | |||
cd2d8863a7 | |||
ef5362e1c4 | |||
c796d3f507 | |||
9460473581 | |||
73537c1a21 | |||
6558e373c6 | |||
6f52c9ff98 | |||
9f5948a253 | |||
3e5d70a8a3 | |||
1d62e95910 | |||
980880533c | |||
58eb0d0b52 | |||
cee0d67de1 | |||
55c74ea17c | |||
f064802fcb | |||
31d401e213 | |||
c1dc0821e9 | |||
80fd028885 | |||
d0a51000d0 | |||
8a13754309 | |||
eb99e251bf | |||
7bc66c7107 | |||
b29c2fcad3 | |||
c07d4a3abb | |||
de1ad8e06e | |||
87fed2c831 | |||
af9a59227f | |||
ac14cabe1b | |||
4d8b89c68c | |||
1e6e026aae | |||
0fb393e9ed | |||
21f6837fec | |||
e9120402af | |||
92364e194f | |||
abe68c7f6e | |||
6c194a0646 | |||
cde4488548 | |||
638f2a9554 | |||
aac5d05d13 | |||
d415621631 | |||
f9921d2ba0 | |||
549b5f05c6 | |||
c1ad440e83 | |||
7b2b64e8f6 | |||
ff25d74c61 | |||
16a7f5ed78 | |||
f65fe9d5aa | |||
156e127776 | |||
e370308b10 | |||
cf18598b96 | |||
c5ee0d1ae7 | |||
f3e0ae8672 | |||
9839f3b358 | |||
0fbc4a4f87 | |||
98168623b1 | |||
6f16137b43 | |||
905d2077d3 | |||
057565b0aa | |||
bf21a5b906 | |||
f10b996656 | |||
32cf742fa8 | |||
9ecc24cbbe | |||
de4389b6f1 | |||
f90be904e4 | |||
2827c3a921 | |||
4269f34670 | |||
d332b0e1d4 | |||
cc591a2e04 | |||
8000f56c06 | |||
d47c033d7b | |||
3e16c413e5 | |||
cb84e6195d | |||
59ed859aae | |||
e5efa596d9 | |||
bfef9134b7 | |||
3c4375964e | |||
e26c9f0c51 | |||
3533242855 | |||
d3b16ace79 | |||
701b27215f | |||
b991b6f7d8 | |||
f41e053e08 | |||
b75a07c4dd | |||
eb3e1f809b | |||
f8c6a2ff96 | |||
48c27ae476 | |||
cb7e875f2d | |||
1617c6170d | |||
025d64087f | |||
8d56ba48f6 | |||
f987f964b5 | |||
3c5f500c6d | |||
dd7b217748 | |||
2db47664a3 | |||
6fd82f1770 | |||
9402bad9fd | |||
19e1ce9182 | |||
f86d6b5db6 | |||
f2277fa337 | |||
39fc87c859 | |||
637fc47188 | |||
1bab9a17e6 | |||
f36758d8ac | |||
ba65fbe5b7 | |||
0907469573 | |||
ae0c5f0c84 | |||
625ed25b67 | |||
c4e72efcb5 | |||
d6216c1103 | |||
e01ea1d9c2 | |||
94f01d2ee1 | |||
c81b87d824 | |||
584938b537 | |||
ed8844be34 | |||
48343889e2 | |||
ae7b87aa17 | |||
bef40ad0f1 | |||
a41962ba8d | |||
bb36d88c98 | |||
0d28141f65 | |||
73ad76501c | |||
99cfbbf6f7 | |||
d4b50302fa | |||
e447ff1d42 | |||
8449969682 | |||
a439342ba2 | |||
129d3fafa1 | |||
b71fef10ef | |||
b979be1484 | |||
cd79fe7319 | |||
8d9260aca5 | |||
34a724268a | |||
6ae9395add | |||
4a30ddad23 | |||
11b0192a23 | |||
fb076dd4db | |||
a63b001e5b | |||
76e30e9211 | |||
63da647619 | |||
a92cca188d | |||
49a935d6c6 | |||
af0fefc3bd | |||
44d5704606 | |||
816d1e108e | |||
72c1ad35b7 | |||
586d28119a | |||
449ff68d3a | |||
cc328eee8d | |||
d621faa3ca | |||
47c77fcdbb | |||
03574bd25f | |||
7c54d3ce30 | |||
3a47be645f | |||
fb48a52910 | |||
78246a5b2a | |||
347b97f9d9 | |||
ca0023a1e6 | |||
7b228e0c03 | |||
48365942d1 | |||
83c218564f | |||
1f77285201 | |||
908c7cba05 | |||
7ccebd8621 | |||
9120e6acfd | |||
a6078341ab | |||
60111dac43 | |||
463404d774 | |||
99f4ca986a | |||
df6a9db80b | |||
db54a355e8 | |||
88333063d7 | |||
dc54b70b59 | |||
8e8cc16853 | |||
d6fd804005 | |||
19b5a693d2 | |||
fc482ff71e | |||
5556a76025 | |||
c67c4da26f | |||
7008b4aa2a | |||
8f4dd8aee0 | |||
272d59af4c | |||
d067c785fb | |||
4b443be4e3 | |||
bd540ad262 | |||
3f401a304c | |||
e890bb756b | |||
ec08521aaf | |||
0e6a14f190 | |||
da05c054f3 | |||
ad2e83104d | |||
ccd0d8a1a2 | |||
ba58964238 | |||
99520e87d4 | |||
9711496a8b | |||
5d7f617c4d | |||
4f6101be68 | |||
a922813d24 | |||
78f4a98993 | |||
5a8bb4216c | |||
d9275166e7 | |||
f7a0e319b5 | |||
c250930722 | |||
0b7c37c18b | |||
ed7b95d707 | |||
34aa4f1b03 | |||
5bbf97eaf2 | |||
c1978c9ee7 | |||
73f269f847 | |||
60caecc1b9 | |||
bad9d26c8d | |||
a23504c746 | |||
8904c13e9c | |||
d0cf3bb208 | |||
7ea7eec0f7 | |||
8d43eaf18d | |||
cfef240daa | |||
8e30f6c984 | |||
4aaa28f1d7 | |||
2d0a24100e | |||
01724622b9 | |||
ef50c8626a | |||
3df1e05aef | |||
db0a50ed33 | |||
9693306b5d | |||
b4c173df5f | |||
826c06572d | |||
d0453c222d | |||
a6919e8396 | |||
2779dcc5bd | |||
8562d64dd5 | |||
2de0d9dc9b | |||
48f6eca314 | |||
a357389fac | |||
6525b6ead3 | |||
7b5fd0182a | |||
72ee1f7265 | |||
c9635a647c | |||
5ce9a70c97 | |||
69a771a0cb |
33
.gitignore
vendored
Normal file
33
.gitignore
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
*.log
|
||||
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
*.iml
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
/cmd/runtime
|
||||
/cmd/logs/*.log
|
||||
/cmd/runtime/log/*.log
|
||||
/build/*
|
8
.idea/.gitignore
vendored
8
.idea/.gitignore
vendored
@ -1,8 +0,0 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
File diff suppressed because one or more lines are too long
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="Go" enabled="true" />
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxBlameSettings">
|
||||
<option name="version" value="2" />
|
||||
</component>
|
||||
</project>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/fonchain-fiee.iml" filepath="$PROJECT_DIR$/.idea/fonchain-fiee.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
File diff suppressed because it is too large
Load Diff
@ -18,6 +18,8 @@
|
||||
syntax = "proto3";
|
||||
package account;
|
||||
import "github.com/mwitkow/go-proto-validators@v0.3.2/validator.proto";
|
||||
//import "descriptor.proto";
|
||||
//import "validator.proto";
|
||||
|
||||
option go_package = "./;account";
|
||||
|
||||
@ -25,11 +27,25 @@ service Account {
|
||||
rpc Login (LoginRequest) returns (TokenInfo) {}
|
||||
rpc RefreshToken (RefreshTokenRequest) returns (TokenInfo) {} //刷新token
|
||||
rpc Logout (DecryptJwtRequest) returns (CommonResponse) {}
|
||||
rpc WxApp (WxAppRequest) returns (WxAppResponse) {}//获取微信公众号记录
|
||||
rpc WxUserInfo (WxUserOrCreateRequest) returns (WxUserResponse) {}//获取微信用户信息
|
||||
rpc WxUserCreate (WxUserOrCreateRequest) returns (WxUserResponse) {}//创建微信用户
|
||||
rpc WxUserUpdate (WxUserUpdateRequest) returns (WxUserResponse) {}//更新微信用户
|
||||
rpc WxGetOpenIdByCode (WxGetOpenIdByCodeRequest) returns (WxGetOpenIdByCodeResponse) {}//仅校验之前发送的验证码
|
||||
rpc WxBoxLogin (WxGetOpenIdByCodeRequest) returns (WxBoxUserInfo) {}//微信小程序登陆并且获取详情
|
||||
rpc WxBoxUserInfoByOpenId (WxBoxUserInfoRequest) returns (WxBoxUserInfo) {}//微信小程序登陆并且获取详情
|
||||
rpc WxBoxTelNumByCode (WxGetOpenIdByCodeRequest) returns (WxBoxTelNumByCodeResponse) {}//小程序获取手机号
|
||||
rpc WxBoxUpdateUser (WxBoxUserInfo) returns (CommonResponse) {}//更新用户信息
|
||||
rpc WxBoxCreateUser (WxBoxUserInfo) returns (CommonResponse) {}//更新用户信息
|
||||
rpc FddCreateUser (FddCreateUserRequest) returns (CommonResponse) {}//同步法大大数据
|
||||
rpc FddUpdateUser (FddCreateUserRequest) returns (CommonResponse) {}//同步法大大数据
|
||||
rpc FddRemoveUser (FddRemoveUserRequest) returns (CommonResponse) {}//同步法大大数据
|
||||
rpc OffLine (CommonRequest) returns (CommonResponse) {}
|
||||
rpc OnlineLog (LoginInfosByUserIdRequest) returns (LoginLogsResponse) {}//根据用户id获取登录的信息
|
||||
rpc OnlineLogById (OnlineLogByIdRequest) returns (LoginLog) {}//根据用户id获取登录的信息
|
||||
rpc CheckPwd (CheckPwdRequest) returns (UpdateResponse) {}//检测密码是否正确
|
||||
// rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {}
|
||||
rpc Register (RegistRequest) returns (RequestStatus) {}
|
||||
rpc RegisterOrExist (RegistRequest) returns (RequestStatus) {}
|
||||
rpc SendMsg (SendMsgRequest) returns (SendMsgStatusResponse) {} //登陆发送验证码
|
||||
rpc SendCustomMsg (SendCustomMsgRequest) returns (SendMsgStatusResponse) {}//定制化发送内容
|
||||
rpc SendExCustomMsg (SendCustomMsgRequest) returns (SendMsgStatusResponse) {}//定制化发送内容
|
||||
@ -39,161 +55,103 @@ service Account {
|
||||
rpc UpdateTelNum (SendNewTelNumMsgRequest) returns (SendMsgStatusResponse) {}//更新新手机号,校验新号码验证码
|
||||
rpc Authentication (AuthenticationRequest) returns (RequestStatus) {}
|
||||
rpc DecryptJwt (DecryptJwtRequest) returns (DecryptJwtResponse) {}//最好放在调用方
|
||||
rpc Info (InfoRequest) returns (UserInfoResponse) {}
|
||||
rpc Info (InfoRequest) returns (InfoResponse) {}
|
||||
rpc JobNumGetInfo (JobNumGetInfoRequest) returns (InfoResponse) {}
|
||||
rpc List (ListRequest) returns (ListResponse) {}
|
||||
rpc RandList (ListRequest) returns (ListResponse) {}
|
||||
rpc ListByIDs (ListByIDsRequest) returns (ListResponse) {}
|
||||
rpc Remove (RemoveRequest) returns (RemoveResponse) {}
|
||||
rpc WriteOff (WriteOffRequest) returns (RemoveResponse) {} //用户注销
|
||||
rpc WriteOffApp (RemoveRequest) returns (RemoveResponse) {} //app用户注销
|
||||
rpc WriteOffInfo (WriteOffApproveRequest) returns (WriteOffRequest) {} //用户注销详情
|
||||
rpc FindWriteOffList (WriteOffListRequest) returns (WriteOffListResponse) {} //用户注销列表
|
||||
rpc WriteOffUpdate (WriteOffApproveRequest)returns(RemoveResponse){} //用户注销更新
|
||||
rpc Update (UpdateRequest) returns (UpdateResponse) {}
|
||||
rpc PrivacyInfo (PrivacyInfoRequest) returns (AccountInfo) {}
|
||||
rpc UsersByTel (UsersByTelRequest) returns (ListResponse) {}
|
||||
rpc UserByTel (UserByTelRequest) returns (UserInfoResponse) {}
|
||||
rpc UserByTel (UserByTelRequest) returns (InfoResponse) {}
|
||||
rpc CheckBeforeRegister (CheckBeforeRegisterRequest) returns (CommonResponse) {}
|
||||
rpc OnlySendMsg (SendMsgRequest) returns (SendMsgStatusResponse) {} //仅发验证码
|
||||
rpc OnlyCheckMsg (CheckMsgRequest) returns (SendMsgStatusResponse) {}//仅校验之前发送的验证码
|
||||
rpc CreateClockDevice(CreateClockDeviceRequest) returns(ClockDeviceResponse){} //创建打卡机设备
|
||||
rpc UpdateClockDevice(UpdateClockDeviceRequest) returns(ClockDeviceResponse){} //更新打卡机设备
|
||||
rpc RemoveClockDevice(RemoveClockDeviceRequest) returns(ClockDeviceResponse){} //删除打卡机设备
|
||||
rpc ClockDeviceList(ClockDeviceListRequest) returns(ClockDeviceListResponse){} //打卡机设备列表
|
||||
rpc ClockDeviceInfo(ClockDeviceInfoRequest) returns(ClockDeviceInfoResponse){} //打卡机设备详情
|
||||
rpc ClockDeviceSingleUntie(RemoveClockDeviceRequest) returns(ClockDeviceResponse){} //单人解绑打卡机
|
||||
rpc ClockDeviceBatchBind(ClockBatchListResponse) returns(ClockDeviceInfoResponse){} //批量绑定打卡机
|
||||
rpc ClockDeviceBatchUntie(ClockBatchBindRequest) returns(ClockDeviceInfoResponse){} //批量解绑打卡机
|
||||
rpc ClockDeviceBatchList(ClockBatchBindRequest) returns(ClockBatchListResponse){} //查询绑定关系
|
||||
rpc UpdateDeviceRelevance(ClockUserDeviceBatch) returns(ClockDeviceResponse){} //更新绑定中间表
|
||||
rpc MailAccountByNickName(MailAccountByNickNameRequest) returns(MaiAccountResponse){} //根据昵称姓名获取昵称的邮箱和拼音名称
|
||||
rpc CreateMaiAccount(CreateMaiAccountRequest) returns(CommonResponse){} //生成邮箱号
|
||||
rpc CreateClockLog(ClockLogInfo) returns(ClockDeviceResponse){} //创建打卡记录
|
||||
rpc SendClockInWechat(SendClockInWechatRequest) returns(CommonResponse){} //发送模版消息
|
||||
rpc FindClockLogList(ClockLogReq) returns(ClockLogListResponse){} //查看打卡记录
|
||||
rpc SendStrangerClockInWechat(SendClockInWechatRequest) returns(CommonResponse){} //发送陌生人模版消息
|
||||
rpc ListV2 (ListV2Request) returns (ListResponse) {}// 新版列表 查询
|
||||
rpc QueryPersonnelWithTheSameName (QueryPersonnelWithTheSameNameRequest) returns (QueryPersonnelWithTheSameNameResponse) {}// 查询同名的员工
|
||||
rpc UsersByJobNum (UsersByJobNumRequest) returns (ListResponse) {}
|
||||
rpc RealName (RealNameRequest) returns (RealNameResponse) {}//实名认证
|
||||
rpc Register (RegistRequest) returns (RegisterResponse) {}//注册
|
||||
rpc UserList (UserListRequest) returns (UserListResponse) {}//用户列表
|
||||
rpc CheckRealName (CheckRealNameRequest) returns (CheckRealNameResponse) {}//审核实名
|
||||
rpc CreateChainAccount(CommonRequest) returns (CreateChainAccountResponse) {}// 新版列表 查询
|
||||
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
||||
rpc UpdateLanguage(UpdateLanguageRequest) returns (UpdateLanguageResponse) {}// 修改用户使用的语言
|
||||
rpc GenerateSliderCaptcha(GenerateSliderCaptchaRequest) returns (GenerateSliderCaptchaResponse) {}// 生成滑块验证码图片+位置
|
||||
rpc VerifySliderCaptcha(VerifySliderCaptchaRequest) returns (VerifySliderCaptchaResponse) {}// 验证滑块验证码位置
|
||||
rpc SendNationMsg (SendNationMsgRequest) returns (SendMsgStatusResponse) {} //发送境外国际短信验证码 --艺术商城
|
||||
rpc VerifySliderStatus(VerifySliderStatusRequest) returns (VerifySliderStatusResponse) {}// 验证滑块验证码状态
|
||||
rpc SampleAccount (SampleAccountRequest) returns (SampleAccountResponse) {} //同一帐号还有谁在登陆
|
||||
rpc LoginAndSqueezeOther (LoginRequest) returns (TokenInfo) {} //唯一登陆,干掉其他人
|
||||
rpc QueryPersonnelWithTheSameName (QueryPersonnelWithTheSameNameRequest) returns (QueryPersonnelWithTheSameNameResponse) {}// 查询同名的员工
|
||||
rpc UsersByJobNum (UsersByJobNumRequest) returns (ListResponse) {}
|
||||
//人脸检测
|
||||
rpc IsSamePerson(IsSamePersonRequest)returns(IsSamePersonResponse){}//是否是同一人
|
||||
rpc CreateRealNameOrPassPort(UserInfo)returns(CommonResponse){}//实名信息注册
|
||||
rpc FddCreateUserV2(FddCreateUserRequest) returns(CommonResponse){}//创建法大大
|
||||
rpc FddUserFindByUserId(UserInfo)returns(FddInfo){}//通过userid获取法大大信息
|
||||
rpc UserInfoById(InfoRequest)returns(UserInfo){}//通过userid获取实名信息
|
||||
}
|
||||
|
||||
message VerifySliderStatusRequest {
|
||||
string nonceStr = 1;
|
||||
message CheckBeforeRegisterRequest{
|
||||
string domain = 1;
|
||||
string jobNum = 2;
|
||||
string telNum = 3;
|
||||
}
|
||||
|
||||
message VerifySliderStatusResponse {
|
||||
string nonceStr = 1;
|
||||
int32 status = 2;
|
||||
message SampleAccountRequest{
|
||||
string domain = 1;
|
||||
string password = 2;
|
||||
string code = 3;
|
||||
string from = 4;
|
||||
string telNum = 5;
|
||||
}
|
||||
|
||||
message SendNationMsgRequest {
|
||||
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
||||
string TelNum = 2 [json_name = "telNum",(validator.field) = {string_not_empty: true,human_error: "70001"}];
|
||||
string Project = 3 [json_name = "project"];
|
||||
uint32 signNo = 4;
|
||||
uint32 mId = 5;
|
||||
string scope = 6;//标记模块
|
||||
}
|
||||
message VerifySliderCaptchaResponse {
|
||||
string nonceStr = 1;
|
||||
message SampleAccountResponse{
|
||||
bool isNowAlreadyLogin = 1;
|
||||
uint32 num = 2;// 同时在线的数量
|
||||
}
|
||||
|
||||
message VerifySliderCaptchaRequest {
|
||||
string nonceStr = 1;
|
||||
float blockX = 2;
|
||||
}
|
||||
message GenerateSliderCaptchaResponse {
|
||||
string nonceStr = 1;
|
||||
string canvasSrc = 2;
|
||||
string blockSrc = 3;
|
||||
uint64 blockY = 4;
|
||||
uint64 faceY = 5;
|
||||
uint64 blockX = 6;
|
||||
message LoginAndSqueezeOtherResponse{
|
||||
string needDetectImageUrl = 1;
|
||||
string recentImageUrl = 2;
|
||||
}
|
||||
|
||||
message GenerateSliderCaptchaRequest {
|
||||
uint64 canvasWidth = 1;
|
||||
uint64 canvasHeight = 2;
|
||||
uint64 blockWidth = 3;
|
||||
uint64 blockHeight = 4;
|
||||
uint64 blockRadius = 5;
|
||||
uint64 place = 6;
|
||||
message IsSamePersonResponse{
|
||||
bool isPass = 1;
|
||||
uint32 rate = 2;//相似度
|
||||
string message = 3;//相似度
|
||||
}
|
||||
message CheckRealNameResponse{
|
||||
uint64 id =1;
|
||||
string status =2;
|
||||
|
||||
message IsSamePersonRequest{
|
||||
string needDetectImageUrl = 1;
|
||||
string recentImageUrl = 2;
|
||||
}
|
||||
message CheckRealNameRequest{
|
||||
uint64 id = 1;
|
||||
bool pass = 2;
|
||||
string notPassRemarks = 3;
|
||||
|
||||
message UpdatePassportStatusRequest{
|
||||
uint32 ID = 1;
|
||||
uint32 status = 2;
|
||||
}
|
||||
message UserListResponse{
|
||||
uint64 count = 1;
|
||||
uint64 page = 2;
|
||||
uint64 pageSize = 3;
|
||||
repeated UserListInfo userList = 4;
|
||||
}
|
||||
message UserListInfo{
|
||||
uint64 id = 1;
|
||||
int32 status = 2;
|
||||
string name = 3;
|
||||
string sex = 4;
|
||||
string nationality = 5;
|
||||
int32 documentType =6;
|
||||
string certificatePicture = 7;
|
||||
string validity = 8;
|
||||
string placeOfResidence = 9;
|
||||
string groupPhoto = 10;
|
||||
string attachment = 11;
|
||||
string registrationTime = 12;
|
||||
string auditTime = 13;
|
||||
string subNum = 14;
|
||||
string notPassRemarks = 15;
|
||||
string telNum = 16;
|
||||
string telAreaCode = 17;
|
||||
string language = 18;
|
||||
string subscriberNumber = 19;
|
||||
string nickName = 20;
|
||||
}
|
||||
message UserListRequest{
|
||||
string domain = 1;
|
||||
string subNum = 2;
|
||||
int32 realNameOrNot = 3;
|
||||
string name = 4;
|
||||
string sex = 5;
|
||||
int32 documentType = 6;
|
||||
int32 auditStatus = 7;
|
||||
uint64 page = 8;
|
||||
uint64 pageSize = 9;
|
||||
}
|
||||
message UserInfoResponse{
|
||||
uint64 id = 1;
|
||||
int32 status = 2;
|
||||
string name = 3;
|
||||
string sex = 4;
|
||||
string nationality = 5;
|
||||
int32 documentType =6;
|
||||
string certificatePicture = 7;
|
||||
string validity = 8;
|
||||
string placeOfResidence = 9;
|
||||
string groupPhoto = 10;
|
||||
string attachment = 11;
|
||||
string subNum = 12;
|
||||
string notPassRemarks = 13;
|
||||
string domain = 14;
|
||||
string language = 15;
|
||||
string subscriberNumber = 16;
|
||||
string nickName = 17;
|
||||
string telNum = 18;
|
||||
}
|
||||
message RealNameResponse{
|
||||
uint64 id = 1;
|
||||
string status = 2;
|
||||
}
|
||||
message RealNameRequest{
|
||||
uint64 id = 1;
|
||||
string name = 2;
|
||||
string sex = 3;
|
||||
string nationality = 4;
|
||||
int32 documentType = 5;
|
||||
string certificatePicture = 6;
|
||||
string validity = 7;
|
||||
string placeOfResidence = 8;
|
||||
string groupPhoto = 9;
|
||||
string attachment = 10;
|
||||
}
|
||||
message RegisterResponse{
|
||||
uint64 ID = 1;
|
||||
uint64 status = 2;
|
||||
string token = 3;
|
||||
|
||||
message CreateChainAccountResponse {
|
||||
string account = 1 ;
|
||||
string men = 2 ;
|
||||
string publicKey = 3 ;
|
||||
}
|
||||
message UsersByJobNumRequest{
|
||||
string domain = 1 ;
|
||||
@ -227,6 +185,7 @@ message ListV2Request {
|
||||
repeated string departmentNames =16 ;
|
||||
repeated uint32 positionIds =17 ;
|
||||
repeated uint32 departmentIds =18 ;
|
||||
uint32 fatherDepartmentId =19 ;
|
||||
}
|
||||
|
||||
message SendClockInWechatRequest {
|
||||
@ -256,13 +215,19 @@ message MaiAccountResponse {
|
||||
string mailAccount = 2;
|
||||
}
|
||||
|
||||
message FddRemoveUserRequest {
|
||||
uint32 wxUserId = 2;
|
||||
}
|
||||
|
||||
message FddCreateUserRequest {
|
||||
string openid = 1 ;
|
||||
uint32 wxUserId = 2;
|
||||
//string UserId = 3;
|
||||
uint64 UserId = 3;
|
||||
string customerId = 4;
|
||||
bool isVerify = 5;
|
||||
string transactionNo = 6;
|
||||
uint32 status = 7;
|
||||
string idType = 8;
|
||||
}
|
||||
|
||||
message WxBoxUserInfoRequest {
|
||||
@ -298,6 +263,8 @@ message FddInfo {
|
||||
string customerId = 2 ;
|
||||
bool isVerify = 3 ;
|
||||
string transactionNo = 4;
|
||||
uint32 status = 5;
|
||||
string idType =6;
|
||||
}
|
||||
|
||||
message UserInfo {
|
||||
@ -314,10 +281,13 @@ message UserInfo {
|
||||
string realIDImgB = 18;
|
||||
string realNameIDName = 19;
|
||||
string video = 20;
|
||||
string idType = 21; //0 护照 港澳台 护照 通信证等
|
||||
Passport passport = 22; //护照 港澳台 护照 通信证等
|
||||
}
|
||||
|
||||
message CommonRequest {
|
||||
uint64 ID = 1 [json_name = "ID"];
|
||||
string from = 2 ;
|
||||
}
|
||||
|
||||
message WxAppRequest {
|
||||
@ -418,7 +388,6 @@ message SendMsgRequest {
|
||||
uint32 mId = 5;
|
||||
string scope = 6; //标记模块
|
||||
string zone = 7; //地区 不同地区切换不同发送帐号
|
||||
string nonceStr = 8;
|
||||
}
|
||||
|
||||
message SendCustomMsgRequest {
|
||||
@ -437,7 +406,6 @@ message CheckMsgRequest {
|
||||
string TelNum = 2 [json_name = "telNum"];
|
||||
string Code = 3 [json_name = "code",(validator.field) = {string_not_empty: true,human_error: "70003"} ];
|
||||
string scope = 4;//标记模块
|
||||
string zone = 5; //地区 不同地区切换不同发送帐号
|
||||
}
|
||||
|
||||
message SendMsgStatusResponse {
|
||||
@ -488,9 +456,31 @@ message RemoveResponse {
|
||||
|
||||
message UpdateRequest {
|
||||
uint64 ID = 1 [json_name = "ID"]; //ID
|
||||
string Domain = 2 [json_name = "domain"];
|
||||
string Language = 3 [json_name = "language"];
|
||||
string NickName = 4 [json_name = "nickName"];
|
||||
string Domain = 2 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
||||
string NickName = 3 [json_name = "nickName"];
|
||||
string Password = 4 [json_name = "password"]; //密码
|
||||
string Avatar = 5 [json_name = "avatar"]; //头像
|
||||
string Status = 7 [json_name = "status"];
|
||||
string TelNum = 8 [json_name = "telNum"];
|
||||
string EnterDate = 14 [json_name = "enterDate"];
|
||||
Extend Extend = 17 [json_name = "extend"];
|
||||
string Title = 18 [json_name = "title"];
|
||||
string JobNum = 19 [json_name = "jobNum"];
|
||||
string BirthDate = 20 [json_name = "birthDate"];
|
||||
uint64 Sex = 21 [json_name = "sex"];
|
||||
string IdNum = 22 [json_name = "idNum"];
|
||||
string RealName = 23 [json_name = "realName"];
|
||||
string InvitationCode = 24 [json_name = "invitationCode"];
|
||||
string LeftDate = 25 [json_name = "leftDate"];
|
||||
string Remark = 26 [json_name = "remark"];
|
||||
string RecentImg = 27 [json_name = "recentImg"];
|
||||
string ICNum = 28 [json_name = "icNum"];
|
||||
string Train = 29 [json_name = "train"];
|
||||
string Certificate = 30 [json_name = "certificate"];
|
||||
repeated trainVideo TrainVideos = 31 [json_name = "trainVideos"];
|
||||
Operator operator = 32;
|
||||
string SecurityCode = 33 [json_name = "securityCode"];
|
||||
UserExtend userExtend = 34 ;
|
||||
}
|
||||
|
||||
message Operator {
|
||||
@ -523,6 +513,18 @@ message ListRequest {
|
||||
string telNum = 6;
|
||||
string startEnterDate = 7;
|
||||
string endEnterDate = 8;
|
||||
string nickName = 9;
|
||||
uint32 isReal = 10;
|
||||
uint32 isMainLand = 11;
|
||||
string fromCode = 12;
|
||||
string bankName = 13;
|
||||
string bankNo = 14;
|
||||
uint32 sex = 15;
|
||||
string startRealTime = 16;
|
||||
string endRealTime = 17;
|
||||
string endCreatedAt = 18;
|
||||
string startCreatedAt = 19;
|
||||
string realName = 20;
|
||||
}
|
||||
|
||||
message ListResponse {
|
||||
@ -550,6 +552,7 @@ message DecryptJwtResponse {
|
||||
string Account = 3 [json_name = "account"];
|
||||
string NickName = 4 [json_name = "nickName"];
|
||||
bool IsOffline = 5 [json_name = "isOffline"];
|
||||
string offlineCode = 6 ;//下线的原因
|
||||
}
|
||||
|
||||
message DecryptJwtRequest {
|
||||
@ -575,23 +578,68 @@ message RequestStatus {
|
||||
}
|
||||
|
||||
message RegistRequest {
|
||||
string domain = 1;
|
||||
string telNum = 2;
|
||||
string code = 3;
|
||||
string address = 4;
|
||||
string telAreaCode = 5;
|
||||
string language = 6;
|
||||
string nickName = 7;
|
||||
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"}];
|
||||
string NickName = 2 [json_name = "nickName",(validator.field) = {length_lt: 20,string_not_empty: true,human_error: "70005"}];
|
||||
string TelNum = 3 [json_name = "telNum"];
|
||||
string Password = 4 [json_name = "password",(validator.field) = {length_gt: 5,human_error: "70007"}]; //密码
|
||||
string Avatar = 5 [json_name = "avatar"]; //头像
|
||||
string EnterDate = 14 [json_name = "enterDate"];
|
||||
Extend Extend = 15 [json_name = "extend"];
|
||||
string JobNum = 16 [json_name = "JobNum"]; //工号
|
||||
string Code = 17 [json_name = "code"]; //工号
|
||||
string IdNum = 18 [json_name = "idNum"]; //年龄
|
||||
string RealName = 19 [json_name = "realName"]; //
|
||||
string RecentImg = 20;
|
||||
string RealIDImgA = 21;
|
||||
string RealIDImgB = 22;
|
||||
string Video = 23;
|
||||
string ICNum = 24;
|
||||
string Train = 25;
|
||||
string Certificate = 26;
|
||||
string Source =27;
|
||||
Operator operator = 28;
|
||||
string Status =29;
|
||||
string BlockAddr = 30;
|
||||
Passport passport = 31; //护照 港澳台 护照 通信证等
|
||||
string leftDate = 32; //离职时间
|
||||
UserExtend UserExtend= 33; //离职时间
|
||||
}
|
||||
|
||||
message UserExtend {
|
||||
string id = 1;
|
||||
string uuid = 2;
|
||||
string userID = 3;
|
||||
string address = 4;
|
||||
string bankName = 5;
|
||||
string bankNo = 6;
|
||||
string zone = 7;
|
||||
uint32 isMainland = 8;
|
||||
uint32 isReal = 9; //是否实名
|
||||
string fromCode = 10; // 99999
|
||||
string realTime = 11; // 实名信息时间
|
||||
string realName = 12; // 实名信息时间
|
||||
string idType = 13; //证件类型
|
||||
string idNo = 14; //证件号码
|
||||
}
|
||||
|
||||
message Passport {
|
||||
string idNum = 1; //编号
|
||||
string realIDImgA = 2;//正反面
|
||||
string realIDImgB = 3;//正反面
|
||||
string name = 4; //名字
|
||||
string idType = 5; //法大大 保持一致 "0"身份证号 "1" 护照号 "B" 港澳居民来往内地通行证号 "C" 台湾居民来往大陆通行证号
|
||||
}
|
||||
|
||||
message LoginRequest {
|
||||
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
||||
//string TelNum = 2 [json_name = "telNum",(validator.field) = {regex: "^1\\d{10}$",human_error: "70002"}];
|
||||
string TelNum = 2 [json_name = "telNum"];
|
||||
string Code = 3 [json_name = "code"];
|
||||
string Password = 4 [json_name = "password"];
|
||||
string Ip = 5 [json_name = "ip"];
|
||||
bool passCheckIp = 6 ;
|
||||
string telAreaCode = 7;
|
||||
string from = 7 [json_name = "from"]; //登陆来源 PC 还是 h5 之类的
|
||||
string zone = 8;
|
||||
}
|
||||
|
||||
message TokenInfo {
|
||||
@ -621,7 +669,7 @@ message AccountInfo {
|
||||
string NickName = 3 [json_name = "nickName"];
|
||||
int64 Type = 4 [json_name = "type"];
|
||||
string TelNum = 5 [json_name = "telNum"];
|
||||
int32 Status = 6 [json_name = "status"];
|
||||
string Status = 6 [json_name = "status"];
|
||||
string Avatar = 7 [json_name = "avatar"];
|
||||
string CreateAt = 8 [json_name = "createAt"];
|
||||
uint64 RealNameID = 9 [json_name = "realNameID"];
|
||||
@ -636,7 +684,7 @@ message AccountInfo {
|
||||
string JobNum = 18 [json_name = "jobNum"];
|
||||
string BirthDate = 19 [json_name = "birth_date"];
|
||||
uint64 Age = 20 [json_name = "age"];
|
||||
string Sex = 21 [json_name = "sex"];
|
||||
uint64 Sex = 21 [json_name = "sex"];
|
||||
string Title = 22 [json_name = "title"];
|
||||
repeated Department Departments = 23 [json_name = "departments"];
|
||||
string Ip = 24 [json_name = "ip"];
|
||||
@ -659,6 +707,8 @@ message AccountInfo {
|
||||
string updatedAt = 41;
|
||||
string SecurityCode = 42 [json_name = "securityCode"];
|
||||
string BlockAddr = 43 [json_name = "blockAddr"];
|
||||
string Language = 44 [json_name = "language"];
|
||||
UserExtend userExtend = 45 ;
|
||||
}
|
||||
|
||||
message UserInfoV2 {
|
||||
@ -818,3 +868,61 @@ message ClockLogListResponse{
|
||||
repeated ClockLogInfo data =1;
|
||||
uint64 count = 2;
|
||||
}
|
||||
|
||||
message SendNationMsgRequest {
|
||||
string Domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
||||
string TelNum = 2 [json_name = "telNum",(validator.field) = {string_not_empty: true,human_error: "70001"}];
|
||||
string Project = 3 [json_name = "project"];
|
||||
uint32 signNo = 4;
|
||||
uint32 mId = 5;
|
||||
string scope = 6;//标记模块
|
||||
}
|
||||
|
||||
message UpdateLanguageRequest {
|
||||
string domain = 1 [json_name = "domain",(validator.field) = {string_not_empty: true,human_error: "70001"} ];
|
||||
uint64 ID = 2;
|
||||
string language = 3;
|
||||
}
|
||||
|
||||
message UpdateLanguageResponse {
|
||||
uint64 ID = 1;
|
||||
string telNum = 2;
|
||||
string language = 3;
|
||||
}
|
||||
|
||||
message GenerateSliderCaptchaRequest {
|
||||
uint64 canvasWidth = 1;
|
||||
uint64 canvasHeight = 2;
|
||||
uint64 blockWidth = 3;
|
||||
uint64 blockHeight = 4;
|
||||
uint64 blockRadius = 5;
|
||||
uint64 place = 6;
|
||||
}
|
||||
|
||||
message GenerateSliderCaptchaResponse {
|
||||
string nonceStr = 1;
|
||||
string canvasSrc = 2;
|
||||
string blockSrc = 3;
|
||||
uint64 blockY = 4;
|
||||
uint64 faceY = 5;
|
||||
uint64 blockX = 6;
|
||||
}
|
||||
|
||||
message VerifySliderCaptchaRequest {
|
||||
string nonceStr = 1;
|
||||
float blockX = 2;
|
||||
}
|
||||
|
||||
message VerifySliderCaptchaResponse {
|
||||
string nonceStr = 1;
|
||||
}
|
||||
|
||||
message VerifySliderStatusRequest {
|
||||
string nonceStr = 1;
|
||||
}
|
||||
|
||||
message VerifySliderStatusResponse {
|
||||
string nonceStr = 1;
|
||||
int32 status = 2;
|
||||
}
|
||||
|
||||
|
@ -17,65 +17,28 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *VerifySliderStatusRequest) Validate() error {
|
||||
func (this *CheckBeforeRegisterRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderStatusResponse) Validate() error {
|
||||
func (this *SampleAccountRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SendNationMsgRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
if this.TelNum == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70001`))
|
||||
}
|
||||
func (this *SampleAccountResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderCaptchaResponse) Validate() error {
|
||||
func (this *LoginAndSqueezeOtherResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderCaptchaRequest) Validate() error {
|
||||
func (this *IsSamePersonResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GenerateSliderCaptchaResponse) Validate() error {
|
||||
func (this *IsSamePersonRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GenerateSliderCaptchaRequest) Validate() error {
|
||||
func (this *UpdatePassportStatusRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CheckRealNameResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CheckRealNameRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UserListResponse) Validate() error {
|
||||
for _, item := range this.UserList {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("UserList", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UserListInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UserListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UserInfoResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RealNameResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RealNameRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RegisterResponse) Validate() error {
|
||||
func (this *CreateChainAccountResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UsersByJobNumRequest) Validate() error {
|
||||
@ -114,6 +77,9 @@ func (this *CreateMaiAccountRequest) Validate() error {
|
||||
func (this *MaiAccountResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FddRemoveUserRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FddCreateUserRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -146,6 +112,11 @@ func (this *FddInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UserInfo) Validate() error {
|
||||
if this.Passport != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Passport); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Passport", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CommonRequest) Validate() error {
|
||||
@ -280,6 +251,31 @@ func (this *RemoveResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
if this.Extend != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Extend", err)
|
||||
}
|
||||
}
|
||||
for _, item := range this.TrainVideos {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("TrainVideos", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if this.Operator != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Operator", err)
|
||||
}
|
||||
}
|
||||
if this.UserExtend != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.UserExtend); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("UserExtend", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Operator) Validate() error {
|
||||
@ -346,6 +342,44 @@ func (this *RequestStatus) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RegistRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
if this.NickName == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`))
|
||||
}
|
||||
if !(len(this.NickName) < 20) {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`))
|
||||
}
|
||||
if !(len(this.Password) > 5) {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Password", fmt.Errorf(`70007`))
|
||||
}
|
||||
if this.Extend != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Extend", err)
|
||||
}
|
||||
}
|
||||
if this.Operator != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Operator", err)
|
||||
}
|
||||
}
|
||||
if this.Passport != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Passport); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Passport", err)
|
||||
}
|
||||
}
|
||||
if this.UserExtend != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.UserExtend); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("UserExtend", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UserExtend) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Passport) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *LoginRequest) Validate() error {
|
||||
@ -407,6 +441,11 @@ func (this *AccountInfo) Validate() error {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Operator", err)
|
||||
}
|
||||
}
|
||||
if this.UserExtend != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.UserExtend); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("UserExtend", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UserInfoV2) Validate() error {
|
||||
@ -522,3 +561,39 @@ func (this *ClockLogListResponse) Validate() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *SendNationMsgRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
if this.TelNum == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateLanguageRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateLanguageResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GenerateSliderCaptchaRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GenerateSliderCaptchaResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderCaptchaRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderCaptchaResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderStatusRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderStatusResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
13706
api/accountFiee/accountFiee.pb.go
Normal file
13706
api/accountFiee/accountFiee.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
1062
api/accountFiee/accountFiee.proto
Normal file
1062
api/accountFiee/accountFiee.proto
Normal file
File diff suppressed because it is too large
Load Diff
699
api/accountFiee/accountFiee.validator.pb.go
Normal file
699
api/accountFiee/accountFiee.validator.pb.go
Normal file
@ -0,0 +1,699 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: api/accountFiee/accountFiee.proto
|
||||
|
||||
package accountFiee
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
_ "github.com/mwitkow/go-proto-validators"
|
||||
regexp "regexp"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *VerifySliderStatusRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderStatusResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SendNationMsgRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
if this.TelNum == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderCaptchaResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *VerifySliderCaptchaRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GenerateSliderCaptchaResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GenerateSliderCaptchaRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CheckRealNameResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CheckRealNameRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UserListResponse) Validate() error {
|
||||
for _, item := range this.UserList {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("UserList", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UserListInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UserListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UserInfoResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RealNameResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RealNameRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RegisterResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UsersByJobNumRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *QueryPersonnelWithTheSameNameRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *QueryPersonnelWithTheSameNameResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListV2Request) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *SendClockInWechatRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *MailAccountByNickNameRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
if this.NickName == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`))
|
||||
}
|
||||
if !(len(this.NickName) < 20) {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateMaiAccountRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *MaiAccountResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FddCreateUserRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WxBoxUserInfoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WxGetOpenIdByCodeRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WxGetOpenIdByCodeResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WxBoxTelNumByCodeResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WxBoxUserInfo) Validate() error {
|
||||
if this.User != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.User); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("User", err)
|
||||
}
|
||||
}
|
||||
if this.Fdd != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Fdd); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Fdd", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *FddInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UserInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CommonRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WxAppRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WxAppResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WxUserUpdateRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WxUserOrCreateRequest) Validate() error {
|
||||
if this.OpenID == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("OpenID", fmt.Errorf(`缺少openid`))
|
||||
}
|
||||
if this.GhID == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("GhID", fmt.Errorf(`缺少参数ghid`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *WxUserResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *LoginLogsResponse) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *LoginLog) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OnlineLogByIdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *LoginInfosByUserIdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SendNewTelNumMsgRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UserByTelRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CommonResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UsersByTelRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ListByIDsRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *SendMsgRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var _regex_SendCustomMsgRequest_TelNum = regexp.MustCompile(`^1\d{10}$`)
|
||||
|
||||
func (this *SendCustomMsgRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
if !_regex_SendCustomMsgRequest_TelNum.MatchString(this.TelNum) {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70002`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CheckMsgRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
if this.Code == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Code", fmt.Errorf(`70003`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *SendMsgStatusResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RemoveRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
if !(this.ID > 0) {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ID", fmt.Errorf(`70004`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *WriteOffRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WriteOffListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WriteOffApproveRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WriteOffListResponse) Validate() error {
|
||||
for _, item := range this.WriteOffList {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("WriteOffList", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *RemoveResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Operator) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TrainVideo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PrivacyInfoRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ListRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ListResponse) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *InfoRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *InfoResponse) Validate() error {
|
||||
if this.Info != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Info); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Info", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DecryptJwtResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DecryptJwtRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CheckPwdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *AuthenticationRequest) Validate() error {
|
||||
if !(len(this.IDNum) == 18) {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("IDNum", fmt.Errorf(`70006`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *RequestStatus) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RegistRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *LoginRequest) Validate() error {
|
||||
if this.Domain == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *TokenInfo) Validate() error {
|
||||
if this.AccountInfo != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.AccountInfo); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("AccountInfo", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Extend) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Department) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *AccountInfo) Validate() error {
|
||||
if this.Extend != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Extend", err)
|
||||
}
|
||||
}
|
||||
for _, item := range this.Departments {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Departments", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.Positions {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Positions", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.Clocks {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Clocks", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.TrainVideos {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("TrainVideos", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if this.Operator != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Operator", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UserInfoV2) Validate() error {
|
||||
if this.Extend != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Extend", err)
|
||||
}
|
||||
}
|
||||
if this.Operator != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Operator", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *RefreshTokenRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PositionUser) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *JobNumGetInfoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateClockDeviceRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateClockDeviceRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ClockDeviceResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RemoveClockDeviceRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ClockDeviceListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ClockDeviceListResponse) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ClockUser) Validate() error {
|
||||
if this.Device != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Device); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Device", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ClockDeviceInfo) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ClockDeviceInfoResponse) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ClockUserRel) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ClockDeviceInfoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ClockBatchBindRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ClockBatchListResponse) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ClockUserDeviceBatch) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ClockLogInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ClockLogReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ClockLogListResponse) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *SubmitInfoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CommonMsg) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ChatRecordData) Validate() error {
|
||||
for _, item := range this.Medias {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Medias", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateChatRecordResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteChatRecordRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatRecordByIdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatRecordListRequest) Validate() error {
|
||||
if this.Query != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatRecordListResp) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *RegisterWaiterRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *RegisterWaiterResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ChatMediaData) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateChatMediaResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteChatMediaRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatMediaByIdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatMediaListRequest) Validate() error {
|
||||
if this.Query != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatMediaListResp) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatUserListRequest2) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ChatUser2) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatUserListResp2) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ChatAutoReplyRulerData) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateChatAutoReplyRulerResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteChatAutoReplyRulerRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatAutoReplyRulerByIdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatAutoReplyRulerListRequest) Validate() error {
|
||||
if this.Query != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatAutoReplyRulerListResp) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ChatUserData) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateChatUserResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteChatUserRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatUserByIdRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatUserListRequest) Validate() error {
|
||||
if this.Query != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetChatUserListResp) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
3123
api/accountFiee/accountFiee_triple.pb.go
Normal file
3123
api/accountFiee/accountFiee_triple.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -17,10 +17,100 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *DeleteValueAddServiceRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetReconciliationListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetReconciliationListResp) Validate() error {
|
||||
for _, item := range this.List {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ReconciliationInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OrderInfoByOrderNoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OrderInfoByOrderNoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OrderCreateRecord) Validate() error {
|
||||
for _, item := range this.AddRecords {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("AddRecords", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *OrderCreateAddRecord) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OrderRecordsRequestV2) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OrderRecordsResponseV2) Validate() error {
|
||||
for _, item := range this.BundleInfo {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("BundleInfo", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *OrderBundleRecordInfo) Validate() error {
|
||||
for _, item := range this.AddBundleInfo {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("AddBundleInfo", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *OrderAddBundleRecordInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PackagePriceAndTimeResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CommonResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BundleProfile) Validate() error {
|
||||
for _, item := range this.SelectValueAddService {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("SelectValueAddService", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.BundleProfileLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("BundleProfileLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *BundleProfileLang) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SaveResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SelectValueAddService) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DelBundleRequest) Validate() error {
|
||||
@ -42,6 +132,9 @@ func (this *BundleListResponse) Validate() error {
|
||||
func (this *BundleDetailRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *HandShelfRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BundleDetailResponse) Validate() error {
|
||||
if this.Bundle != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Bundle); err != nil {
|
||||
@ -50,7 +143,48 @@ func (this *BundleDetailResponse) Validate() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *BundleDetailResponseV2) Validate() error {
|
||||
if this.Bundle != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Bundle); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Bundle", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *OrderRecord) Validate() error {
|
||||
for _, item := range this.PriceOptionsInfo {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("PriceOptionsInfo", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, item := range this.AddInfos {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("AddInfos", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OrderAddRecord) Validate() error {
|
||||
for _, item := range this.AddPriceOptionsList {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("AddPriceOptionsList", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddPriceOptionsInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PriceOptionsInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OrderRecordsRequest) Validate() error {
|
||||
@ -119,3 +253,197 @@ func (this *ValueAddBundleDetailResponse) Validate() error {
|
||||
func (this *FinancialConfirmationRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ValueAddService) Validate() error {
|
||||
for _, item := range this.ServiceLang {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ServiceLang", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ValueAddServiceLang) Validate() error {
|
||||
for _, item := range this.Options {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Options", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ValueAddPriceOptions) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ValueAddServiceListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ValueAddServiceListResponse) Validate() error {
|
||||
for _, item := range this.ValueAddServiceList {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ValueAddServiceList", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ValueAddServiceDetailRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ValueAddServiceDetailResponse) Validate() error {
|
||||
if this.ValueAddService != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ValueAddService); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ValueAddService", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CalculatePriceRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CalculatePriceResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BatchGetValueAddServiceLangRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BatchGetValueAddServiceLangResponse) Validate() error {
|
||||
for _, item := range this.ValueAddServiceLangList {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ValueAddServiceLangList", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *BundleExtendRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BundleExtendResponse) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BundleExtendRecordsListRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BundleExtendRecordsListResponse) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *BundleExtendRecordItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetBundleBalanceListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetBundleBalanceReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *BundleBalanceItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetBundleBalanceListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateBundleBalanceReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateBundleBalanceResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *AddBundleBalanceReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *AddBundleBalanceResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetUsedRecordListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetUsedRecordListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *WorkCastItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetImageWorkDetailReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetVedioWorkDetailReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetImageWorkDetailResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetVedioeWorkDetailResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ToBeComfirmedWorksReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WorkItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ToBeComfirmedWorksResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetBundleBalanceByUserIdReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetBundleBalanceByUserIdResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OnlyAddValueListByOrderNoRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *OnlyAddValueListByOrderNoResp) Validate() error {
|
||||
for _, item := range this.AddBundleInfos {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("AddBundleInfos", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddBundleInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateStatusAndPayTimeBySerialNumber) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ConfirmWorkReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ConfirmWorkResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
3525
api/cast/cast.pb.go
Normal file
3525
api/cast/cast.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
4320
api/cast/cast.pb.validate.go
Normal file
4320
api/cast/cast.pb.validate.go
Normal file
File diff suppressed because it is too large
Load Diff
823
api/cast/cast_triple.pb.go
Normal file
823
api/cast/cast_triple.pb.go
Normal file
@ -0,0 +1,823 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.21.1
|
||||
// source: pb/fiee/cast.proto
|
||||
|
||||
package cast
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// CastClient is the client API for Cast 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 CastClient interface {
|
||||
MediaUserList(ctx context.Context, in *MediaUserListReq, opts ...grpc_go.CallOption) (*MediaUserListResp, common.ErrorWithAttachment)
|
||||
UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment)
|
||||
UnbindManager(ctx context.Context, in *UnbindManagerReq, opts ...grpc_go.CallOption) (*UnbindManagerResp, common.ErrorWithAttachment)
|
||||
BindManager(ctx context.Context, in *BindManagerReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||
UpdateWorkImage(ctx context.Context, in *UpdateWorkImageReq, opts ...grpc_go.CallOption) (*UpdateWorkImageResp, common.ErrorWithAttachment)
|
||||
UpdateWorkVideo(ctx context.Context, in *UpdateWorkVideoReq, opts ...grpc_go.CallOption) (*UpdateWorkVideoResp, common.ErrorWithAttachment)
|
||||
WorkList(ctx context.Context, in *WorkListReq, opts ...grpc_go.CallOption) (*WorkListResp, common.ErrorWithAttachment)
|
||||
WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment)
|
||||
UpdateStatus(ctx context.Context, in *UpdateStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||
MediaAccounts(ctx context.Context, in *MediaAccountsReq, opts ...grpc_go.CallOption) (*MediaAccountsResp, common.ErrorWithAttachment)
|
||||
MediaWorks(ctx context.Context, in *MediaWorksReq, opts ...grpc_go.CallOption) (*MediaWorksResp, common.ErrorWithAttachment)
|
||||
RePublish(ctx context.Context, in *RePublishReq, opts ...grpc_go.CallOption) (*RePublishResp, common.ErrorWithAttachment)
|
||||
DelWork(ctx context.Context, in *DelWorkReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||
WorkInfo(ctx context.Context, in *WorkInfoReq, opts ...grpc_go.CallOption) (*WorkInfoResp, common.ErrorWithAttachment)
|
||||
OAuthYoutubeUrl(ctx context.Context, in *OAuthYoutubeUrlReq, opts ...grpc_go.CallOption) (*OAuthYoutubeUrlResp, common.ErrorWithAttachment)
|
||||
OAuthYoutubeToken(ctx context.Context, in *OAuthYoutubeTokenReq, opts ...grpc_go.CallOption) (*OAuthYoutubeTokenResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type castClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type CastClientImpl struct {
|
||||
MediaUserList func(ctx context.Context, in *MediaUserListReq) (*MediaUserListResp, error)
|
||||
UpdateMediaAccount func(ctx context.Context, in *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
||||
UnbindManager func(ctx context.Context, in *UnbindManagerReq) (*UnbindManagerResp, error)
|
||||
BindManager func(ctx context.Context, in *BindManagerReq) (*emptypb.Empty, error)
|
||||
UpdateWorkImage func(ctx context.Context, in *UpdateWorkImageReq) (*UpdateWorkImageResp, error)
|
||||
UpdateWorkVideo func(ctx context.Context, in *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
|
||||
WorkList func(ctx context.Context, in *WorkListReq) (*WorkListResp, error)
|
||||
WorkDetail func(ctx context.Context, in *WorkDetailReq) (*WorkDetailResp, error)
|
||||
UpdateStatus func(ctx context.Context, in *UpdateStatusReq) (*emptypb.Empty, error)
|
||||
MediaAccounts func(ctx context.Context, in *MediaAccountsReq) (*MediaAccountsResp, error)
|
||||
MediaWorks func(ctx context.Context, in *MediaWorksReq) (*MediaWorksResp, error)
|
||||
RePublish func(ctx context.Context, in *RePublishReq) (*RePublishResp, error)
|
||||
DelWork func(ctx context.Context, in *DelWorkReq) (*emptypb.Empty, error)
|
||||
WorkInfo func(ctx context.Context, in *WorkInfoReq) (*WorkInfoResp, error)
|
||||
OAuthYoutubeUrl func(ctx context.Context, in *OAuthYoutubeUrlReq) (*OAuthYoutubeUrlResp, error)
|
||||
OAuthYoutubeToken func(ctx context.Context, in *OAuthYoutubeTokenReq) (*OAuthYoutubeTokenResp, error)
|
||||
}
|
||||
|
||||
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
||||
return NewCastClient(cc)
|
||||
}
|
||||
|
||||
func (c *CastClientImpl) XXX_InterfaceName() string {
|
||||
return "Cast.Cast"
|
||||
}
|
||||
|
||||
func NewCastClient(cc *triple.TripleConn) CastClient {
|
||||
return &castClient{cc}
|
||||
}
|
||||
|
||||
func (c *castClient) MediaUserList(ctx context.Context, in *MediaUserListReq, opts ...grpc_go.CallOption) (*MediaUserListResp, common.ErrorWithAttachment) {
|
||||
out := new(MediaUserListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/MediaUserList", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment) {
|
||||
out := new(UpdateMediaAccountResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateMediaAccount", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) UnbindManager(ctx context.Context, in *UnbindManagerReq, opts ...grpc_go.CallOption) (*UnbindManagerResp, common.ErrorWithAttachment) {
|
||||
out := new(UnbindManagerResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UnbindManager", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) BindManager(ctx context.Context, in *BindManagerReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||
out := new(emptypb.Empty)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BindManager", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) UpdateWorkImage(ctx context.Context, in *UpdateWorkImageReq, opts ...grpc_go.CallOption) (*UpdateWorkImageResp, common.ErrorWithAttachment) {
|
||||
out := new(UpdateWorkImageResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateWorkImage", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) UpdateWorkVideo(ctx context.Context, in *UpdateWorkVideoReq, opts ...grpc_go.CallOption) (*UpdateWorkVideoResp, common.ErrorWithAttachment) {
|
||||
out := new(UpdateWorkVideoResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateWorkVideo", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) WorkList(ctx context.Context, in *WorkListReq, opts ...grpc_go.CallOption) (*WorkListResp, common.ErrorWithAttachment) {
|
||||
out := new(WorkListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkList", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) WorkDetail(ctx context.Context, in *WorkDetailReq, opts ...grpc_go.CallOption) (*WorkDetailResp, common.ErrorWithAttachment) {
|
||||
out := new(WorkDetailResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkDetail", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) UpdateStatus(ctx context.Context, in *UpdateStatusReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||
out := new(emptypb.Empty)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateStatus", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) MediaAccounts(ctx context.Context, in *MediaAccountsReq, opts ...grpc_go.CallOption) (*MediaAccountsResp, common.ErrorWithAttachment) {
|
||||
out := new(MediaAccountsResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/MediaAccounts", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) MediaWorks(ctx context.Context, in *MediaWorksReq, opts ...grpc_go.CallOption) (*MediaWorksResp, common.ErrorWithAttachment) {
|
||||
out := new(MediaWorksResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/MediaWorks", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) RePublish(ctx context.Context, in *RePublishReq, opts ...grpc_go.CallOption) (*RePublishResp, common.ErrorWithAttachment) {
|
||||
out := new(RePublishResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RePublish", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) DelWork(ctx context.Context, in *DelWorkReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||
out := new(emptypb.Empty)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DelWork", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) WorkInfo(ctx context.Context, in *WorkInfoReq, opts ...grpc_go.CallOption) (*WorkInfoResp, common.ErrorWithAttachment) {
|
||||
out := new(WorkInfoResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkInfo", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) OAuthYoutubeUrl(ctx context.Context, in *OAuthYoutubeUrlReq, opts ...grpc_go.CallOption) (*OAuthYoutubeUrlResp, common.ErrorWithAttachment) {
|
||||
out := new(OAuthYoutubeUrlResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OAuthYoutubeUrl", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) OAuthYoutubeToken(ctx context.Context, in *OAuthYoutubeTokenReq, opts ...grpc_go.CallOption) (*OAuthYoutubeTokenResp, common.ErrorWithAttachment) {
|
||||
out := new(OAuthYoutubeTokenResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OAuthYoutubeToken", in, out)
|
||||
}
|
||||
|
||||
// CastServer is the server API for Cast service.
|
||||
// All implementations must embed UnimplementedCastServer
|
||||
// for forward compatibility
|
||||
type CastServer interface {
|
||||
MediaUserList(context.Context, *MediaUserListReq) (*MediaUserListResp, error)
|
||||
UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
||||
UnbindManager(context.Context, *UnbindManagerReq) (*UnbindManagerResp, error)
|
||||
BindManager(context.Context, *BindManagerReq) (*emptypb.Empty, error)
|
||||
UpdateWorkImage(context.Context, *UpdateWorkImageReq) (*UpdateWorkImageResp, error)
|
||||
UpdateWorkVideo(context.Context, *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
|
||||
WorkList(context.Context, *WorkListReq) (*WorkListResp, error)
|
||||
WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error)
|
||||
UpdateStatus(context.Context, *UpdateStatusReq) (*emptypb.Empty, error)
|
||||
MediaAccounts(context.Context, *MediaAccountsReq) (*MediaAccountsResp, error)
|
||||
MediaWorks(context.Context, *MediaWorksReq) (*MediaWorksResp, error)
|
||||
RePublish(context.Context, *RePublishReq) (*RePublishResp, error)
|
||||
DelWork(context.Context, *DelWorkReq) (*emptypb.Empty, error)
|
||||
WorkInfo(context.Context, *WorkInfoReq) (*WorkInfoResp, error)
|
||||
OAuthYoutubeUrl(context.Context, *OAuthYoutubeUrlReq) (*OAuthYoutubeUrlResp, error)
|
||||
OAuthYoutubeToken(context.Context, *OAuthYoutubeTokenReq) (*OAuthYoutubeTokenResp, error)
|
||||
mustEmbedUnimplementedCastServer()
|
||||
}
|
||||
|
||||
// UnimplementedCastServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedCastServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedCastServer) MediaUserList(context.Context, *MediaUserListReq) (*MediaUserListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method MediaUserList not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateMediaAccount not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) UnbindManager(context.Context, *UnbindManagerReq) (*UnbindManagerResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UnbindManager not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) BindManager(context.Context, *BindManagerReq) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BindManager not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) UpdateWorkImage(context.Context, *UpdateWorkImageReq) (*UpdateWorkImageResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkImage not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) UpdateWorkVideo(context.Context, *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkVideo not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) WorkList(context.Context, *WorkListReq) (*WorkListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WorkList not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) WorkDetail(context.Context, *WorkDetailReq) (*WorkDetailResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WorkDetail not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) UpdateStatus(context.Context, *UpdateStatusReq) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateStatus not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) MediaAccounts(context.Context, *MediaAccountsReq) (*MediaAccountsResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method MediaAccounts not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) MediaWorks(context.Context, *MediaWorksReq) (*MediaWorksResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method MediaWorks not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) RePublish(context.Context, *RePublishReq) (*RePublishResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RePublish not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) DelWork(context.Context, *DelWorkReq) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DelWork not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) WorkInfo(context.Context, *WorkInfoReq) (*WorkInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WorkInfo not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) OAuthYoutubeUrl(context.Context, *OAuthYoutubeUrlReq) (*OAuthYoutubeUrlResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method OAuthYoutubeUrl not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) OAuthYoutubeToken(context.Context, *OAuthYoutubeTokenReq) (*OAuthYoutubeTokenResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method OAuthYoutubeToken not implemented")
|
||||
}
|
||||
func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedCastServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedCastServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &Cast_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedCastServer) XXX_InterfaceName() string {
|
||||
return "Cast.Cast"
|
||||
}
|
||||
|
||||
func (UnimplementedCastServer) mustEmbedUnimplementedCastServer() {}
|
||||
|
||||
// UnsafeCastServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to CastServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeCastServer interface {
|
||||
mustEmbedUnimplementedCastServer()
|
||||
}
|
||||
|
||||
func RegisterCastServer(s grpc_go.ServiceRegistrar, srv CastServer) {
|
||||
s.RegisterService(&Cast_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Cast_MediaUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MediaUserListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("MediaUserList", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_UpdateMediaAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateMediaAccountReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateMediaAccount", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_UnbindManager_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UnbindManagerReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UnbindManager", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_BindManager_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BindManagerReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("BindManager", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_UpdateWorkImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateWorkImageReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateWorkImage", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_UpdateWorkVideo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateWorkVideoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateWorkVideo", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_WorkList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WorkListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("WorkList", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_WorkDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WorkDetailReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("WorkDetail", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_UpdateStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateStatusReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateStatus", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_MediaAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MediaAccountsReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("MediaAccounts", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_MediaWorks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MediaWorksReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("MediaWorks", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_RePublish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RePublishReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("RePublish", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_DelWork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DelWorkReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DelWork", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_WorkInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WorkInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("WorkInfo", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_OAuthYoutubeUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(OAuthYoutubeUrlReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("OAuthYoutubeUrl", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_OAuthYoutubeToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(OAuthYoutubeTokenReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("OAuthYoutubeToken", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Cast_ServiceDesc is the grpc_go.ServiceDesc for Cast service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "Cast.Cast",
|
||||
HandlerType: (*CastServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "MediaUserList",
|
||||
Handler: _Cast_MediaUserList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateMediaAccount",
|
||||
Handler: _Cast_UpdateMediaAccount_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UnbindManager",
|
||||
Handler: _Cast_UnbindManager_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BindManager",
|
||||
Handler: _Cast_BindManager_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateWorkImage",
|
||||
Handler: _Cast_UpdateWorkImage_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateWorkVideo",
|
||||
Handler: _Cast_UpdateWorkVideo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WorkList",
|
||||
Handler: _Cast_WorkList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WorkDetail",
|
||||
Handler: _Cast_WorkDetail_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateStatus",
|
||||
Handler: _Cast_UpdateStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MediaAccounts",
|
||||
Handler: _Cast_MediaAccounts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MediaWorks",
|
||||
Handler: _Cast_MediaWorks_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RePublish",
|
||||
Handler: _Cast_RePublish_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DelWork",
|
||||
Handler: _Cast_DelWork_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WorkInfo",
|
||||
Handler: _Cast_WorkInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "OAuthYoutubeUrl",
|
||||
Handler: _Cast_OAuthYoutubeUrl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "OAuthYoutubeToken",
|
||||
Handler: _Cast_OAuthYoutubeToken_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "pb/fiee/cast.proto",
|
||||
}
|
2583
api/files/files.pb.go
Normal file
2583
api/files/files.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
194
api/files/files.proto
Normal file
194
api/files/files.proto
Normal file
@ -0,0 +1,194 @@
|
||||
syntax = "proto3";
|
||||
package files;
|
||||
|
||||
option go_package = "./;files";
|
||||
|
||||
service File {
|
||||
rpc List(FileListReq) returns (FileListResp) {} // 获取当前路径下的文件列表
|
||||
rpc Info(FileInfoReq) returns (FileInfoResp) {} // 获取文件信息
|
||||
rpc Create(CreateReq) returns (CreateResp) {} // 创建文件夹
|
||||
rpc Delete(DeleteReq) returns (DeleteResp) {} // 删除文件或文件夹
|
||||
rpc Search(searchReq) returns (searchResp) {} // 搜索
|
||||
rpc Upload(UploadReq) returns (UploadResp) {} // 文件上传
|
||||
rpc TusCreate(TusCreateReq) returns (TusCreateResp) {
|
||||
} // 分块文件上传:创建文件
|
||||
rpc TusUpload(TusUploadReq) returns (TusUploadResp) {
|
||||
} // 分块文件上传:上传文件块
|
||||
rpc ResumableTransfer(ResumableTransferReq) returns (ResumableTransferResp) {
|
||||
} // 断点续传的grpc实现
|
||||
rpc Preview(PreviewReq) returns (PreviewResp) {} // 文件预览
|
||||
rpc Action(ActionReq) returns (ActionResp) {} // 移动文件或重命名文件
|
||||
rpc DirDownload(DirDownloadReq) returns (stream DirDownloadResp) {
|
||||
} // 文件夹压缩下载
|
||||
rpc Usage(UsageReq) returns (UsageResp) {} //查看磁盘使用率
|
||||
}
|
||||
|
||||
message FileListReq {
|
||||
string path = 1; // 目标文件夹路径
|
||||
string userSpacePath = 2; // 用户空间的路径
|
||||
Sorting sorting = 3;
|
||||
}
|
||||
|
||||
message Items {
|
||||
string path = 1;
|
||||
string name = 2;
|
||||
int64 size = 3;
|
||||
string extension = 4;
|
||||
string modified = 5;
|
||||
int64 modTime = 6;
|
||||
string mode = 7;
|
||||
bool isDir = 8;
|
||||
bool isSymlink = 9;
|
||||
string type = 10;
|
||||
}
|
||||
|
||||
message Sorting {
|
||||
string by = 1;
|
||||
bool asc = 2;
|
||||
}
|
||||
|
||||
message FileListResp {
|
||||
repeated Items items = 1;
|
||||
int32 numDirs = 2;
|
||||
int32 numFiles = 3;
|
||||
Sorting sorting = 4;
|
||||
string path = 5;
|
||||
string name = 6;
|
||||
int64 size = 7;
|
||||
string extension = 8;
|
||||
string modified = 9;
|
||||
int64 modTime = 10;
|
||||
string mode = 11;
|
||||
bool isDir = 12;
|
||||
bool isSymlink = 13;
|
||||
string type = 14;
|
||||
}
|
||||
|
||||
message CreateReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
}
|
||||
|
||||
message CreateResp {}
|
||||
|
||||
message DeleteReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
}
|
||||
|
||||
message DeleteResp {}
|
||||
|
||||
message UploadReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
bytes content = 3;
|
||||
}
|
||||
|
||||
message UploadResp {}
|
||||
|
||||
message searchReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
string query = 3;
|
||||
}
|
||||
|
||||
message searchResp {
|
||||
message Nested {
|
||||
bool isDir = 1;
|
||||
string path = 2;
|
||||
string name = 3;
|
||||
int64 size = 4;
|
||||
int64 modTime = 5;
|
||||
}
|
||||
|
||||
repeated Nested items = 1;
|
||||
}
|
||||
|
||||
message TusCreateReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
bool override = 3;
|
||||
}
|
||||
|
||||
message TusCreateResp {
|
||||
int64 uploadLength = 1;
|
||||
int64 uploadOffset = 2;
|
||||
}
|
||||
|
||||
message TusUploadReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
int64 uploadOffset = 3;
|
||||
bytes content = 4;
|
||||
}
|
||||
|
||||
message TusUploadResp { int64 uploadOffset = 1; }
|
||||
|
||||
message ResumableTransferReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
int64 offset = 3;
|
||||
int64 length = 4;
|
||||
}
|
||||
|
||||
message ResumableTransferResp { bytes content = 1; }
|
||||
|
||||
message FileInfoReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
}
|
||||
|
||||
message FileInfoResp {
|
||||
string path = 1;
|
||||
string name = 2;
|
||||
int64 size = 3;
|
||||
string extension = 4;
|
||||
string modified = 5;
|
||||
string mode = 6;
|
||||
int64 modTime = 7;
|
||||
bool isDir = 8;
|
||||
bool isSymlink = 9;
|
||||
string type = 10;
|
||||
}
|
||||
|
||||
message PreviewReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
uint32 size = 3; // 预览大小 0:256x256, 1:1080x1080
|
||||
}
|
||||
|
||||
message PreviewResp {
|
||||
bytes content = 1;
|
||||
string fileName = 2;
|
||||
int64 modTime = 3;
|
||||
}
|
||||
|
||||
message ActionReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
string action = 3;
|
||||
string destination = 4;
|
||||
bool override = 5;
|
||||
bool rename = 6;
|
||||
}
|
||||
|
||||
message ActionResp {}
|
||||
|
||||
message DirDownloadReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
repeated string files = 3;
|
||||
string algo = 4;
|
||||
}
|
||||
|
||||
message DirDownloadResp { bytes content = 1; }
|
||||
|
||||
message UsageReq {
|
||||
string path = 1;
|
||||
string userSpacePath = 2;
|
||||
}
|
||||
|
||||
message UsageResp {
|
||||
int64 total = 1;
|
||||
int64 used = 2;
|
||||
}
|
128
api/files/files.validator.pb.go
Normal file
128
api/files/files.validator.pb.go
Normal file
@ -0,0 +1,128 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: files.proto
|
||||
|
||||
package files
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *FileListReq) Validate() error {
|
||||
if this.Sorting != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Sorting); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Sorting", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *Items) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *Sorting) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FileListResp) Validate() error {
|
||||
for _, item := range this.Items {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if this.Sorting != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Sorting); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Sorting", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CreateReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UploadReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UploadResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SearchReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SearchResp) Validate() error {
|
||||
for _, item := range this.Items {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *SearchResp_Nested) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TusCreateReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TusCreateResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TusUploadReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *TusUploadResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ResumableTransferReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ResumableTransferResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FileInfoReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FileInfoResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PreviewReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *PreviewResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ActionReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ActionResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DirDownloadReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DirDownloadResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UsageReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UsageResp) Validate() error {
|
||||
return nil
|
||||
}
|
723
api/files/files_triple.pb.go
Normal file
723
api/files/files_triple.pb.go
Normal file
@ -0,0 +1,723 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: files.proto
|
||||
|
||||
package files
|
||||
|
||||
import (
|
||||
context "context"
|
||||
constant1 "dubbo.apache.org/dubbo-go/v3/common/constant"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
fmt "fmt"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// FileClient is the client API for File 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 FileClient interface {
|
||||
List(ctx context.Context, in *FileListReq, opts ...grpc_go.CallOption) (*FileListResp, common.ErrorWithAttachment)
|
||||
Info(ctx context.Context, in *FileInfoReq, opts ...grpc_go.CallOption) (*FileInfoResp, common.ErrorWithAttachment)
|
||||
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
||||
Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
|
||||
Search(ctx context.Context, in *SearchReq, opts ...grpc_go.CallOption) (*SearchResp, common.ErrorWithAttachment)
|
||||
Upload(ctx context.Context, in *UploadReq, opts ...grpc_go.CallOption) (*UploadResp, common.ErrorWithAttachment)
|
||||
TusCreate(ctx context.Context, in *TusCreateReq, opts ...grpc_go.CallOption) (*TusCreateResp, common.ErrorWithAttachment)
|
||||
TusUpload(ctx context.Context, in *TusUploadReq, opts ...grpc_go.CallOption) (*TusUploadResp, common.ErrorWithAttachment)
|
||||
ResumableTransfer(ctx context.Context, in *ResumableTransferReq, opts ...grpc_go.CallOption) (*ResumableTransferResp, common.ErrorWithAttachment)
|
||||
Preview(ctx context.Context, in *PreviewReq, opts ...grpc_go.CallOption) (*PreviewResp, common.ErrorWithAttachment)
|
||||
Action(ctx context.Context, in *ActionReq, opts ...grpc_go.CallOption) (*ActionResp, common.ErrorWithAttachment)
|
||||
DirDownload(ctx context.Context, in *DirDownloadReq, opts ...grpc_go.CallOption) (File_DirDownloadClient, error)
|
||||
Usage(ctx context.Context, in *UsageReq, opts ...grpc_go.CallOption) (*UsageResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type fileClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type FileClientImpl struct {
|
||||
List func(ctx context.Context, in *FileListReq) (*FileListResp, error)
|
||||
Info func(ctx context.Context, in *FileInfoReq) (*FileInfoResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Search func(ctx context.Context, in *SearchReq) (*SearchResp, error)
|
||||
Upload func(ctx context.Context, in *UploadReq) (*UploadResp, error)
|
||||
TusCreate func(ctx context.Context, in *TusCreateReq) (*TusCreateResp, error)
|
||||
TusUpload func(ctx context.Context, in *TusUploadReq) (*TusUploadResp, error)
|
||||
ResumableTransfer func(ctx context.Context, in *ResumableTransferReq) (*ResumableTransferResp, error)
|
||||
Preview func(ctx context.Context, in *PreviewReq) (*PreviewResp, error)
|
||||
Action func(ctx context.Context, in *ActionReq) (*ActionResp, error)
|
||||
DirDownload func(ctx context.Context, in *DirDownloadReq) (File_DirDownloadClient, error)
|
||||
Usage func(ctx context.Context, in *UsageReq) (*UsageResp, error)
|
||||
}
|
||||
|
||||
func (c *FileClientImpl) GetDubboStub(cc *triple.TripleConn) FileClient {
|
||||
return NewFileClient(cc)
|
||||
}
|
||||
|
||||
func (c *FileClientImpl) XXX_InterfaceName() string {
|
||||
return "files.File"
|
||||
}
|
||||
|
||||
func NewFileClient(cc *triple.TripleConn) FileClient {
|
||||
return &fileClient{cc}
|
||||
}
|
||||
|
||||
func (c *fileClient) List(ctx context.Context, in *FileListReq, opts ...grpc_go.CallOption) (*FileListResp, common.ErrorWithAttachment) {
|
||||
out := new(FileListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Info(ctx context.Context, in *FileInfoReq, opts ...grpc_go.CallOption) (*FileInfoResp, common.ErrorWithAttachment) {
|
||||
out := new(FileInfoResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Info", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
|
||||
out := new(CreateResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Create", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment) {
|
||||
out := new(DeleteResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Delete", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Search(ctx context.Context, in *SearchReq, opts ...grpc_go.CallOption) (*SearchResp, common.ErrorWithAttachment) {
|
||||
out := new(SearchResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Search", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Upload(ctx context.Context, in *UploadReq, opts ...grpc_go.CallOption) (*UploadResp, common.ErrorWithAttachment) {
|
||||
out := new(UploadResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Upload", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) TusCreate(ctx context.Context, in *TusCreateReq, opts ...grpc_go.CallOption) (*TusCreateResp, common.ErrorWithAttachment) {
|
||||
out := new(TusCreateResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/TusCreate", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) TusUpload(ctx context.Context, in *TusUploadReq, opts ...grpc_go.CallOption) (*TusUploadResp, common.ErrorWithAttachment) {
|
||||
out := new(TusUploadResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/TusUpload", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) ResumableTransfer(ctx context.Context, in *ResumableTransferReq, opts ...grpc_go.CallOption) (*ResumableTransferResp, common.ErrorWithAttachment) {
|
||||
out := new(ResumableTransferResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ResumableTransfer", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Preview(ctx context.Context, in *PreviewReq, opts ...grpc_go.CallOption) (*PreviewResp, common.ErrorWithAttachment) {
|
||||
out := new(PreviewResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Preview", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) Action(ctx context.Context, in *ActionReq, opts ...grpc_go.CallOption) (*ActionResp, common.ErrorWithAttachment) {
|
||||
out := new(ActionResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Action", in, out)
|
||||
}
|
||||
|
||||
func (c *fileClient) DirDownload(ctx context.Context, in *DirDownloadReq, opts ...grpc_go.CallOption) (File_DirDownloadClient, error) {
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
stream, err := c.cc.NewStream(ctx, "/"+interfaceKey+"/DirDownload", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &fileDirDownloadClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type File_DirDownloadClient interface {
|
||||
Recv() (*DirDownloadResp, error)
|
||||
grpc_go.ClientStream
|
||||
}
|
||||
|
||||
type fileDirDownloadClient struct {
|
||||
grpc_go.ClientStream
|
||||
}
|
||||
|
||||
func (x *fileDirDownloadClient) Recv() (*DirDownloadResp, error) {
|
||||
m := new(DirDownloadResp)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *fileClient) Usage(ctx context.Context, in *UsageReq, opts ...grpc_go.CallOption) (*UsageResp, common.ErrorWithAttachment) {
|
||||
out := new(UsageResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Usage", in, out)
|
||||
}
|
||||
|
||||
// FileServer is the server API for File service.
|
||||
// All implementations must embed UnimplementedFileServer
|
||||
// for forward compatibility
|
||||
type FileServer interface {
|
||||
List(context.Context, *FileListReq) (*FileListResp, error)
|
||||
Info(context.Context, *FileInfoReq) (*FileInfoResp, error)
|
||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||
Delete(context.Context, *DeleteReq) (*DeleteResp, error)
|
||||
Search(context.Context, *SearchReq) (*SearchResp, error)
|
||||
Upload(context.Context, *UploadReq) (*UploadResp, error)
|
||||
TusCreate(context.Context, *TusCreateReq) (*TusCreateResp, error)
|
||||
TusUpload(context.Context, *TusUploadReq) (*TusUploadResp, error)
|
||||
ResumableTransfer(context.Context, *ResumableTransferReq) (*ResumableTransferResp, error)
|
||||
Preview(context.Context, *PreviewReq) (*PreviewResp, error)
|
||||
Action(context.Context, *ActionReq) (*ActionResp, error)
|
||||
DirDownload(*DirDownloadReq, File_DirDownloadServer) error
|
||||
Usage(context.Context, *UsageReq) (*UsageResp, error)
|
||||
mustEmbedUnimplementedFileServer()
|
||||
}
|
||||
|
||||
// UnimplementedFileServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedFileServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedFileServer) List(context.Context, *FileListReq) (*FileListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Info(context.Context, *FileInfoReq) (*FileInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Info not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Delete(context.Context, *DeleteReq) (*DeleteResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Search(context.Context, *SearchReq) (*SearchResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Search not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Upload(context.Context, *UploadReq) (*UploadResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Upload not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) TusCreate(context.Context, *TusCreateReq) (*TusCreateResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method TusCreate not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) TusUpload(context.Context, *TusUploadReq) (*TusUploadResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method TusUpload not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) ResumableTransfer(context.Context, *ResumableTransferReq) (*ResumableTransferResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ResumableTransfer not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Preview(context.Context, *PreviewReq) (*PreviewResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Preview not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Action(context.Context, *ActionReq) (*ActionResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Action not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) DirDownload(*DirDownloadReq, File_DirDownloadServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method DirDownload not implemented")
|
||||
}
|
||||
func (UnimplementedFileServer) Usage(context.Context, *UsageReq) (*UsageResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Usage not implemented")
|
||||
}
|
||||
func (s *UnimplementedFileServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedFileServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedFileServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &File_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedFileServer) XXX_InterfaceName() string {
|
||||
return "files.File"
|
||||
}
|
||||
|
||||
func (UnimplementedFileServer) mustEmbedUnimplementedFileServer() {}
|
||||
|
||||
// UnsafeFileServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to FileServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeFileServer interface {
|
||||
mustEmbedUnimplementedFileServer()
|
||||
}
|
||||
|
||||
func RegisterFileServer(s grpc_go.ServiceRegistrar, srv FileServer) {
|
||||
s.RegisterService(&File_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _File_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FileListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("List", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FileInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Info", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Create", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Delete", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SearchReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Search", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Upload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UploadReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Upload", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_TusCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TusCreateReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("TusCreate", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_TusUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(TusUploadReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("TusUpload", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_ResumableTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ResumableTransferReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("ResumableTransfer", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Preview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PreviewReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Preview", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_Action_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ActionReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Action", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _File_DirDownload_Handler(srv interface{}, stream grpc_go.ServerStream) error {
|
||||
_, ok := srv.(dubbo3.Dubbo3GrpcService)
|
||||
ctx := stream.Context()
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
stream.(grpc_go.CtxSetterStream).SetContext(context.WithValue(ctx, constant1.AttachmentKey, invAttachment))
|
||||
invo := invocation.NewRPCInvocation("DirDownload", nil, nil)
|
||||
if !ok {
|
||||
fmt.Println(invo)
|
||||
return nil
|
||||
}
|
||||
m := new(DirDownloadReq)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(FileServer).DirDownload(m, &fileDirDownloadServer{stream})
|
||||
}
|
||||
|
||||
type File_DirDownloadServer interface {
|
||||
Send(*DirDownloadResp) error
|
||||
grpc_go.ServerStream
|
||||
}
|
||||
|
||||
type fileDirDownloadServer struct {
|
||||
grpc_go.ServerStream
|
||||
}
|
||||
|
||||
func (x *fileDirDownloadServer) Send(m *DirDownloadResp) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _File_Usage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UsageReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Usage", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// File_ServiceDesc is the grpc_go.ServiceDesc for File service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var File_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "files.File",
|
||||
HandlerType: (*FileServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "List",
|
||||
Handler: _File_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Info",
|
||||
Handler: _File_Info_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _File_Create_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _File_Delete_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Search",
|
||||
Handler: _File_Search_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Upload",
|
||||
Handler: _File_Upload_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "TusCreate",
|
||||
Handler: _File_TusCreate_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "TusUpload",
|
||||
Handler: _File_TusUpload_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ResumableTransfer",
|
||||
Handler: _File_ResumableTransfer_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Preview",
|
||||
Handler: _File_Preview_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Action",
|
||||
Handler: _File_Action_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Usage",
|
||||
Handler: _File_Usage_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{
|
||||
{
|
||||
StreamName: "DirDownload",
|
||||
Handler: _File_DirDownload_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "files.proto",
|
||||
}
|
997
api/governance/governance.pb.go
Normal file
997
api/governance/governance.pb.go
Normal file
@ -0,0 +1,997 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.29.1
|
||||
// protoc v3.20.3
|
||||
// source: governance.proto
|
||||
|
||||
package governance
|
||||
|
||||
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 Item struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Attachment string `protobuf:"bytes,3,opt,name=attachment,proto3" json:"attachment,omitempty"`
|
||||
AttachmentName string `protobuf:"bytes,4,opt,name=attachmentName,proto3" json:"attachmentName,omitempty"`
|
||||
Sort int32 `protobuf:"varint,5,opt,name=sort,proto3" json:"sort,omitempty"`
|
||||
Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`
|
||||
UpdatedAt int64 `protobuf:"varint,7,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
|
||||
Operator string `protobuf:"bytes,8,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,9,opt,name=operatorId,proto3" json:"operatorId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Item) Reset() {
|
||||
*x = Item{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Item) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Item) ProtoMessage() {}
|
||||
|
||||
func (x *Item) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 Item.ProtoReflect.Descriptor instead.
|
||||
func (*Item) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Item) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Item) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Item) GetAttachment() string {
|
||||
if x != nil {
|
||||
return x.Attachment
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Item) GetAttachmentName() string {
|
||||
if x != nil {
|
||||
return x.AttachmentName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Item) GetSort() int32 {
|
||||
if x != nil {
|
||||
return x.Sort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Item) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Item) GetUpdatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Item) GetOperator() string {
|
||||
if x != nil {
|
||||
return x.Operator
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Item) GetOperatorId() int32 {
|
||||
if x != nil {
|
||||
return x.OperatorId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` // 1 下架 2 上架
|
||||
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
|
||||
PageSize int32 `protobuf:"varint,4,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListReq) Reset() {
|
||||
*x = ListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListReq) ProtoMessage() {}
|
||||
|
||||
func (x *ListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 ListReq.ProtoReflect.Descriptor instead.
|
||||
func (*ListReq) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ListReq) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListReq) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListReq) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListReq) GetPageSize() int32 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
|
||||
Data []*Item `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListResp) Reset() {
|
||||
*x = ListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListResp) ProtoMessage() {}
|
||||
|
||||
func (x *ListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 ListResp.ProtoReflect.Descriptor instead.
|
||||
func (*ListResp) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ListResp) GetTotal() int32 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListResp) GetData() []*Item {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteReq) Reset() {
|
||||
*x = DeleteReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteReq) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 DeleteReq.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteReq) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *DeleteReq) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DeleteResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DeleteResp) Reset() {
|
||||
*x = DeleteResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteResp) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 DeleteResp.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteResp) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type EditReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Attachment string `protobuf:"bytes,3,opt,name=attachment,proto3" json:"attachment,omitempty"`
|
||||
AttachmentName string `protobuf:"bytes,4,opt,name=attachmentName,proto3" json:"attachmentName,omitempty"`
|
||||
Sort int32 `protobuf:"varint,5,opt,name=sort,proto3" json:"sort,omitempty"`
|
||||
Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Operator string `protobuf:"bytes,7,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,8,opt,name=operatorId,proto3" json:"operatorId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *EditReq) Reset() {
|
||||
*x = EditReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EditReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EditReq) ProtoMessage() {}
|
||||
|
||||
func (x *EditReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 EditReq.ProtoReflect.Descriptor instead.
|
||||
func (*EditReq) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *EditReq) GetId() uint32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditReq) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditReq) GetAttachment() string {
|
||||
if x != nil {
|
||||
return x.Attachment
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditReq) GetAttachmentName() string {
|
||||
if x != nil {
|
||||
return x.AttachmentName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditReq) GetSort() int32 {
|
||||
if x != nil {
|
||||
return x.Sort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditReq) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EditReq) GetOperator() string {
|
||||
if x != nil {
|
||||
return x.Operator
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *EditReq) GetOperatorId() int32 {
|
||||
if x != nil {
|
||||
return x.OperatorId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type EditResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *EditResp) Reset() {
|
||||
*x = EditResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EditResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EditResp) ProtoMessage() {}
|
||||
|
||||
func (x *EditResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 EditResp.ProtoReflect.Descriptor instead.
|
||||
func (*EditResp) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
type CreateReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Sort uint32 `protobuf:"varint,2,opt,name=sort,proto3" json:"sort,omitempty"`
|
||||
Attachment string `protobuf:"bytes,3,opt,name=attachment,proto3" json:"attachment,omitempty"`
|
||||
AttachmentName string `protobuf:"bytes,4,opt,name=attachmentName,proto3" json:"attachmentName,omitempty"`
|
||||
Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Operator string `protobuf:"bytes,6,opt,name=operator,proto3" json:"operator,omitempty"`
|
||||
OperatorId int32 `protobuf:"varint,7,opt,name=operatorId,proto3" json:"operatorId,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreateReq) Reset() {
|
||||
*x = CreateReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreateReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateReq) ProtoMessage() {}
|
||||
|
||||
func (x *CreateReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 CreateReq.ProtoReflect.Descriptor instead.
|
||||
func (*CreateReq) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetSort() uint32 {
|
||||
if x != nil {
|
||||
return x.Sort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetAttachment() string {
|
||||
if x != nil {
|
||||
return x.Attachment
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetAttachmentName() string {
|
||||
if x != nil {
|
||||
return x.AttachmentName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetStatus() int32 {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetOperator() string {
|
||||
if x != nil {
|
||||
return x.Operator
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateReq) GetOperatorId() int32 {
|
||||
if x != nil {
|
||||
return x.OperatorId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type CreateResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *CreateResp) Reset() {
|
||||
*x = CreateResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreateResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateResp) ProtoMessage() {}
|
||||
|
||||
func (x *CreateResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 CreateResp.ProtoReflect.Descriptor instead.
|
||||
func (*CreateResp) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
type DisplayReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *DisplayReq) Reset() {
|
||||
*x = DisplayReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DisplayReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DisplayReq) ProtoMessage() {}
|
||||
|
||||
func (x *DisplayReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 DisplayReq.ProtoReflect.Descriptor instead.
|
||||
func (*DisplayReq) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
type DisplayResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data []*Item `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DisplayResp) Reset() {
|
||||
*x = DisplayResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_governance_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DisplayResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DisplayResp) ProtoMessage() {}
|
||||
|
||||
func (x *DisplayResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_governance_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 DisplayResp.ProtoReflect.Descriptor instead.
|
||||
func (*DisplayResp) Descriptor() ([]byte, []int) {
|
||||
return file_governance_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *DisplayResp) GetData() []*Item {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_governance_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_governance_proto_rawDesc = []byte{
|
||||
0x0a, 0x10, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xfa,
|
||||
0x01, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a,
|
||||
0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x07, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65,
|
||||
0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65,
|
||||
0x53, 0x69, 0x7a, 0x65, 0x22, 0x46, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1b, 0x0a, 0x09,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x0c, 0x0a, 0x0a, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0xdf, 0x01, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74,
|
||||
0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74,
|
||||
0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61,
|
||||
0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x74, 0x74,
|
||||
0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x70, 0x65,
|
||||
0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x64, 0x69,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0xd1, 0x01, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a,
|
||||
0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x70, 0x65,
|
||||
0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x0c, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x70, 0x6c,
|
||||
0x61, 0x79, 0x52, 0x65, 0x71, 0x22, 0x33, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79,
|
||||
0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0xaa, 0x02, 0x0a, 0x0a, 0x47,
|
||||
0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x12, 0x13, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61,
|
||||
0x6e, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39,
|
||||
0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72,
|
||||
0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a,
|
||||
0x16, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x04, 0x45, 0x64, 0x69,
|
||||
0x74, 0x12, 0x13, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x45,
|
||||
0x64, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61,
|
||||
0x6e, 0x63, 0x65, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x39,
|
||||
0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72,
|
||||
0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a,
|
||||
0x16, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x07, 0x44, 0x69, 0x73,
|
||||
0x70, 0x6c, 0x61, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x67,
|
||||
0x6f, 0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61,
|
||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x3b, 0x67, 0x6f,
|
||||
0x76, 0x65, 0x72, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_governance_proto_rawDescOnce sync.Once
|
||||
file_governance_proto_rawDescData = file_governance_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_governance_proto_rawDescGZIP() []byte {
|
||||
file_governance_proto_rawDescOnce.Do(func() {
|
||||
file_governance_proto_rawDescData = protoimpl.X.CompressGZIP(file_governance_proto_rawDescData)
|
||||
})
|
||||
return file_governance_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_governance_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_governance_proto_goTypes = []interface{}{
|
||||
(*Item)(nil), // 0: governance.Item
|
||||
(*ListReq)(nil), // 1: governance.ListReq
|
||||
(*ListResp)(nil), // 2: governance.ListResp
|
||||
(*DeleteReq)(nil), // 3: governance.DeleteReq
|
||||
(*DeleteResp)(nil), // 4: governance.DeleteResp
|
||||
(*EditReq)(nil), // 5: governance.EditReq
|
||||
(*EditResp)(nil), // 6: governance.EditResp
|
||||
(*CreateReq)(nil), // 7: governance.CreateReq
|
||||
(*CreateResp)(nil), // 8: governance.CreateResp
|
||||
(*DisplayReq)(nil), // 9: governance.DisplayReq
|
||||
(*DisplayResp)(nil), // 10: governance.DisplayResp
|
||||
}
|
||||
var file_governance_proto_depIdxs = []int32{
|
||||
0, // 0: governance.ListResp.data:type_name -> governance.Item
|
||||
0, // 1: governance.DisplayResp.data:type_name -> governance.Item
|
||||
1, // 2: governance.Governance.List:input_type -> governance.ListReq
|
||||
3, // 3: governance.Governance.Delete:input_type -> governance.DeleteReq
|
||||
5, // 4: governance.Governance.Edit:input_type -> governance.EditReq
|
||||
7, // 5: governance.Governance.Create:input_type -> governance.CreateReq
|
||||
9, // 6: governance.Governance.Display:input_type -> governance.DisplayReq
|
||||
2, // 7: governance.Governance.List:output_type -> governance.ListResp
|
||||
4, // 8: governance.Governance.Delete:output_type -> governance.DeleteResp
|
||||
6, // 9: governance.Governance.Edit:output_type -> governance.EditResp
|
||||
8, // 10: governance.Governance.Create:output_type -> governance.CreateResp
|
||||
10, // 11: governance.Governance.Display:output_type -> governance.DisplayResp
|
||||
7, // [7:12] is the sub-list for method output_type
|
||||
2, // [2:7] 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_governance_proto_init() }
|
||||
func file_governance_proto_init() {
|
||||
if File_governance_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_governance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Item); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EditReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EditResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DisplayReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_governance_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DisplayResp); 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_governance_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_governance_proto_goTypes,
|
||||
DependencyIndexes: file_governance_proto_depIdxs,
|
||||
MessageInfos: file_governance_proto_msgTypes,
|
||||
}.Build()
|
||||
File_governance_proto = out.File
|
||||
file_governance_proto_rawDesc = nil
|
||||
file_governance_proto_goTypes = nil
|
||||
file_governance_proto_depIdxs = nil
|
||||
}
|
81
api/governance/governance.proto
Normal file
81
api/governance/governance.proto
Normal file
@ -0,0 +1,81 @@
|
||||
syntax = "proto3";
|
||||
package governance;
|
||||
//import "descriptor.proto";
|
||||
//import "validator.proto";
|
||||
|
||||
option go_package = "./;governance";
|
||||
|
||||
service Governance{
|
||||
rpc List(ListReq) returns (ListResp) {}
|
||||
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
||||
rpc Edit(EditReq) returns (EditResp) {}
|
||||
rpc Create(CreateReq) returns (CreateResp) {}
|
||||
rpc Display(DisplayReq) returns (DisplayResp) {}
|
||||
}
|
||||
|
||||
message Item{
|
||||
int32 id = 1;
|
||||
string title = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 sort = 5;
|
||||
int32 status = 6;
|
||||
int64 updatedAt = 7;
|
||||
string operator = 8;
|
||||
int32 operatorId = 9;
|
||||
}
|
||||
|
||||
message ListReq{
|
||||
string title = 1;
|
||||
int32 status = 2; // 1 下架 2 上架
|
||||
int32 page = 3;
|
||||
int32 pageSize = 4;
|
||||
}
|
||||
|
||||
message ListResp{
|
||||
int32 total = 1;
|
||||
repeated Item data =2;
|
||||
}
|
||||
|
||||
message DeleteReq{
|
||||
int32 id = 1;
|
||||
}
|
||||
|
||||
message DeleteResp{
|
||||
}
|
||||
|
||||
message EditReq{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 sort = 5;
|
||||
int32 status = 6;
|
||||
string operator = 7;
|
||||
int32 operatorId = 8;
|
||||
}
|
||||
|
||||
message EditResp{
|
||||
}
|
||||
|
||||
message CreateReq{
|
||||
string title = 1;
|
||||
uint32 sort = 2;
|
||||
string attachment = 3;
|
||||
string attachmentName = 4;
|
||||
int32 status = 5;
|
||||
string operator = 6;
|
||||
int32 operatorId = 7;
|
||||
}
|
||||
|
||||
message CreateResp{
|
||||
|
||||
}
|
||||
|
||||
message DisplayReq{
|
||||
|
||||
}
|
||||
|
||||
message DisplayResp{
|
||||
repeated Item data = 1;
|
||||
}
|
64
api/governance/governance.validator.pb.go
Normal file
64
api/governance/governance.validator.pb.go
Normal file
@ -0,0 +1,64 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: governance.proto
|
||||
|
||||
package governance
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *Item) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
327
api/governance/governance_triple.pb.go
Normal file
327
api/governance/governance_triple.pb.go
Normal file
@ -0,0 +1,327 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: governance.proto
|
||||
|
||||
package governance
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// GovernanceClient is the client API for Governance 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 GovernanceClient interface {
|
||||
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
|
||||
Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
|
||||
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
|
||||
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
||||
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type governanceClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type GovernanceClientImpl struct {
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
}
|
||||
|
||||
func (c *GovernanceClientImpl) GetDubboStub(cc *triple.TripleConn) GovernanceClient {
|
||||
return NewGovernanceClient(cc)
|
||||
}
|
||||
|
||||
func (c *GovernanceClientImpl) XXX_InterfaceName() string {
|
||||
return "governance.Governance"
|
||||
}
|
||||
|
||||
func NewGovernanceClient(cc *triple.TripleConn) GovernanceClient {
|
||||
return &governanceClient{cc}
|
||||
}
|
||||
|
||||
func (c *governanceClient) List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment) {
|
||||
out := new(ListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment) {
|
||||
out := new(DeleteResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Delete", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment) {
|
||||
out := new(EditResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Edit", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
|
||||
out := new(CreateResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Create", in, out)
|
||||
}
|
||||
|
||||
func (c *governanceClient) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) {
|
||||
out := new(DisplayResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Display", in, out)
|
||||
}
|
||||
|
||||
// GovernanceServer is the server API for Governance service.
|
||||
// All implementations must embed UnimplementedGovernanceServer
|
||||
// for forward compatibility
|
||||
type GovernanceServer interface {
|
||||
List(context.Context, *ListReq) (*ListResp, error)
|
||||
Delete(context.Context, *DeleteReq) (*DeleteResp, error)
|
||||
Edit(context.Context, *EditReq) (*EditResp, error)
|
||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
||||
mustEmbedUnimplementedGovernanceServer()
|
||||
}
|
||||
|
||||
// UnimplementedGovernanceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedGovernanceServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedGovernanceServer) List(context.Context, *ListReq) (*ListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) Delete(context.Context, *DeleteReq) (*DeleteResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) Edit(context.Context, *EditReq) (*EditResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Edit not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedGovernanceServer) Display(context.Context, *DisplayReq) (*DisplayResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Display not implemented")
|
||||
}
|
||||
func (s *UnimplementedGovernanceServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedGovernanceServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedGovernanceServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &Governance_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedGovernanceServer) XXX_InterfaceName() string {
|
||||
return "governance.Governance"
|
||||
}
|
||||
|
||||
func (UnimplementedGovernanceServer) mustEmbedUnimplementedGovernanceServer() {}
|
||||
|
||||
// UnsafeGovernanceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to GovernanceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeGovernanceServer interface {
|
||||
mustEmbedUnimplementedGovernanceServer()
|
||||
}
|
||||
|
||||
func RegisterGovernanceServer(s grpc_go.ServiceRegistrar, srv GovernanceServer) {
|
||||
s.RegisterService(&Governance_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Governance_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("List", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Delete", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_Edit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EditReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Edit", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Create", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Governance_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DisplayReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Display", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Governance_ServiceDesc is the grpc_go.ServiceDesc for Governance service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Governance_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "governance.Governance",
|
||||
HandlerType: (*GovernanceServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "List",
|
||||
Handler: _Governance_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _Governance_Delete_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Edit",
|
||||
Handler: _Governance_Edit_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _Governance_Create_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Display",
|
||||
Handler: _Governance_Display_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "governance.proto",
|
||||
}
|
@ -7475,184 +7475,185 @@ var file_pb_payment_proto_rawDesc = []byte{
|
||||
0x28, 0x03, 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x41,
|
||||
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x74, 0x49, 0x6e, 0x63, 0x6f,
|
||||
0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x49, 0x6e, 0x63,
|
||||
0x6f, 0x6d, 0x65, 0x32, 0x82, 0x16, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12,
|
||||
0x42, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x12, 0x19, 0x2e, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x61, 0x79,
|
||||
0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66,
|
||||
0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x61, 0x79, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79,
|
||||
0x50, 0x61, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12,
|
||||
0x18, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x79, 0x51, 0x75, 0x65,
|
||||
0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70,
|
||||
0x6f, 0x72, 0x74, 0x50, 0x61, 0x79, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x78, 0x70, 0x6f,
|
||||
0x72, 0x74, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a,
|
||||
0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e,
|
||||
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x66, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x61,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x75,
|
||||
0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x53, 0x74,
|
||||
0x72, 0x69, 0x70, 0x65, 0x47, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x79, 0x57, 0x65, 0x62, 0x68, 0x6f,
|
||||
0x6f, 0x6b, 0x12, 0x22, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x57, 0x65, 0x62, 0x68,
|
||||
0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a,
|
||||
0x10, 0x41, 0x6c, 0x69, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f,
|
||||
0x6b, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x6f, 0x74, 0x69,
|
||||
0x66, 0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x61, 0x79,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x15, 0x57, 0x65,
|
||||
0x63, 0x68, 0x61, 0x74, 0x46, 0x65, 0x6e, 0x67, 0x4c, 0x69, 0x61, 0x6e, 0x57, 0x65, 0x62, 0x68,
|
||||
0x6f, 0x6f, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x6f,
|
||||
0x74, 0x69, 0x66, 0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a,
|
||||
0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50,
|
||||
0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c,
|
||||
0x41, 0x6e, 0x74, 0x6f, 0x6d, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x1e, 0x2e, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6e, 0x74, 0x6f, 0x6d, 0x4e, 0x6f, 0x74, 0x69,
|
||||
0x66, 0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6e, 0x74, 0x6f, 0x6d, 0x4e, 0x6f, 0x74, 0x69,
|
||||
0x66, 0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x63, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x74, 0x6f, 0x6d, 0x50, 0x61, 0x79,
|
||||
0x42, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x49, 0x64, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6e,
|
||||
0x74, 0x6f, 0x6d, 0x50, 0x61, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6e, 0x74,
|
||||
0x6f, 0x6d, 0x50, 0x61, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74,
|
||||
0x72, 0x69, 0x70, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f,
|
||||
0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x2c, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53,
|
||||
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x44, 0x0a, 0x09, 0x41, 0x6c, 0x69, 0x57, 0x61, 0x70, 0x50, 0x61, 0x79, 0x12, 0x19, 0x2e,
|
||||
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x57, 0x61, 0x70, 0x50, 0x61,
|
||||
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x57, 0x61, 0x70, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x41, 0x6c, 0x69, 0x41, 0x70, 0x70,
|
||||
0x50, 0x61, 0x79, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c,
|
||||
0x69, 0x41, 0x70, 0x70, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a,
|
||||
0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x41, 0x70, 0x70, 0x50,
|
||||
0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c,
|
||||
0x41, 0x6c, 0x69, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x61, 0x79, 0x12, 0x1c, 0x2e, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65,
|
||||
0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x61,
|
||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x41,
|
||||
0x6c, 0x69, 0x50, 0x63, 0x57, 0x61, 0x62, 0x50, 0x61, 0x79, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x50, 0x63, 0x57, 0x61, 0x62, 0x50, 0x61, 0x79,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2e, 0x41, 0x6c, 0x69, 0x50, 0x63, 0x57, 0x61, 0x62, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x41, 0x6c, 0x69, 0x52, 0x65,
|
||||
0x46, 0x75, 0x6e, 0x64, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41,
|
||||
0x6c, 0x69, 0x52, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x52, 0x65, 0x46,
|
||||
0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a,
|
||||
0x09, 0x41, 0x6c, 0x69, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65,
|
||||
0x6f, 0x6d, 0x65, 0x32, 0x86, 0x16, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43,
|
||||
0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79,
|
||||
0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x79, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x4e, 0x6f, 0x74, 0x69, 0x66,
|
||||
0x79, 0x50, 0x61, 0x79, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e,
|
||||
0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79,
|
||||
0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x14, 0x51,
|
||||
0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64,
|
||||
0x65, 0x4e, 0x6f, 0x12, 0x18, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61,
|
||||
0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
|
||||
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72,
|
||||
0x79, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x79, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x79, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||
0x41, 0x6c, 0x69, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x14, 0x41, 0x6c, 0x69, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42,
|
||||
0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12, 0x24, 0x2e, 0x70, 0x61,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79,
|
||||
0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x25, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x51,
|
||||
0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x77, 0x0a, 0x1a, 0x41, 0x6c,
|
||||
0x69, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75,
|
||||
0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12, 0x2a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x75, 0x6e,
|
||||
0x64, 0x12, 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1d, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61,
|
||||
0x0a, 0x14, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, 0x47, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x79, 0x57,
|
||||
0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x22, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x57, 0x65, 0x62, 0x68,
|
||||
0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74,
|
||||
0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x12, 0x4b, 0x0a, 0x10, 0x41, 0x6c, 0x69, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x57, 0x65,
|
||||
0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66,
|
||||
0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50,
|
||||
0x0a, 0x15, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x46, 0x65, 0x6e, 0x67, 0x4c, 0x69, 0x61, 0x6e,
|
||||
0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x6f, 0x74,
|
||||
0x69, 0x66, 0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x51, 0x0a, 0x0c, 0x41, 0x6e, 0x74, 0x6f, 0x6d, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b,
|
||||
0x12, 0x1e, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6e, 0x74, 0x6f, 0x6d,
|
||||
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x1f, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6e, 0x74, 0x6f, 0x6d,
|
||||
0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x74, 0x6f,
|
||||
0x6d, 0x50, 0x61, 0x79, 0x42, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2e, 0x41, 0x6e, 0x74, 0x6f, 0x6d, 0x50, 0x61, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x2e, 0x41, 0x6e, 0x74, 0x6f, 0x6d, 0x50, 0x61, 0x79, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74,
|
||||
0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, 0x43, 0x68,
|
||||
0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x72, 0x69, 0x70, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b,
|
||||
0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x41, 0x6c, 0x69, 0x57, 0x61, 0x70, 0x50, 0x61,
|
||||
0x79, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x57,
|
||||
0x61, 0x70, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x57, 0x61, 0x70, 0x50, 0x61, 0x79,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x41, 0x6c,
|
||||
0x69, 0x41, 0x70, 0x70, 0x50, 0x61, 0x79, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2e, 0x41, 0x6c, 0x69, 0x41, 0x70, 0x70, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69,
|
||||
0x41, 0x70, 0x70, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x4d, 0x0a, 0x0c, 0x41, 0x6c, 0x69, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x61, 0x79,
|
||||
0x12, 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x4e, 0x61,
|
||||
0x74, 0x69, 0x76, 0x65, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d,
|
||||
0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x4e, 0x61, 0x74, 0x69,
|
||||
0x76, 0x65, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x4a, 0x0a, 0x0b, 0x41, 0x6c, 0x69, 0x50, 0x63, 0x57, 0x61, 0x62, 0x50, 0x61, 0x79, 0x12, 0x1b,
|
||||
0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x50, 0x63, 0x57, 0x61,
|
||||
0x62, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x50, 0x63, 0x57, 0x61, 0x62, 0x50, 0x61,
|
||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x41,
|
||||
0x6c, 0x69, 0x52, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x52, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c,
|
||||
0x69, 0x52, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x12, 0x44, 0x0a, 0x09, 0x41, 0x6c, 0x69, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x19,
|
||||
0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x4e, 0x6f, 0x74, 0x69,
|
||||
0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x65, 0x0a, 0x14, 0x41, 0x6c, 0x69, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12,
|
||||
0x24, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x51, 0x75, 0x65,
|
||||
0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||
0x41, 0x6c, 0x69, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61,
|
||||
0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x77,
|
||||
0x0a, 0x1a, 0x41, 0x6c, 0x69, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79,
|
||||
0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12, 0x2a, 0x2e, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64,
|
||||
0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e,
|
||||
0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72,
|
||||
0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41,
|
||||
0x6c, 0x69, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f,
|
||||
0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41,
|
||||
0x70, 0x69, 0x50, 0x61, 0x79, 0x12, 0x1e, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||
0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x50, 0x61, 0x79, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||
0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x50, 0x61, 0x79, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x1c, 0x57, 0x65, 0x63, 0x68,
|
||||
0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75,
|
||||
0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12, 0x2c, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x51, 0x75, 0x65, 0x72,
|
||||
0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x61,
|
||||
0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12, 0x22, 0x2e,
|
||||
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x42, 0x79,
|
||||
0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x23, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0e, 0x57, 0x65, 0x63, 0x68, 0x61,
|
||||
0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x50, 0x61, 0x79, 0x12, 0x1e, 0x2e, 0x70, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x50,
|
||||
0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x50,
|
||||
0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x1c,
|
||||
0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x51, 0x75, 0x65, 0x72, 0x79,
|
||||
0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12, 0x2c, 0x2e, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41,
|
||||
0x70, 0x69, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64,
|
||||
0x65, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69,
|
||||
0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e,
|
||||
0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x12, 0x47,
|
||||
0x65, 0x74, 0x50, 0x61, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e,
|
||||
0x6f, 0x12, 0x22, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x50,
|
||||
0x61, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x12, 0x57, 0x65, 0x63, 0x68,
|
||||
0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x22,
|
||||
0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a,
|
||||
0x73, 0x41, 0x70, 0x69, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x50, 0x61, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65,
|
||||
0x4e, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x12,
|
||||
0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x52, 0x65, 0x66, 0x75, 0x6e,
|
||||
0x64, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63,
|
||||
0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x08, 0x53, 0x65, 0x74,
|
||||
0x50, 0x61, 0x79, 0x4f, 0x6b, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||
0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x50, 0x61, 0x79, 0x4f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a,
|
||||
0x0c, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x41, 0x70, 0x70, 0x50, 0x61, 0x79, 0x12, 0x1c, 0x2e,
|
||||
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x41, 0x70,
|
||||
0x70, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x61,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x41, 0x70, 0x70, 0x50,
|
||||
0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x77, 0x0a, 0x1a,
|
||||
0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x41, 0x70, 0x70, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79,
|
||||
0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12, 0x2a, 0x2e, 0x70, 0x61, 0x79,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4a, 0x73, 0x41, 0x70, 0x69, 0x52, 0x65, 0x66, 0x75,
|
||||
0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a,
|
||||
0x08, 0x53, 0x65, 0x74, 0x50, 0x61, 0x79, 0x4f, 0x6b, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x50, 0x61, 0x79, 0x4f, 0x6b, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x41, 0x70, 0x70, 0x50, 0x61,
|
||||
0x79, 0x12, 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68,
|
||||
0x61, 0x74, 0x41, 0x70, 0x70, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1d, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74,
|
||||
0x41, 0x70, 0x70, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x77, 0x0a, 0x1a, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x41, 0x70, 0x70, 0x51, 0x75, 0x65,
|
||||
0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12, 0x2a,
|
||||
0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x41,
|
||||
0x70, 0x70, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64,
|
||||
0x65, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x41, 0x70, 0x70, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x41, 0x70, 0x70, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42,
|
||||
0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0f, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4e,
|
||||
0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x61, 0x79, 0x12, 0x1f, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50,
|
||||
0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65,
|
||||
0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x80, 0x01,
|
||||
0x0a, 0x1d, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12,
|
||||
0x2d, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74,
|
||||
0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74,
|
||||
0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e,
|
||||
0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4e,
|
||||
0x61, 0x74, 0x69, 0x76, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54,
|
||||
0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x83, 0x01, 0x0a, 0x1e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x52, 0x65, 0x66, 0x75, 0x6e,
|
||||
0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x66, 0x75, 0x6e,
|
||||
0x64, 0x4e, 0x6f, 0x12, 0x2e, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65,
|
||||
0x63, 0x68, 0x61, 0x74, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42,
|
||||
0x79, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65,
|
||||
0x63, 0x68, 0x61, 0x74, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42,
|
||||
0x79, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74,
|
||||
0x48, 0x35, 0x50, 0x61, 0x79, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
||||
0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x48, 0x35, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63,
|
||||
0x68, 0x61, 0x74, 0x48, 0x35, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x12, 0x74, 0x0a, 0x19, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x48, 0x35, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x12,
|
||||
0x29, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0f, 0x57, 0x65, 0x63,
|
||||
0x68, 0x61, 0x74, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x61, 0x79, 0x12, 0x1f, 0x2e, 0x70,
|
||||
0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4e, 0x61, 0x74,
|
||||
0x69, 0x76, 0x65, 0x50, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e,
|
||||
0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4e, 0x61,
|
||||
0x74, 0x69, 0x76, 0x65, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x12, 0x80, 0x01, 0x0a, 0x1d, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x4e, 0x61, 0x74, 0x69,
|
||||
0x76, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64,
|
||||
0x65, 0x4e, 0x6f, 0x12, 0x2d, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65,
|
||||
0x63, 0x68, 0x61, 0x74, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42,
|
||||
0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63,
|
||||
0x68, 0x61, 0x74, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79,
|
||||
0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x83, 0x01, 0x0a, 0x1e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x52,
|
||||
0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x52,
|
||||
0x65, 0x66, 0x75, 0x6e, 0x64, 0x4e, 0x6f, 0x12, 0x2e, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4e, 0x6f,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
|
||||
0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x4e, 0x6f,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0b, 0x57, 0x65,
|
||||
0x63, 0x68, 0x61, 0x74, 0x48, 0x35, 0x50, 0x61, 0x79, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x79, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x48, 0x35, 0x50, 0x61, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x48, 0x35, 0x50, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x74, 0x0a, 0x19, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74,
|
||||
0x48, 0x35, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64,
|
||||
0x65, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x70, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x48, 0x35, 0x51, 0x75, 0x65,
|
||||
0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x70, 0x61,
|
||||
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x4e, 0x6f, 0x12, 0x29, 0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65,
|
||||
0x63, 0x68, 0x61, 0x74, 0x48, 0x35, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74,
|
||||
0x54, 0x72, 0x61, 0x64, 0x65, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a,
|
||||
0x2e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x63, 0x68, 0x61, 0x74, 0x48,
|
||||
0x35, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x4f, 0x75, 0x74, 0x54, 0x72, 0x61, 0x64, 0x65,
|
||||
0x4e, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09,
|
||||
0x2e, 0x2f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -7756,68 +7757,68 @@ var file_pb_payment_proto_depIdxs = []int32{
|
||||
69, // 8: payment.ExportPayResponse.channelIncomes:type_name -> payment.ChannelIncome
|
||||
67, // 9: payment.ExportPayResponse.businessInfos:type_name -> payment.BusinessInfo
|
||||
66, // 10: payment.ExportPayResponse.orderDetails:type_name -> payment.OrderDetail
|
||||
4, // 11: payment.Payment.CreatePay:input_type -> payment.CreatePayRequest
|
||||
8, // 12: payment.Payment.NotifyPay:input_type -> payment.NotifyPayRequest
|
||||
61, // 13: payment.Payment.QueryPayByOutTradeNo:input_type -> payment.PayQueryRequest
|
||||
64, // 14: payment.Payment.QueryExportPay:input_type -> payment.ExportPayRequest
|
||||
6, // 15: payment.Payment.CreateRefund:input_type -> payment.CreateRefundRequest
|
||||
15, // 16: payment.Payment.StripeGermanyWebhook:input_type -> payment.GetCheckoutWebhookRequest
|
||||
8, // 17: payment.Payment.AliCommonWebhook:input_type -> payment.NotifyPayRequest
|
||||
8, // 18: payment.Payment.WechatFengLianWebhook:input_type -> payment.NotifyPayRequest
|
||||
2, // 19: payment.Payment.AntomWebhook:input_type -> payment.AntomNotifyPayRequest
|
||||
0, // 20: payment.Payment.QueryAntomPayByCheckoutSessionId:input_type -> payment.AntomPayQueryRequest
|
||||
13, // 21: payment.Payment.CreateStripeCheckoutSession:input_type -> payment.CreateStripeCheckoutSessionRequest
|
||||
21, // 22: payment.Payment.AliWapPay:input_type -> payment.AliWapPayRequest
|
||||
23, // 23: payment.Payment.AliAppPay:input_type -> payment.AliAppPayRequest
|
||||
25, // 24: payment.Payment.AliNativePay:input_type -> payment.AliNativePayRequest
|
||||
27, // 25: payment.Payment.AliPcWabPay:input_type -> payment.AliPcWabPayRequest
|
||||
29, // 26: payment.Payment.AliReFund:input_type -> payment.AliReFundRequest
|
||||
31, // 27: payment.Payment.AliNotify:input_type -> payment.AliNotifyRequest
|
||||
33, // 28: payment.Payment.AliQueryByOutTradeNo:input_type -> payment.AliQueryByOutTradeNoRequest
|
||||
35, // 29: payment.Payment.AliRefundQueryByOutTradeNo:input_type -> payment.AliRefundQueryByOutTradeNoRequest
|
||||
37, // 30: payment.Payment.WechatJsApiPay:input_type -> payment.WechatJsApiPayRequest
|
||||
40, // 31: payment.Payment.WechatJsApiQueryByOutTradeNo:input_type -> payment.WechatJsApiQueryByOutTradeNoRequest
|
||||
44, // 32: payment.Payment.GetPayByOutTradeNo:input_type -> payment.GetPayByOutTradeNoRequest
|
||||
54, // 33: payment.Payment.WechatJsApiRefunds:input_type -> payment.WechatJsApiRefundsRequest
|
||||
59, // 34: payment.Payment.SetPayOk:input_type -> payment.WechatPayOkRequest
|
||||
53, // 35: payment.Payment.WechatAppPay:input_type -> payment.WechatAppPayRequest
|
||||
42, // 36: payment.Payment.WechatAppQueryByOutTradeNo:input_type -> payment.WechatAppQueryByOutTradeNoRequest
|
||||
47, // 37: payment.Payment.WechatNativePay:input_type -> payment.WechatNativePayRequest
|
||||
49, // 38: payment.Payment.WechatNativeQueryByOutTradeNo:input_type -> payment.WechatNativeQueryByOutTradeNoRequest
|
||||
50, // 39: payment.Payment.WechatRefundQueryByOutRefundNo:input_type -> payment.WechatRefundQueryByOutRefundNoRequest
|
||||
55, // 40: payment.Payment.WechatH5Pay:input_type -> payment.WechatH5PayRequest
|
||||
57, // 41: payment.Payment.WechatH5QueryByOutTradeNo:input_type -> payment.WechatH5QueryByOutTradeNoRequest
|
||||
5, // 42: payment.Payment.CreatePay:output_type -> payment.CreatePayResponse
|
||||
9, // 43: payment.Payment.NotifyPay:output_type -> payment.NotifyPayResponse
|
||||
62, // 44: payment.Payment.QueryPayByOutTradeNo:output_type -> payment.PayQueryResponse
|
||||
65, // 45: payment.Payment.QueryExportPay:output_type -> payment.ExportPayResponse
|
||||
7, // 46: payment.Payment.CreateRefund:output_type -> payment.CreateRefundResponse
|
||||
16, // 47: payment.Payment.StripeGermanyWebhook:output_type -> payment.GetCheckoutWebhookResponse
|
||||
9, // 48: payment.Payment.AliCommonWebhook:output_type -> payment.NotifyPayResponse
|
||||
9, // 49: payment.Payment.WechatFengLianWebhook:output_type -> payment.NotifyPayResponse
|
||||
3, // 50: payment.Payment.AntomWebhook:output_type -> payment.AntomNotifyPayResponse
|
||||
1, // 51: payment.Payment.QueryAntomPayByCheckoutSessionId:output_type -> payment.AntomPayQueryResponse
|
||||
14, // 52: payment.Payment.CreateStripeCheckoutSession:output_type -> payment.CreateStripeCheckoutSessionResponse
|
||||
22, // 53: payment.Payment.AliWapPay:output_type -> payment.AliWapPayResponse
|
||||
24, // 54: payment.Payment.AliAppPay:output_type -> payment.AliAppPayResponse
|
||||
26, // 55: payment.Payment.AliNativePay:output_type -> payment.AliNativePayResponse
|
||||
28, // 56: payment.Payment.AliPcWabPay:output_type -> payment.AliPcWabPayResponse
|
||||
30, // 57: payment.Payment.AliReFund:output_type -> payment.AliReFundResponse
|
||||
32, // 58: payment.Payment.AliNotify:output_type -> payment.AliNotifyResponse
|
||||
34, // 59: payment.Payment.AliQueryByOutTradeNo:output_type -> payment.AliQueryByOutTradeNoResponse
|
||||
36, // 60: payment.Payment.AliRefundQueryByOutTradeNo:output_type -> payment.AliRefundQueryByOutTradeNoResponse
|
||||
38, // 61: payment.Payment.WechatJsApiPay:output_type -> payment.WechatJsApiPayResponse
|
||||
41, // 62: payment.Payment.WechatJsApiQueryByOutTradeNo:output_type -> payment.WechatJsApiQueryByOutTradeNoResponse
|
||||
45, // 63: payment.Payment.GetPayByOutTradeNo:output_type -> payment.GetPayByOutTradeNoResponse
|
||||
46, // 64: payment.Payment.WechatJsApiRefunds:output_type -> payment.WechatJsApiRefundsResponse
|
||||
60, // 65: payment.Payment.SetPayOk:output_type -> payment.CommonResponse
|
||||
39, // 66: payment.Payment.WechatAppPay:output_type -> payment.WechatAppPayResponse
|
||||
43, // 67: payment.Payment.WechatAppQueryByOutTradeNo:output_type -> payment.WechatAppQueryByOutTradeNoResponse
|
||||
48, // 68: payment.Payment.WechatNativePay:output_type -> payment.WechatNativePayResponse
|
||||
52, // 69: payment.Payment.WechatNativeQueryByOutTradeNo:output_type -> payment.WechatNativeQueryByOutTradeNoResponse
|
||||
51, // 70: payment.Payment.WechatRefundQueryByOutRefundNo:output_type -> payment.WechatRefundQueryByOutRefundNoResponse
|
||||
56, // 71: payment.Payment.WechatH5Pay:output_type -> payment.WechatH5PayResponse
|
||||
58, // 72: payment.Payment.WechatH5QueryByOutTradeNo:output_type -> payment.WechatH5QueryByOutTradeNoResponse
|
||||
4, // 11: payment.PaymentCent.CreatePay:input_type -> payment.CreatePayRequest
|
||||
8, // 12: payment.PaymentCent.NotifyPay:input_type -> payment.NotifyPayRequest
|
||||
61, // 13: payment.PaymentCent.QueryPayByOutTradeNo:input_type -> payment.PayQueryRequest
|
||||
64, // 14: payment.PaymentCent.QueryExportPay:input_type -> payment.ExportPayRequest
|
||||
6, // 15: payment.PaymentCent.CreateRefund:input_type -> payment.CreateRefundRequest
|
||||
15, // 16: payment.PaymentCent.StripeGermanyWebhook:input_type -> payment.GetCheckoutWebhookRequest
|
||||
8, // 17: payment.PaymentCent.AliCommonWebhook:input_type -> payment.NotifyPayRequest
|
||||
8, // 18: payment.PaymentCent.WechatFengLianWebhook:input_type -> payment.NotifyPayRequest
|
||||
2, // 19: payment.PaymentCent.AntomWebhook:input_type -> payment.AntomNotifyPayRequest
|
||||
0, // 20: payment.PaymentCent.QueryAntomPayByCheckoutSessionId:input_type -> payment.AntomPayQueryRequest
|
||||
13, // 21: payment.PaymentCent.CreateStripeCheckoutSession:input_type -> payment.CreateStripeCheckoutSessionRequest
|
||||
21, // 22: payment.PaymentCent.AliWapPay:input_type -> payment.AliWapPayRequest
|
||||
23, // 23: payment.PaymentCent.AliAppPay:input_type -> payment.AliAppPayRequest
|
||||
25, // 24: payment.PaymentCent.AliNativePay:input_type -> payment.AliNativePayRequest
|
||||
27, // 25: payment.PaymentCent.AliPcWabPay:input_type -> payment.AliPcWabPayRequest
|
||||
29, // 26: payment.PaymentCent.AliReFund:input_type -> payment.AliReFundRequest
|
||||
31, // 27: payment.PaymentCent.AliNotify:input_type -> payment.AliNotifyRequest
|
||||
33, // 28: payment.PaymentCent.AliQueryByOutTradeNo:input_type -> payment.AliQueryByOutTradeNoRequest
|
||||
35, // 29: payment.PaymentCent.AliRefundQueryByOutTradeNo:input_type -> payment.AliRefundQueryByOutTradeNoRequest
|
||||
37, // 30: payment.PaymentCent.WechatJsApiPay:input_type -> payment.WechatJsApiPayRequest
|
||||
40, // 31: payment.PaymentCent.WechatJsApiQueryByOutTradeNo:input_type -> payment.WechatJsApiQueryByOutTradeNoRequest
|
||||
44, // 32: payment.PaymentCent.GetPayByOutTradeNo:input_type -> payment.GetPayByOutTradeNoRequest
|
||||
54, // 33: payment.PaymentCent.WechatJsApiRefunds:input_type -> payment.WechatJsApiRefundsRequest
|
||||
59, // 34: payment.PaymentCent.SetPayOk:input_type -> payment.WechatPayOkRequest
|
||||
53, // 35: payment.PaymentCent.WechatAppPay:input_type -> payment.WechatAppPayRequest
|
||||
42, // 36: payment.PaymentCent.WechatAppQueryByOutTradeNo:input_type -> payment.WechatAppQueryByOutTradeNoRequest
|
||||
47, // 37: payment.PaymentCent.WechatNativePay:input_type -> payment.WechatNativePayRequest
|
||||
49, // 38: payment.PaymentCent.WechatNativeQueryByOutTradeNo:input_type -> payment.WechatNativeQueryByOutTradeNoRequest
|
||||
50, // 39: payment.PaymentCent.WechatRefundQueryByOutRefundNo:input_type -> payment.WechatRefundQueryByOutRefundNoRequest
|
||||
55, // 40: payment.PaymentCent.WechatH5Pay:input_type -> payment.WechatH5PayRequest
|
||||
57, // 41: payment.PaymentCent.WechatH5QueryByOutTradeNo:input_type -> payment.WechatH5QueryByOutTradeNoRequest
|
||||
5, // 42: payment.PaymentCent.CreatePay:output_type -> payment.CreatePayResponse
|
||||
9, // 43: payment.PaymentCent.NotifyPay:output_type -> payment.NotifyPayResponse
|
||||
62, // 44: payment.PaymentCent.QueryPayByOutTradeNo:output_type -> payment.PayQueryResponse
|
||||
65, // 45: payment.PaymentCent.QueryExportPay:output_type -> payment.ExportPayResponse
|
||||
7, // 46: payment.PaymentCent.CreateRefund:output_type -> payment.CreateRefundResponse
|
||||
16, // 47: payment.PaymentCent.StripeGermanyWebhook:output_type -> payment.GetCheckoutWebhookResponse
|
||||
9, // 48: payment.PaymentCent.AliCommonWebhook:output_type -> payment.NotifyPayResponse
|
||||
9, // 49: payment.PaymentCent.WechatFengLianWebhook:output_type -> payment.NotifyPayResponse
|
||||
3, // 50: payment.PaymentCent.AntomWebhook:output_type -> payment.AntomNotifyPayResponse
|
||||
1, // 51: payment.PaymentCent.QueryAntomPayByCheckoutSessionId:output_type -> payment.AntomPayQueryResponse
|
||||
14, // 52: payment.PaymentCent.CreateStripeCheckoutSession:output_type -> payment.CreateStripeCheckoutSessionResponse
|
||||
22, // 53: payment.PaymentCent.AliWapPay:output_type -> payment.AliWapPayResponse
|
||||
24, // 54: payment.PaymentCent.AliAppPay:output_type -> payment.AliAppPayResponse
|
||||
26, // 55: payment.PaymentCent.AliNativePay:output_type -> payment.AliNativePayResponse
|
||||
28, // 56: payment.PaymentCent.AliPcWabPay:output_type -> payment.AliPcWabPayResponse
|
||||
30, // 57: payment.PaymentCent.AliReFund:output_type -> payment.AliReFundResponse
|
||||
32, // 58: payment.PaymentCent.AliNotify:output_type -> payment.AliNotifyResponse
|
||||
34, // 59: payment.PaymentCent.AliQueryByOutTradeNo:output_type -> payment.AliQueryByOutTradeNoResponse
|
||||
36, // 60: payment.PaymentCent.AliRefundQueryByOutTradeNo:output_type -> payment.AliRefundQueryByOutTradeNoResponse
|
||||
38, // 61: payment.PaymentCent.WechatJsApiPay:output_type -> payment.WechatJsApiPayResponse
|
||||
41, // 62: payment.PaymentCent.WechatJsApiQueryByOutTradeNo:output_type -> payment.WechatJsApiQueryByOutTradeNoResponse
|
||||
45, // 63: payment.PaymentCent.GetPayByOutTradeNo:output_type -> payment.GetPayByOutTradeNoResponse
|
||||
46, // 64: payment.PaymentCent.WechatJsApiRefunds:output_type -> payment.WechatJsApiRefundsResponse
|
||||
60, // 65: payment.PaymentCent.SetPayOk:output_type -> payment.CommonResponse
|
||||
39, // 66: payment.PaymentCent.WechatAppPay:output_type -> payment.WechatAppPayResponse
|
||||
43, // 67: payment.PaymentCent.WechatAppQueryByOutTradeNo:output_type -> payment.WechatAppQueryByOutTradeNoResponse
|
||||
48, // 68: payment.PaymentCent.WechatNativePay:output_type -> payment.WechatNativePayResponse
|
||||
52, // 69: payment.PaymentCent.WechatNativeQueryByOutTradeNo:output_type -> payment.WechatNativeQueryByOutTradeNoResponse
|
||||
51, // 70: payment.PaymentCent.WechatRefundQueryByOutRefundNo:output_type -> payment.WechatRefundQueryByOutRefundNoResponse
|
||||
56, // 71: payment.PaymentCent.WechatH5Pay:output_type -> payment.WechatH5PayResponse
|
||||
58, // 72: payment.PaymentCent.WechatH5QueryByOutTradeNo:output_type -> payment.WechatH5QueryByOutTradeNoResponse
|
||||
42, // [42:73] is the sub-list for method output_type
|
||||
11, // [11:42] is the sub-list for method input_type
|
||||
11, // [11:11] is the sub-list for extension type_name
|
||||
|
@ -4,7 +4,7 @@ package payment;
|
||||
option go_package = "./payment";
|
||||
|
||||
//import "pb/descriptor.proto";
|
||||
service Payment{
|
||||
service PaymentCent{
|
||||
|
||||
// 统一渠道支付
|
||||
rpc CreatePay(CreatePayRequest) returns (CreatePayResponse); // 创建支付
|
||||
|
@ -24,10 +24,10 @@ import (
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// PaymentClient is the client API for Payment service.
|
||||
// PaymentCentClient is the client API for PaymentCent 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 PaymentClient interface {
|
||||
type PaymentCentClient interface {
|
||||
// 统一渠道支付
|
||||
CreatePay(ctx context.Context, in *CreatePayRequest, opts ...grpc_go.CallOption) (*CreatePayResponse, common.ErrorWithAttachment)
|
||||
NotifyPay(ctx context.Context, in *NotifyPayRequest, opts ...grpc_go.CallOption) (*NotifyPayResponse, common.ErrorWithAttachment)
|
||||
@ -65,11 +65,11 @@ type PaymentClient interface {
|
||||
WechatH5QueryByOutTradeNo(ctx context.Context, in *WechatH5QueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*WechatH5QueryByOutTradeNoResponse, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type paymentClient struct {
|
||||
type paymentCentClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type PaymentClientImpl struct {
|
||||
type PaymentCentClientImpl struct {
|
||||
CreatePay func(ctx context.Context, in *CreatePayRequest) (*CreatePayResponse, error)
|
||||
NotifyPay func(ctx context.Context, in *NotifyPayRequest) (*NotifyPayResponse, error)
|
||||
QueryPayByOutTradeNo func(ctx context.Context, in *PayQueryRequest) (*PayQueryResponse, error)
|
||||
@ -103,208 +103,208 @@ type PaymentClientImpl struct {
|
||||
WechatH5QueryByOutTradeNo func(ctx context.Context, in *WechatH5QueryByOutTradeNoRequest) (*WechatH5QueryByOutTradeNoResponse, error)
|
||||
}
|
||||
|
||||
func (c *PaymentClientImpl) GetDubboStub(cc *triple.TripleConn) PaymentClient {
|
||||
return NewPaymentClient(cc)
|
||||
func (c *PaymentCentClientImpl) GetDubboStub(cc *triple.TripleConn) PaymentCentClient {
|
||||
return NewPaymentCentClient(cc)
|
||||
}
|
||||
|
||||
func (c *PaymentClientImpl) XXX_InterfaceName() string {
|
||||
return "payment.Payment"
|
||||
func (c *PaymentCentClientImpl) XXX_InterfaceName() string {
|
||||
return "payment.PaymentCent"
|
||||
}
|
||||
|
||||
func NewPaymentClient(cc *triple.TripleConn) PaymentClient {
|
||||
return &paymentClient{cc}
|
||||
func NewPaymentCentClient(cc *triple.TripleConn) PaymentCentClient {
|
||||
return &paymentCentClient{cc}
|
||||
}
|
||||
|
||||
func (c *paymentClient) CreatePay(ctx context.Context, in *CreatePayRequest, opts ...grpc_go.CallOption) (*CreatePayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) CreatePay(ctx context.Context, in *CreatePayRequest, opts ...grpc_go.CallOption) (*CreatePayResponse, common.ErrorWithAttachment) {
|
||||
out := new(CreatePayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreatePay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) NotifyPay(ctx context.Context, in *NotifyPayRequest, opts ...grpc_go.CallOption) (*NotifyPayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) NotifyPay(ctx context.Context, in *NotifyPayRequest, opts ...grpc_go.CallOption) (*NotifyPayResponse, common.ErrorWithAttachment) {
|
||||
out := new(NotifyPayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/NotifyPay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) QueryPayByOutTradeNo(ctx context.Context, in *PayQueryRequest, opts ...grpc_go.CallOption) (*PayQueryResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) QueryPayByOutTradeNo(ctx context.Context, in *PayQueryRequest, opts ...grpc_go.CallOption) (*PayQueryResponse, common.ErrorWithAttachment) {
|
||||
out := new(PayQueryResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/QueryPayByOutTradeNo", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) QueryExportPay(ctx context.Context, in *ExportPayRequest, opts ...grpc_go.CallOption) (*ExportPayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) QueryExportPay(ctx context.Context, in *ExportPayRequest, opts ...grpc_go.CallOption) (*ExportPayResponse, common.ErrorWithAttachment) {
|
||||
out := new(ExportPayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/QueryExportPay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) CreateRefund(ctx context.Context, in *CreateRefundRequest, opts ...grpc_go.CallOption) (*CreateRefundResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) CreateRefund(ctx context.Context, in *CreateRefundRequest, opts ...grpc_go.CallOption) (*CreateRefundResponse, common.ErrorWithAttachment) {
|
||||
out := new(CreateRefundResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateRefund", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) StripeGermanyWebhook(ctx context.Context, in *GetCheckoutWebhookRequest, opts ...grpc_go.CallOption) (*GetCheckoutWebhookResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) StripeGermanyWebhook(ctx context.Context, in *GetCheckoutWebhookRequest, opts ...grpc_go.CallOption) (*GetCheckoutWebhookResponse, common.ErrorWithAttachment) {
|
||||
out := new(GetCheckoutWebhookResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/StripeGermanyWebhook", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) AliCommonWebhook(ctx context.Context, in *NotifyPayRequest, opts ...grpc_go.CallOption) (*NotifyPayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) AliCommonWebhook(ctx context.Context, in *NotifyPayRequest, opts ...grpc_go.CallOption) (*NotifyPayResponse, common.ErrorWithAttachment) {
|
||||
out := new(NotifyPayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AliCommonWebhook", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatFengLianWebhook(ctx context.Context, in *NotifyPayRequest, opts ...grpc_go.CallOption) (*NotifyPayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatFengLianWebhook(ctx context.Context, in *NotifyPayRequest, opts ...grpc_go.CallOption) (*NotifyPayResponse, common.ErrorWithAttachment) {
|
||||
out := new(NotifyPayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatFengLianWebhook", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) AntomWebhook(ctx context.Context, in *AntomNotifyPayRequest, opts ...grpc_go.CallOption) (*AntomNotifyPayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) AntomWebhook(ctx context.Context, in *AntomNotifyPayRequest, opts ...grpc_go.CallOption) (*AntomNotifyPayResponse, common.ErrorWithAttachment) {
|
||||
out := new(AntomNotifyPayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AntomWebhook", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) QueryAntomPayByCheckoutSessionId(ctx context.Context, in *AntomPayQueryRequest, opts ...grpc_go.CallOption) (*AntomPayQueryResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) QueryAntomPayByCheckoutSessionId(ctx context.Context, in *AntomPayQueryRequest, opts ...grpc_go.CallOption) (*AntomPayQueryResponse, common.ErrorWithAttachment) {
|
||||
out := new(AntomPayQueryResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/QueryAntomPayByCheckoutSessionId", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) CreateStripeCheckoutSession(ctx context.Context, in *CreateStripeCheckoutSessionRequest, opts ...grpc_go.CallOption) (*CreateStripeCheckoutSessionResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) CreateStripeCheckoutSession(ctx context.Context, in *CreateStripeCheckoutSessionRequest, opts ...grpc_go.CallOption) (*CreateStripeCheckoutSessionResponse, common.ErrorWithAttachment) {
|
||||
out := new(CreateStripeCheckoutSessionResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateStripeCheckoutSession", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) AliWapPay(ctx context.Context, in *AliWapPayRequest, opts ...grpc_go.CallOption) (*AliWapPayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) AliWapPay(ctx context.Context, in *AliWapPayRequest, opts ...grpc_go.CallOption) (*AliWapPayResponse, common.ErrorWithAttachment) {
|
||||
out := new(AliWapPayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AliWapPay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) AliAppPay(ctx context.Context, in *AliAppPayRequest, opts ...grpc_go.CallOption) (*AliAppPayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) AliAppPay(ctx context.Context, in *AliAppPayRequest, opts ...grpc_go.CallOption) (*AliAppPayResponse, common.ErrorWithAttachment) {
|
||||
out := new(AliAppPayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AliAppPay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) AliNativePay(ctx context.Context, in *AliNativePayRequest, opts ...grpc_go.CallOption) (*AliNativePayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) AliNativePay(ctx context.Context, in *AliNativePayRequest, opts ...grpc_go.CallOption) (*AliNativePayResponse, common.ErrorWithAttachment) {
|
||||
out := new(AliNativePayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AliNativePay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) AliPcWabPay(ctx context.Context, in *AliPcWabPayRequest, opts ...grpc_go.CallOption) (*AliPcWabPayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) AliPcWabPay(ctx context.Context, in *AliPcWabPayRequest, opts ...grpc_go.CallOption) (*AliPcWabPayResponse, common.ErrorWithAttachment) {
|
||||
out := new(AliPcWabPayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AliPcWabPay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) AliReFund(ctx context.Context, in *AliReFundRequest, opts ...grpc_go.CallOption) (*AliReFundResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) AliReFund(ctx context.Context, in *AliReFundRequest, opts ...grpc_go.CallOption) (*AliReFundResponse, common.ErrorWithAttachment) {
|
||||
out := new(AliReFundResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AliReFund", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) AliNotify(ctx context.Context, in *AliNotifyRequest, opts ...grpc_go.CallOption) (*AliNotifyResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) AliNotify(ctx context.Context, in *AliNotifyRequest, opts ...grpc_go.CallOption) (*AliNotifyResponse, common.ErrorWithAttachment) {
|
||||
out := new(AliNotifyResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AliNotify", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) AliQueryByOutTradeNo(ctx context.Context, in *AliQueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*AliQueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) AliQueryByOutTradeNo(ctx context.Context, in *AliQueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*AliQueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
out := new(AliQueryByOutTradeNoResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AliQueryByOutTradeNo", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) AliRefundQueryByOutTradeNo(ctx context.Context, in *AliRefundQueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*AliRefundQueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) AliRefundQueryByOutTradeNo(ctx context.Context, in *AliRefundQueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*AliRefundQueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
out := new(AliRefundQueryByOutTradeNoResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AliRefundQueryByOutTradeNo", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatJsApiPay(ctx context.Context, in *WechatJsApiPayRequest, opts ...grpc_go.CallOption) (*WechatJsApiPayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatJsApiPay(ctx context.Context, in *WechatJsApiPayRequest, opts ...grpc_go.CallOption) (*WechatJsApiPayResponse, common.ErrorWithAttachment) {
|
||||
out := new(WechatJsApiPayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatJsApiPay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatJsApiQueryByOutTradeNo(ctx context.Context, in *WechatJsApiQueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*WechatJsApiQueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatJsApiQueryByOutTradeNo(ctx context.Context, in *WechatJsApiQueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*WechatJsApiQueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
out := new(WechatJsApiQueryByOutTradeNoResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatJsApiQueryByOutTradeNo", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) GetPayByOutTradeNo(ctx context.Context, in *GetPayByOutTradeNoRequest, opts ...grpc_go.CallOption) (*GetPayByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) GetPayByOutTradeNo(ctx context.Context, in *GetPayByOutTradeNoRequest, opts ...grpc_go.CallOption) (*GetPayByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
out := new(GetPayByOutTradeNoResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetPayByOutTradeNo", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatJsApiRefunds(ctx context.Context, in *WechatJsApiRefundsRequest, opts ...grpc_go.CallOption) (*WechatJsApiRefundsResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatJsApiRefunds(ctx context.Context, in *WechatJsApiRefundsRequest, opts ...grpc_go.CallOption) (*WechatJsApiRefundsResponse, common.ErrorWithAttachment) {
|
||||
out := new(WechatJsApiRefundsResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatJsApiRefunds", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) SetPayOk(ctx context.Context, in *WechatPayOkRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) SetPayOk(ctx context.Context, in *WechatPayOkRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SetPayOk", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatAppPay(ctx context.Context, in *WechatAppPayRequest, opts ...grpc_go.CallOption) (*WechatAppPayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatAppPay(ctx context.Context, in *WechatAppPayRequest, opts ...grpc_go.CallOption) (*WechatAppPayResponse, common.ErrorWithAttachment) {
|
||||
out := new(WechatAppPayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatAppPay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatAppQueryByOutTradeNo(ctx context.Context, in *WechatAppQueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*WechatAppQueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatAppQueryByOutTradeNo(ctx context.Context, in *WechatAppQueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*WechatAppQueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
out := new(WechatAppQueryByOutTradeNoResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatAppQueryByOutTradeNo", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatNativePay(ctx context.Context, in *WechatNativePayRequest, opts ...grpc_go.CallOption) (*WechatNativePayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatNativePay(ctx context.Context, in *WechatNativePayRequest, opts ...grpc_go.CallOption) (*WechatNativePayResponse, common.ErrorWithAttachment) {
|
||||
out := new(WechatNativePayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatNativePay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatNativeQueryByOutTradeNo(ctx context.Context, in *WechatNativeQueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*WechatNativeQueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatNativeQueryByOutTradeNo(ctx context.Context, in *WechatNativeQueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*WechatNativeQueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
out := new(WechatNativeQueryByOutTradeNoResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatNativeQueryByOutTradeNo", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatRefundQueryByOutRefundNo(ctx context.Context, in *WechatRefundQueryByOutRefundNoRequest, opts ...grpc_go.CallOption) (*WechatRefundQueryByOutRefundNoResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatRefundQueryByOutRefundNo(ctx context.Context, in *WechatRefundQueryByOutRefundNoRequest, opts ...grpc_go.CallOption) (*WechatRefundQueryByOutRefundNoResponse, common.ErrorWithAttachment) {
|
||||
out := new(WechatRefundQueryByOutRefundNoResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatRefundQueryByOutRefundNo", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatH5Pay(ctx context.Context, in *WechatH5PayRequest, opts ...grpc_go.CallOption) (*WechatH5PayResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatH5Pay(ctx context.Context, in *WechatH5PayRequest, opts ...grpc_go.CallOption) (*WechatH5PayResponse, common.ErrorWithAttachment) {
|
||||
out := new(WechatH5PayResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatH5Pay", in, out)
|
||||
}
|
||||
|
||||
func (c *paymentClient) WechatH5QueryByOutTradeNo(ctx context.Context, in *WechatH5QueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*WechatH5QueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
func (c *paymentCentClient) WechatH5QueryByOutTradeNo(ctx context.Context, in *WechatH5QueryByOutTradeNoRequest, opts ...grpc_go.CallOption) (*WechatH5QueryByOutTradeNoResponse, common.ErrorWithAttachment) {
|
||||
out := new(WechatH5QueryByOutTradeNoResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WechatH5QueryByOutTradeNo", in, out)
|
||||
}
|
||||
|
||||
// PaymentServer is the server API for Payment service.
|
||||
// All implementations must embed UnimplementedPaymentServer
|
||||
// PaymentCentServer is the server API for PaymentCent service.
|
||||
// All implementations must embed UnimplementedPaymentCentServer
|
||||
// for forward compatibility
|
||||
type PaymentServer interface {
|
||||
type PaymentCentServer interface {
|
||||
// 统一渠道支付
|
||||
CreatePay(context.Context, *CreatePayRequest) (*CreatePayResponse, error)
|
||||
NotifyPay(context.Context, *NotifyPayRequest) (*NotifyPayResponse, error)
|
||||
@ -340,136 +340,136 @@ type PaymentServer interface {
|
||||
WechatRefundQueryByOutRefundNo(context.Context, *WechatRefundQueryByOutRefundNoRequest) (*WechatRefundQueryByOutRefundNoResponse, error)
|
||||
WechatH5Pay(context.Context, *WechatH5PayRequest) (*WechatH5PayResponse, error)
|
||||
WechatH5QueryByOutTradeNo(context.Context, *WechatH5QueryByOutTradeNoRequest) (*WechatH5QueryByOutTradeNoResponse, error)
|
||||
mustEmbedUnimplementedPaymentServer()
|
||||
mustEmbedUnimplementedPaymentCentServer()
|
||||
}
|
||||
|
||||
// UnimplementedPaymentServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedPaymentServer struct {
|
||||
// UnimplementedPaymentCentServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedPaymentCentServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedPaymentServer) CreatePay(context.Context, *CreatePayRequest) (*CreatePayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) CreatePay(context.Context, *CreatePayRequest) (*CreatePayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreatePay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) NotifyPay(context.Context, *NotifyPayRequest) (*NotifyPayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) NotifyPay(context.Context, *NotifyPayRequest) (*NotifyPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NotifyPay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) QueryPayByOutTradeNo(context.Context, *PayQueryRequest) (*PayQueryResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) QueryPayByOutTradeNo(context.Context, *PayQueryRequest) (*PayQueryResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryPayByOutTradeNo not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) QueryExportPay(context.Context, *ExportPayRequest) (*ExportPayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) QueryExportPay(context.Context, *ExportPayRequest) (*ExportPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryExportPay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) CreateRefund(context.Context, *CreateRefundRequest) (*CreateRefundResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) CreateRefund(context.Context, *CreateRefundRequest) (*CreateRefundResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateRefund not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) StripeGermanyWebhook(context.Context, *GetCheckoutWebhookRequest) (*GetCheckoutWebhookResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) StripeGermanyWebhook(context.Context, *GetCheckoutWebhookRequest) (*GetCheckoutWebhookResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method StripeGermanyWebhook not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) AliCommonWebhook(context.Context, *NotifyPayRequest) (*NotifyPayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) AliCommonWebhook(context.Context, *NotifyPayRequest) (*NotifyPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AliCommonWebhook not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatFengLianWebhook(context.Context, *NotifyPayRequest) (*NotifyPayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatFengLianWebhook(context.Context, *NotifyPayRequest) (*NotifyPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatFengLianWebhook not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) AntomWebhook(context.Context, *AntomNotifyPayRequest) (*AntomNotifyPayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) AntomWebhook(context.Context, *AntomNotifyPayRequest) (*AntomNotifyPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AntomWebhook not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) QueryAntomPayByCheckoutSessionId(context.Context, *AntomPayQueryRequest) (*AntomPayQueryResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) QueryAntomPayByCheckoutSessionId(context.Context, *AntomPayQueryRequest) (*AntomPayQueryResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryAntomPayByCheckoutSessionId not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) CreateStripeCheckoutSession(context.Context, *CreateStripeCheckoutSessionRequest) (*CreateStripeCheckoutSessionResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) CreateStripeCheckoutSession(context.Context, *CreateStripeCheckoutSessionRequest) (*CreateStripeCheckoutSessionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateStripeCheckoutSession not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) AliWapPay(context.Context, *AliWapPayRequest) (*AliWapPayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) AliWapPay(context.Context, *AliWapPayRequest) (*AliWapPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AliWapPay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) AliAppPay(context.Context, *AliAppPayRequest) (*AliAppPayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) AliAppPay(context.Context, *AliAppPayRequest) (*AliAppPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AliAppPay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) AliNativePay(context.Context, *AliNativePayRequest) (*AliNativePayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) AliNativePay(context.Context, *AliNativePayRequest) (*AliNativePayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AliNativePay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) AliPcWabPay(context.Context, *AliPcWabPayRequest) (*AliPcWabPayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) AliPcWabPay(context.Context, *AliPcWabPayRequest) (*AliPcWabPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AliPcWabPay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) AliReFund(context.Context, *AliReFundRequest) (*AliReFundResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) AliReFund(context.Context, *AliReFundRequest) (*AliReFundResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AliReFund not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) AliNotify(context.Context, *AliNotifyRequest) (*AliNotifyResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) AliNotify(context.Context, *AliNotifyRequest) (*AliNotifyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AliNotify not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) AliQueryByOutTradeNo(context.Context, *AliQueryByOutTradeNoRequest) (*AliQueryByOutTradeNoResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) AliQueryByOutTradeNo(context.Context, *AliQueryByOutTradeNoRequest) (*AliQueryByOutTradeNoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AliQueryByOutTradeNo not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) AliRefundQueryByOutTradeNo(context.Context, *AliRefundQueryByOutTradeNoRequest) (*AliRefundQueryByOutTradeNoResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) AliRefundQueryByOutTradeNo(context.Context, *AliRefundQueryByOutTradeNoRequest) (*AliRefundQueryByOutTradeNoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AliRefundQueryByOutTradeNo not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatJsApiPay(context.Context, *WechatJsApiPayRequest) (*WechatJsApiPayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatJsApiPay(context.Context, *WechatJsApiPayRequest) (*WechatJsApiPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatJsApiPay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatJsApiQueryByOutTradeNo(context.Context, *WechatJsApiQueryByOutTradeNoRequest) (*WechatJsApiQueryByOutTradeNoResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatJsApiQueryByOutTradeNo(context.Context, *WechatJsApiQueryByOutTradeNoRequest) (*WechatJsApiQueryByOutTradeNoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatJsApiQueryByOutTradeNo not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) GetPayByOutTradeNo(context.Context, *GetPayByOutTradeNoRequest) (*GetPayByOutTradeNoResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) GetPayByOutTradeNo(context.Context, *GetPayByOutTradeNoRequest) (*GetPayByOutTradeNoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPayByOutTradeNo not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatJsApiRefunds(context.Context, *WechatJsApiRefundsRequest) (*WechatJsApiRefundsResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatJsApiRefunds(context.Context, *WechatJsApiRefundsRequest) (*WechatJsApiRefundsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatJsApiRefunds not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) SetPayOk(context.Context, *WechatPayOkRequest) (*CommonResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) SetPayOk(context.Context, *WechatPayOkRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetPayOk not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatAppPay(context.Context, *WechatAppPayRequest) (*WechatAppPayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatAppPay(context.Context, *WechatAppPayRequest) (*WechatAppPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatAppPay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatAppQueryByOutTradeNo(context.Context, *WechatAppQueryByOutTradeNoRequest) (*WechatAppQueryByOutTradeNoResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatAppQueryByOutTradeNo(context.Context, *WechatAppQueryByOutTradeNoRequest) (*WechatAppQueryByOutTradeNoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatAppQueryByOutTradeNo not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatNativePay(context.Context, *WechatNativePayRequest) (*WechatNativePayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatNativePay(context.Context, *WechatNativePayRequest) (*WechatNativePayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatNativePay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatNativeQueryByOutTradeNo(context.Context, *WechatNativeQueryByOutTradeNoRequest) (*WechatNativeQueryByOutTradeNoResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatNativeQueryByOutTradeNo(context.Context, *WechatNativeQueryByOutTradeNoRequest) (*WechatNativeQueryByOutTradeNoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatNativeQueryByOutTradeNo not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatRefundQueryByOutRefundNo(context.Context, *WechatRefundQueryByOutRefundNoRequest) (*WechatRefundQueryByOutRefundNoResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatRefundQueryByOutRefundNo(context.Context, *WechatRefundQueryByOutRefundNoRequest) (*WechatRefundQueryByOutRefundNoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatRefundQueryByOutRefundNo not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatH5Pay(context.Context, *WechatH5PayRequest) (*WechatH5PayResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatH5Pay(context.Context, *WechatH5PayRequest) (*WechatH5PayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatH5Pay not implemented")
|
||||
}
|
||||
func (UnimplementedPaymentServer) WechatH5QueryByOutTradeNo(context.Context, *WechatH5QueryByOutTradeNoRequest) (*WechatH5QueryByOutTradeNoResponse, error) {
|
||||
func (UnimplementedPaymentCentServer) WechatH5QueryByOutTradeNo(context.Context, *WechatH5QueryByOutTradeNoRequest) (*WechatH5QueryByOutTradeNoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WechatH5QueryByOutTradeNo not implemented")
|
||||
}
|
||||
func (s *UnimplementedPaymentServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
func (s *UnimplementedPaymentCentServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedPaymentServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
func (s *UnimplementedPaymentCentServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedPaymentServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &Payment_ServiceDesc
|
||||
func (s *UnimplementedPaymentCentServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &PaymentCent_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedPaymentServer) XXX_InterfaceName() string {
|
||||
return "payment.Payment"
|
||||
func (s *UnimplementedPaymentCentServer) XXX_InterfaceName() string {
|
||||
return "payment.PaymentCent"
|
||||
}
|
||||
|
||||
func (UnimplementedPaymentServer) mustEmbedUnimplementedPaymentServer() {}
|
||||
func (UnimplementedPaymentCentServer) mustEmbedUnimplementedPaymentCentServer() {}
|
||||
|
||||
// UnsafePaymentServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PaymentServer will
|
||||
// UnsafePaymentCentServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PaymentCentServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePaymentServer interface {
|
||||
mustEmbedUnimplementedPaymentServer()
|
||||
type UnsafePaymentCentServer interface {
|
||||
mustEmbedUnimplementedPaymentCentServer()
|
||||
}
|
||||
|
||||
func RegisterPaymentServer(s grpc_go.ServiceRegistrar, srv PaymentServer) {
|
||||
s.RegisterService(&Payment_ServiceDesc, srv)
|
||||
func RegisterPaymentCentServer(s grpc_go.ServiceRegistrar, srv PaymentCentServer) {
|
||||
s.RegisterService(&PaymentCent_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Payment_CreatePay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_CreatePay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreatePayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -498,7 +498,7 @@ func _Payment_CreatePay_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_NotifyPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_NotifyPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(NotifyPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -527,7 +527,7 @@ func _Payment_NotifyPay_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_QueryPayByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_QueryPayByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PayQueryRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -556,7 +556,7 @@ func _Payment_QueryPayByOutTradeNo_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_QueryExportPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_QueryExportPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExportPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -585,7 +585,7 @@ func _Payment_QueryExportPay_Handler(srv interface{}, ctx context.Context, dec f
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_CreateRefund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_CreateRefund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateRefundRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -614,7 +614,7 @@ func _Payment_CreateRefund_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_StripeGermanyWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_StripeGermanyWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetCheckoutWebhookRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -643,7 +643,7 @@ func _Payment_StripeGermanyWebhook_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_AliCommonWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_AliCommonWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(NotifyPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -672,7 +672,7 @@ func _Payment_AliCommonWebhook_Handler(srv interface{}, ctx context.Context, dec
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatFengLianWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatFengLianWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(NotifyPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -701,7 +701,7 @@ func _Payment_WechatFengLianWebhook_Handler(srv interface{}, ctx context.Context
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_AntomWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_AntomWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AntomNotifyPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -730,7 +730,7 @@ func _Payment_AntomWebhook_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_QueryAntomPayByCheckoutSessionId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_QueryAntomPayByCheckoutSessionId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AntomPayQueryRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -759,7 +759,7 @@ func _Payment_QueryAntomPayByCheckoutSessionId_Handler(srv interface{}, ctx cont
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_CreateStripeCheckoutSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_CreateStripeCheckoutSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateStripeCheckoutSessionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -788,7 +788,7 @@ func _Payment_CreateStripeCheckoutSession_Handler(srv interface{}, ctx context.C
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_AliWapPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_AliWapPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AliWapPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -817,7 +817,7 @@ func _Payment_AliWapPay_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_AliAppPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_AliAppPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AliAppPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -846,7 +846,7 @@ func _Payment_AliAppPay_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_AliNativePay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_AliNativePay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AliNativePayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -875,7 +875,7 @@ func _Payment_AliNativePay_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_AliPcWabPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_AliPcWabPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AliPcWabPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -904,7 +904,7 @@ func _Payment_AliPcWabPay_Handler(srv interface{}, ctx context.Context, dec func
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_AliReFund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_AliReFund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AliReFundRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -933,7 +933,7 @@ func _Payment_AliReFund_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_AliNotify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_AliNotify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AliNotifyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -962,7 +962,7 @@ func _Payment_AliNotify_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_AliQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_AliQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AliQueryByOutTradeNoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -991,7 +991,7 @@ func _Payment_AliQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_AliRefundQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_AliRefundQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AliRefundQueryByOutTradeNoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1020,7 +1020,7 @@ func _Payment_AliRefundQueryByOutTradeNo_Handler(srv interface{}, ctx context.Co
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatJsApiPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatJsApiPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatJsApiPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1049,7 +1049,7 @@ func _Payment_WechatJsApiPay_Handler(srv interface{}, ctx context.Context, dec f
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatJsApiQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatJsApiQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatJsApiQueryByOutTradeNoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1078,7 +1078,7 @@ func _Payment_WechatJsApiQueryByOutTradeNo_Handler(srv interface{}, ctx context.
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_GetPayByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_GetPayByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPayByOutTradeNoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1107,7 +1107,7 @@ func _Payment_GetPayByOutTradeNo_Handler(srv interface{}, ctx context.Context, d
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatJsApiRefunds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatJsApiRefunds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatJsApiRefundsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1136,7 +1136,7 @@ func _Payment_WechatJsApiRefunds_Handler(srv interface{}, ctx context.Context, d
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_SetPayOk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_SetPayOk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatPayOkRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1165,7 +1165,7 @@ func _Payment_SetPayOk_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatAppPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatAppPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatAppPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1194,7 +1194,7 @@ func _Payment_WechatAppPay_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatAppQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatAppQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatAppQueryByOutTradeNoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1223,7 +1223,7 @@ func _Payment_WechatAppQueryByOutTradeNo_Handler(srv interface{}, ctx context.Co
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatNativePay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatNativePay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatNativePayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1252,7 +1252,7 @@ func _Payment_WechatNativePay_Handler(srv interface{}, ctx context.Context, dec
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatNativeQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatNativeQueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatNativeQueryByOutTradeNoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1281,7 +1281,7 @@ func _Payment_WechatNativeQueryByOutTradeNo_Handler(srv interface{}, ctx context
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatRefundQueryByOutRefundNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatRefundQueryByOutRefundNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatRefundQueryByOutRefundNoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1310,7 +1310,7 @@ func _Payment_WechatRefundQueryByOutRefundNo_Handler(srv interface{}, ctx contex
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatH5Pay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatH5Pay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatH5PayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1339,7 +1339,7 @@ func _Payment_WechatH5Pay_Handler(srv interface{}, ctx context.Context, dec func
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Payment_WechatH5QueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _PaymentCent_WechatH5QueryByOutTradeNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WechatH5QueryByOutTradeNoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -1368,136 +1368,136 @@ func _Payment_WechatH5QueryByOutTradeNo_Handler(srv interface{}, ctx context.Con
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Payment_ServiceDesc is the grpc_go.ServiceDesc for Payment service.
|
||||
// PaymentCent_ServiceDesc is the grpc_go.ServiceDesc for PaymentCent service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Payment_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "payment.Payment",
|
||||
HandlerType: (*PaymentServer)(nil),
|
||||
var PaymentCent_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "payment.PaymentCent",
|
||||
HandlerType: (*PaymentCentServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "CreatePay",
|
||||
Handler: _Payment_CreatePay_Handler,
|
||||
Handler: _PaymentCent_CreatePay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NotifyPay",
|
||||
Handler: _Payment_NotifyPay_Handler,
|
||||
Handler: _PaymentCent_NotifyPay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryPayByOutTradeNo",
|
||||
Handler: _Payment_QueryPayByOutTradeNo_Handler,
|
||||
Handler: _PaymentCent_QueryPayByOutTradeNo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryExportPay",
|
||||
Handler: _Payment_QueryExportPay_Handler,
|
||||
Handler: _PaymentCent_QueryExportPay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateRefund",
|
||||
Handler: _Payment_CreateRefund_Handler,
|
||||
Handler: _PaymentCent_CreateRefund_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "StripeGermanyWebhook",
|
||||
Handler: _Payment_StripeGermanyWebhook_Handler,
|
||||
Handler: _PaymentCent_StripeGermanyWebhook_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AliCommonWebhook",
|
||||
Handler: _Payment_AliCommonWebhook_Handler,
|
||||
Handler: _PaymentCent_AliCommonWebhook_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatFengLianWebhook",
|
||||
Handler: _Payment_WechatFengLianWebhook_Handler,
|
||||
Handler: _PaymentCent_WechatFengLianWebhook_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AntomWebhook",
|
||||
Handler: _Payment_AntomWebhook_Handler,
|
||||
Handler: _PaymentCent_AntomWebhook_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryAntomPayByCheckoutSessionId",
|
||||
Handler: _Payment_QueryAntomPayByCheckoutSessionId_Handler,
|
||||
Handler: _PaymentCent_QueryAntomPayByCheckoutSessionId_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateStripeCheckoutSession",
|
||||
Handler: _Payment_CreateStripeCheckoutSession_Handler,
|
||||
Handler: _PaymentCent_CreateStripeCheckoutSession_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AliWapPay",
|
||||
Handler: _Payment_AliWapPay_Handler,
|
||||
Handler: _PaymentCent_AliWapPay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AliAppPay",
|
||||
Handler: _Payment_AliAppPay_Handler,
|
||||
Handler: _PaymentCent_AliAppPay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AliNativePay",
|
||||
Handler: _Payment_AliNativePay_Handler,
|
||||
Handler: _PaymentCent_AliNativePay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AliPcWabPay",
|
||||
Handler: _Payment_AliPcWabPay_Handler,
|
||||
Handler: _PaymentCent_AliPcWabPay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AliReFund",
|
||||
Handler: _Payment_AliReFund_Handler,
|
||||
Handler: _PaymentCent_AliReFund_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AliNotify",
|
||||
Handler: _Payment_AliNotify_Handler,
|
||||
Handler: _PaymentCent_AliNotify_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AliQueryByOutTradeNo",
|
||||
Handler: _Payment_AliQueryByOutTradeNo_Handler,
|
||||
Handler: _PaymentCent_AliQueryByOutTradeNo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AliRefundQueryByOutTradeNo",
|
||||
Handler: _Payment_AliRefundQueryByOutTradeNo_Handler,
|
||||
Handler: _PaymentCent_AliRefundQueryByOutTradeNo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatJsApiPay",
|
||||
Handler: _Payment_WechatJsApiPay_Handler,
|
||||
Handler: _PaymentCent_WechatJsApiPay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatJsApiQueryByOutTradeNo",
|
||||
Handler: _Payment_WechatJsApiQueryByOutTradeNo_Handler,
|
||||
Handler: _PaymentCent_WechatJsApiQueryByOutTradeNo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPayByOutTradeNo",
|
||||
Handler: _Payment_GetPayByOutTradeNo_Handler,
|
||||
Handler: _PaymentCent_GetPayByOutTradeNo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatJsApiRefunds",
|
||||
Handler: _Payment_WechatJsApiRefunds_Handler,
|
||||
Handler: _PaymentCent_WechatJsApiRefunds_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetPayOk",
|
||||
Handler: _Payment_SetPayOk_Handler,
|
||||
Handler: _PaymentCent_SetPayOk_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatAppPay",
|
||||
Handler: _Payment_WechatAppPay_Handler,
|
||||
Handler: _PaymentCent_WechatAppPay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatAppQueryByOutTradeNo",
|
||||
Handler: _Payment_WechatAppQueryByOutTradeNo_Handler,
|
||||
Handler: _PaymentCent_WechatAppQueryByOutTradeNo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatNativePay",
|
||||
Handler: _Payment_WechatNativePay_Handler,
|
||||
Handler: _PaymentCent_WechatNativePay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatNativeQueryByOutTradeNo",
|
||||
Handler: _Payment_WechatNativeQueryByOutTradeNo_Handler,
|
||||
Handler: _PaymentCent_WechatNativeQueryByOutTradeNo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatRefundQueryByOutRefundNo",
|
||||
Handler: _Payment_WechatRefundQueryByOutRefundNo_Handler,
|
||||
Handler: _PaymentCent_WechatRefundQueryByOutRefundNo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatH5Pay",
|
||||
Handler: _Payment_WechatH5Pay_Handler,
|
||||
Handler: _PaymentCent_WechatH5Pay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WechatH5QueryByOutTradeNo",
|
||||
Handler: _Payment_WechatH5QueryByOutTradeNo_Handler,
|
||||
Handler: _PaymentCent_WechatH5QueryByOutTradeNo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
|
1402
api/pressreleases/press_releases.pb.go
Normal file
1402
api/pressreleases/press_releases.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
119
api/pressreleases/press_releases.proto
Normal file
119
api/pressreleases/press_releases.proto
Normal file
@ -0,0 +1,119 @@
|
||||
syntax = "proto3";
|
||||
package pressreleases;
|
||||
//import "descriptor.proto";
|
||||
//import "validator.proto";
|
||||
|
||||
option go_package = "./;pressreleases";
|
||||
|
||||
service PressReleases{
|
||||
rpc List(ListReq) returns (ListResp) {}
|
||||
rpc Display(DisplayReq) returns (DisplayResp) {}
|
||||
rpc Edit(EditReq) returns (EditResp) {}
|
||||
rpc Create(CreateReq) returns (CreateResp) {}
|
||||
rpc Delete(DeleteReq) returns (DeleteResp) {}
|
||||
rpc Get(GetReq) returns (GetResp) {}
|
||||
}
|
||||
|
||||
message Item{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
uint64 createdAt = 3;
|
||||
uint32 sort = 4;
|
||||
string content = 5;
|
||||
string attachment = 6;
|
||||
string attachmentName = 7;
|
||||
uint64 updatedAt = 8;
|
||||
uint32 status = 9;
|
||||
uint32 display = 10;
|
||||
string summary = 11;
|
||||
string operator = 12;
|
||||
int32 operatorId = 13;
|
||||
}
|
||||
|
||||
message ListReq{
|
||||
string title = 1;
|
||||
uint64 startTime = 2;
|
||||
uint64 endTime = 3;
|
||||
uint32 status = 4;
|
||||
uint32 display = 5;
|
||||
int32 page = 6;
|
||||
int32 pageSize = 7;
|
||||
}
|
||||
|
||||
message ListResp{
|
||||
uint64 total = 1;
|
||||
repeated Item data = 2;
|
||||
}
|
||||
|
||||
message DisplayReq{
|
||||
string query = 1;
|
||||
uint32 page = 2;
|
||||
uint32 pageSize = 3;
|
||||
int64 timeStart = 4;
|
||||
int64 timeEnd = 5;
|
||||
int32 display = 6;
|
||||
}
|
||||
|
||||
message DisplayResp{
|
||||
int64 total = 1;
|
||||
repeated Item data = 2;
|
||||
}
|
||||
|
||||
message EditReq{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
uint64 createdAt = 3;
|
||||
uint32 sort = 4;
|
||||
string content = 5;
|
||||
string attachment = 6;
|
||||
string attachmentName = 7;
|
||||
uint32 status = 8;
|
||||
uint32 display = 9;
|
||||
string summary = 10;
|
||||
string operator = 11;
|
||||
int32 operatorId = 12;
|
||||
|
||||
}
|
||||
|
||||
message EditResp{
|
||||
}
|
||||
|
||||
message CreateReq{
|
||||
string title = 1;
|
||||
uint64 createdAt = 2;
|
||||
uint32 sort = 3;
|
||||
string content = 4;
|
||||
string attachment = 5;
|
||||
string attachmentName = 6;
|
||||
uint32 status = 7;
|
||||
uint32 display = 8;
|
||||
string summary = 9;
|
||||
string operator = 10;
|
||||
int32 operatorId = 11;
|
||||
}
|
||||
|
||||
message CreateResp{
|
||||
|
||||
}
|
||||
|
||||
message DeleteReq{
|
||||
uint32 id = 1;
|
||||
}
|
||||
|
||||
message DeleteResp{
|
||||
|
||||
}
|
||||
|
||||
message GetReq{
|
||||
int64 id = 1;
|
||||
}
|
||||
|
||||
message GetResp{
|
||||
uint32 id = 1;
|
||||
string title = 2;
|
||||
uint64 createdAt = 3;
|
||||
string content = 4;
|
||||
string attachment = 5;
|
||||
string attachmentName = 6;
|
||||
string summary = 7;
|
||||
}
|
70
api/pressreleases/press_releases.validator.pb.go
Normal file
70
api/pressreleases/press_releases.validator.pb.go
Normal file
@ -0,0 +1,70 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: press_releases.proto
|
||||
|
||||
package pressreleases
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *Item) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DisplayResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *EditReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *EditResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetResp) Validate() error {
|
||||
return nil
|
||||
}
|
372
api/pressreleases/press_releases_triple.pb.go
Normal file
372
api/pressreleases/press_releases_triple.pb.go
Normal file
@ -0,0 +1,372 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: press_releases.proto
|
||||
|
||||
package pressreleases
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// PressReleasesClient is the client API for PressReleases 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 PressReleasesClient interface {
|
||||
List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment)
|
||||
Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment)
|
||||
Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment)
|
||||
Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment)
|
||||
Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment)
|
||||
Get(ctx context.Context, in *GetReq, opts ...grpc_go.CallOption) (*GetResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type pressReleasesClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type PressReleasesClientImpl struct {
|
||||
List func(ctx context.Context, in *ListReq) (*ListResp, error)
|
||||
Display func(ctx context.Context, in *DisplayReq) (*DisplayResp, error)
|
||||
Edit func(ctx context.Context, in *EditReq) (*EditResp, error)
|
||||
Create func(ctx context.Context, in *CreateReq) (*CreateResp, error)
|
||||
Delete func(ctx context.Context, in *DeleteReq) (*DeleteResp, error)
|
||||
Get func(ctx context.Context, in *GetReq) (*GetResp, error)
|
||||
}
|
||||
|
||||
func (c *PressReleasesClientImpl) GetDubboStub(cc *triple.TripleConn) PressReleasesClient {
|
||||
return NewPressReleasesClient(cc)
|
||||
}
|
||||
|
||||
func (c *PressReleasesClientImpl) XXX_InterfaceName() string {
|
||||
return "pressreleases.PressReleases"
|
||||
}
|
||||
|
||||
func NewPressReleasesClient(cc *triple.TripleConn) PressReleasesClient {
|
||||
return &pressReleasesClient{cc}
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) List(ctx context.Context, in *ListReq, opts ...grpc_go.CallOption) (*ListResp, common.ErrorWithAttachment) {
|
||||
out := new(ListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/List", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Display(ctx context.Context, in *DisplayReq, opts ...grpc_go.CallOption) (*DisplayResp, common.ErrorWithAttachment) {
|
||||
out := new(DisplayResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Display", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Edit(ctx context.Context, in *EditReq, opts ...grpc_go.CallOption) (*EditResp, common.ErrorWithAttachment) {
|
||||
out := new(EditResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Edit", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Create(ctx context.Context, in *CreateReq, opts ...grpc_go.CallOption) (*CreateResp, common.ErrorWithAttachment) {
|
||||
out := new(CreateResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Create", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc_go.CallOption) (*DeleteResp, common.ErrorWithAttachment) {
|
||||
out := new(DeleteResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Delete", in, out)
|
||||
}
|
||||
|
||||
func (c *pressReleasesClient) Get(ctx context.Context, in *GetReq, opts ...grpc_go.CallOption) (*GetResp, common.ErrorWithAttachment) {
|
||||
out := new(GetResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Get", in, out)
|
||||
}
|
||||
|
||||
// PressReleasesServer is the server API for PressReleases service.
|
||||
// All implementations must embed UnimplementedPressReleasesServer
|
||||
// for forward compatibility
|
||||
type PressReleasesServer interface {
|
||||
List(context.Context, *ListReq) (*ListResp, error)
|
||||
Display(context.Context, *DisplayReq) (*DisplayResp, error)
|
||||
Edit(context.Context, *EditReq) (*EditResp, error)
|
||||
Create(context.Context, *CreateReq) (*CreateResp, error)
|
||||
Delete(context.Context, *DeleteReq) (*DeleteResp, error)
|
||||
Get(context.Context, *GetReq) (*GetResp, error)
|
||||
mustEmbedUnimplementedPressReleasesServer()
|
||||
}
|
||||
|
||||
// UnimplementedPressReleasesServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedPressReleasesServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedPressReleasesServer) List(context.Context, *ListReq) (*ListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Display(context.Context, *DisplayReq) (*DisplayResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Display not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Edit(context.Context, *EditReq) (*EditResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Edit not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Create(context.Context, *CreateReq) (*CreateResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Delete(context.Context, *DeleteReq) (*DeleteResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedPressReleasesServer) Get(context.Context, *GetReq) (*GetResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (s *UnimplementedPressReleasesServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedPressReleasesServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedPressReleasesServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &PressReleases_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedPressReleasesServer) XXX_InterfaceName() string {
|
||||
return "pressreleases.PressReleases"
|
||||
}
|
||||
|
||||
func (UnimplementedPressReleasesServer) mustEmbedUnimplementedPressReleasesServer() {}
|
||||
|
||||
// UnsafePressReleasesServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PressReleasesServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePressReleasesServer interface {
|
||||
mustEmbedUnimplementedPressReleasesServer()
|
||||
}
|
||||
|
||||
func RegisterPressReleasesServer(s grpc_go.ServiceRegistrar, srv PressReleasesServer) {
|
||||
s.RegisterService(&PressReleases_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PressReleases_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("List", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Display_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DisplayReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Display", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Edit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EditReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Edit", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Create", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Delete", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _PressReleases_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("Get", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PressReleases_ServiceDesc is the grpc_go.ServiceDesc for PressReleases service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PressReleases_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "pressreleases.PressReleases",
|
||||
HandlerType: (*PressReleasesServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "List",
|
||||
Handler: _PressReleases_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Display",
|
||||
Handler: _PressReleases_Display_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Edit",
|
||||
Handler: _PressReleases_Edit_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _PressReleases_Create_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _PressReleases_Delete_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Get",
|
||||
Handler: _PressReleases_Get_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "press_releases.proto",
|
||||
}
|
1900
api/secFilings/secFilings.pb.go
Normal file
1900
api/secFilings/secFilings.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
135
api/secFilings/secFilings.proto
Normal file
135
api/secFilings/secFilings.proto
Normal file
@ -0,0 +1,135 @@
|
||||
syntax = "proto3";
|
||||
package secFilings;
|
||||
//import "descriptor.proto";
|
||||
//import "validator.proto";
|
||||
|
||||
option go_package = "./;secFilings";
|
||||
|
||||
service SecFilings{
|
||||
rpc CreateSecFiling(CreateSecFilingReq) returns (CommonResp) {}
|
||||
rpc UpdateSecFiling(UpdateSecFilingReq) returns (CommonResp) {}
|
||||
rpc DetailSecFiling(DetailSecFilingReq) returns (SecFilingDetailResp) {}
|
||||
rpc ListSecFiling(ListSecFilingReq) returns (SecFilingListResp) {}
|
||||
rpc DeleteSecFiling(DeleteSecFilingReq)returns(CommonResp){}
|
||||
rpc IsSecFilingExist(IsSecFilingExistReq) returns (IsSecFilingExistResp) {}
|
||||
rpc UpdateSecFilingStatus(UpdateSecFilingStatusReq) returns(CommonResp) {}
|
||||
rpc ListFormType(ListFormTypeReq) returns (FormTypeListResp) {}
|
||||
rpc WebListSecFiling(WebListSecFilingReq) returns (WebListSecFilingResp) {}
|
||||
}
|
||||
message ListFormTypeReq{
|
||||
int32 page = 1;
|
||||
int32 pageSize = 2;
|
||||
}
|
||||
message FormTypeListResp{
|
||||
int64 total = 1;
|
||||
repeated FormType formType = 2;
|
||||
}
|
||||
message FormType{
|
||||
int32 id = 1;
|
||||
string formType = 2;
|
||||
}
|
||||
message IsSecFilingExistReq{
|
||||
string filingDate = 1;
|
||||
string form = 2;
|
||||
string finalLink = 3;
|
||||
}
|
||||
message IsSecFilingExistResp{
|
||||
bool exist = 1;
|
||||
}
|
||||
message CommonResp{
|
||||
string msg = 1 [json_name="msg"];
|
||||
string filingKey = 2[json_name="filing_key"];
|
||||
}
|
||||
message SecFiling{
|
||||
int32 idx = 1 [json_name="idx"];
|
||||
string filingKey = 2[json_name="filing_key"];
|
||||
string filingDate = 3[json_name="filing_date"];
|
||||
string form = 4[json_name="form"];
|
||||
string description = 5[json_name="description"];
|
||||
string formDescription = 6[json_name="form_description"];
|
||||
string fileLink = 7[json_name="file_link"];
|
||||
repeated DataFiles dataFiles = 8[json_name="data_files"];
|
||||
string pdfFile = 9[json_name="pdf_file"];
|
||||
string wordFile = 10[json_name="word_file"];
|
||||
string excelFile = 11[json_name="excel_file"];
|
||||
int32 status = 12[json_name="status"];
|
||||
string operator = 13[json_name="operator"];
|
||||
int32 operatorId = 14[json_name="operator_id"];
|
||||
string createdAt =15[json_name="created_at"];
|
||||
string updatedAt=16[json_name="updated_at"];
|
||||
}
|
||||
message DataFiles {
|
||||
string description = 1[json_name="description"];
|
||||
string fileUrl = 2[json_name="file_url"];
|
||||
}
|
||||
message CreateSecFilingReq{
|
||||
string filingDate = 1;
|
||||
string form = 2;
|
||||
string description = 3;
|
||||
string formDescription = 4;
|
||||
string fileLink = 5;
|
||||
repeated DataFiles dataFiles = 6;
|
||||
string pdfFile = 7;
|
||||
string wordFile = 8;
|
||||
string excelFile = 9;
|
||||
string operator = 10;
|
||||
int32 operatorId = 11;
|
||||
}
|
||||
message UpdateSecFilingReq{
|
||||
string filingKey = 1;
|
||||
string form = 2;
|
||||
string description = 3;
|
||||
string formDescription = 4;
|
||||
string fileLink = 5;
|
||||
repeated DataFiles dataFiles = 6;
|
||||
string pdfFile = 7;
|
||||
string wordFile = 8;
|
||||
string excelFile = 9;
|
||||
string operator = 10;
|
||||
int32 operatorId = 11;
|
||||
string filingDate = 12;
|
||||
|
||||
}
|
||||
message DetailSecFilingReq{
|
||||
string filingKey = 1;
|
||||
}
|
||||
message SecFilingDetailResp{
|
||||
string msg = 1;
|
||||
SecFiling data = 2;
|
||||
}
|
||||
message ListSecFilingReq{
|
||||
uint32 page = 1;
|
||||
uint32 pageSize = 2;
|
||||
string form = 3;
|
||||
string filingDateBegin = 4;
|
||||
string filingDateEnd = 5;
|
||||
int32 status = 6;
|
||||
}
|
||||
message SecFilingListResp{
|
||||
string msg = 1 [json_name="msg"];
|
||||
uint32 total = 2 [json_name="total"];
|
||||
repeated SecFiling data = 3 [json_name="data"];
|
||||
}
|
||||
message WebListSecFilingReq{
|
||||
uint32 page = 1;
|
||||
uint32 pageSize = 2;
|
||||
string year = 3;
|
||||
string sortField = 4;
|
||||
string sortOrder = 5;
|
||||
}
|
||||
message WebListSecFilingResp{
|
||||
string msg = 1 [json_name="msg"];
|
||||
uint32 total = 2 [json_name="total"];
|
||||
repeated SecFiling data = 3 [json_name="data"];
|
||||
}
|
||||
message DeleteSecFilingReq {
|
||||
string filingKey = 1;
|
||||
string operator = 2;
|
||||
int32 operatorId = 3;
|
||||
}
|
||||
message UpdateSecFilingStatusReq{
|
||||
string filingKey = 1;
|
||||
int32 status = 2;
|
||||
string operator = 3;
|
||||
int32 operatorId = 4;
|
||||
}
|
118
api/secFilings/secFilings.validator.pb.go
Normal file
118
api/secFilings/secFilings.validator.pb.go
Normal file
@ -0,0 +1,118 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: secFilings.proto
|
||||
|
||||
package secFilings
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
math "math"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
func (this *ListFormTypeReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *FormTypeListResp) Validate() error {
|
||||
for _, item := range this.FormType {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("FormType", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *FormType) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *IsSecFilingExistReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *IsSecFilingExistResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CommonResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SecFiling) Validate() error {
|
||||
for _, item := range this.DataFiles {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataFiles", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DataFiles) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateSecFilingReq) Validate() error {
|
||||
for _, item := range this.DataFiles {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataFiles", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateSecFilingReq) Validate() error {
|
||||
for _, item := range this.DataFiles {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DataFiles", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DetailSecFilingReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SecFilingDetailResp) Validate() error {
|
||||
if this.Data != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *ListSecFilingReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *SecFilingListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *WebListSecFilingReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *WebListSecFilingResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteSecFilingReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateSecFilingStatusReq) Validate() error {
|
||||
return nil
|
||||
}
|
507
api/secFilings/secFilings_triple.pb.go
Normal file
507
api/secFilings/secFilings_triple.pb.go
Normal file
@ -0,0 +1,507 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.20.3
|
||||
// source: secFilings.proto
|
||||
|
||||
package secFilings
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// SecFilingsClient is the client API for SecFilings 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 SecFilingsClient interface {
|
||||
CreateSecFiling(ctx context.Context, in *CreateSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment)
|
||||
UpdateSecFiling(ctx context.Context, in *UpdateSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment)
|
||||
DetailSecFiling(ctx context.Context, in *DetailSecFilingReq, opts ...grpc_go.CallOption) (*SecFilingDetailResp, common.ErrorWithAttachment)
|
||||
ListSecFiling(ctx context.Context, in *ListSecFilingReq, opts ...grpc_go.CallOption) (*SecFilingListResp, common.ErrorWithAttachment)
|
||||
DeleteSecFiling(ctx context.Context, in *DeleteSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment)
|
||||
IsSecFilingExist(ctx context.Context, in *IsSecFilingExistReq, opts ...grpc_go.CallOption) (*IsSecFilingExistResp, common.ErrorWithAttachment)
|
||||
UpdateSecFilingStatus(ctx context.Context, in *UpdateSecFilingStatusReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment)
|
||||
ListFormType(ctx context.Context, in *ListFormTypeReq, opts ...grpc_go.CallOption) (*FormTypeListResp, common.ErrorWithAttachment)
|
||||
WebListSecFiling(ctx context.Context, in *WebListSecFilingReq, opts ...grpc_go.CallOption) (*WebListSecFilingResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type secFilingsClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type SecFilingsClientImpl struct {
|
||||
CreateSecFiling func(ctx context.Context, in *CreateSecFilingReq) (*CommonResp, error)
|
||||
UpdateSecFiling func(ctx context.Context, in *UpdateSecFilingReq) (*CommonResp, error)
|
||||
DetailSecFiling func(ctx context.Context, in *DetailSecFilingReq) (*SecFilingDetailResp, error)
|
||||
ListSecFiling func(ctx context.Context, in *ListSecFilingReq) (*SecFilingListResp, error)
|
||||
DeleteSecFiling func(ctx context.Context, in *DeleteSecFilingReq) (*CommonResp, error)
|
||||
IsSecFilingExist func(ctx context.Context, in *IsSecFilingExistReq) (*IsSecFilingExistResp, error)
|
||||
UpdateSecFilingStatus func(ctx context.Context, in *UpdateSecFilingStatusReq) (*CommonResp, error)
|
||||
ListFormType func(ctx context.Context, in *ListFormTypeReq) (*FormTypeListResp, error)
|
||||
WebListSecFiling func(ctx context.Context, in *WebListSecFilingReq) (*WebListSecFilingResp, error)
|
||||
}
|
||||
|
||||
func (c *SecFilingsClientImpl) GetDubboStub(cc *triple.TripleConn) SecFilingsClient {
|
||||
return NewSecFilingsClient(cc)
|
||||
}
|
||||
|
||||
func (c *SecFilingsClientImpl) XXX_InterfaceName() string {
|
||||
return "secFilings.SecFilings"
|
||||
}
|
||||
|
||||
func NewSecFilingsClient(cc *triple.TripleConn) SecFilingsClient {
|
||||
return &secFilingsClient{cc}
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) CreateSecFiling(ctx context.Context, in *CreateSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment) {
|
||||
out := new(CommonResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateSecFiling", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) UpdateSecFiling(ctx context.Context, in *UpdateSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment) {
|
||||
out := new(CommonResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateSecFiling", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) DetailSecFiling(ctx context.Context, in *DetailSecFilingReq, opts ...grpc_go.CallOption) (*SecFilingDetailResp, common.ErrorWithAttachment) {
|
||||
out := new(SecFilingDetailResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DetailSecFiling", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) ListSecFiling(ctx context.Context, in *ListSecFilingReq, opts ...grpc_go.CallOption) (*SecFilingListResp, common.ErrorWithAttachment) {
|
||||
out := new(SecFilingListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ListSecFiling", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) DeleteSecFiling(ctx context.Context, in *DeleteSecFilingReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment) {
|
||||
out := new(CommonResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeleteSecFiling", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) IsSecFilingExist(ctx context.Context, in *IsSecFilingExistReq, opts ...grpc_go.CallOption) (*IsSecFilingExistResp, common.ErrorWithAttachment) {
|
||||
out := new(IsSecFilingExistResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/IsSecFilingExist", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) UpdateSecFilingStatus(ctx context.Context, in *UpdateSecFilingStatusReq, opts ...grpc_go.CallOption) (*CommonResp, common.ErrorWithAttachment) {
|
||||
out := new(CommonResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateSecFilingStatus", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) ListFormType(ctx context.Context, in *ListFormTypeReq, opts ...grpc_go.CallOption) (*FormTypeListResp, common.ErrorWithAttachment) {
|
||||
out := new(FormTypeListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ListFormType", in, out)
|
||||
}
|
||||
|
||||
func (c *secFilingsClient) WebListSecFiling(ctx context.Context, in *WebListSecFilingReq, opts ...grpc_go.CallOption) (*WebListSecFilingResp, common.ErrorWithAttachment) {
|
||||
out := new(WebListSecFilingResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WebListSecFiling", in, out)
|
||||
}
|
||||
|
||||
// SecFilingsServer is the server API for SecFilings service.
|
||||
// All implementations must embed UnimplementedSecFilingsServer
|
||||
// for forward compatibility
|
||||
type SecFilingsServer interface {
|
||||
CreateSecFiling(context.Context, *CreateSecFilingReq) (*CommonResp, error)
|
||||
UpdateSecFiling(context.Context, *UpdateSecFilingReq) (*CommonResp, error)
|
||||
DetailSecFiling(context.Context, *DetailSecFilingReq) (*SecFilingDetailResp, error)
|
||||
ListSecFiling(context.Context, *ListSecFilingReq) (*SecFilingListResp, error)
|
||||
DeleteSecFiling(context.Context, *DeleteSecFilingReq) (*CommonResp, error)
|
||||
IsSecFilingExist(context.Context, *IsSecFilingExistReq) (*IsSecFilingExistResp, error)
|
||||
UpdateSecFilingStatus(context.Context, *UpdateSecFilingStatusReq) (*CommonResp, error)
|
||||
ListFormType(context.Context, *ListFormTypeReq) (*FormTypeListResp, error)
|
||||
WebListSecFiling(context.Context, *WebListSecFilingReq) (*WebListSecFilingResp, error)
|
||||
mustEmbedUnimplementedSecFilingsServer()
|
||||
}
|
||||
|
||||
// UnimplementedSecFilingsServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedSecFilingsServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedSecFilingsServer) CreateSecFiling(context.Context, *CreateSecFilingReq) (*CommonResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateSecFiling not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) UpdateSecFiling(context.Context, *UpdateSecFilingReq) (*CommonResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateSecFiling not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) DetailSecFiling(context.Context, *DetailSecFilingReq) (*SecFilingDetailResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DetailSecFiling not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) ListSecFiling(context.Context, *ListSecFilingReq) (*SecFilingListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListSecFiling not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) DeleteSecFiling(context.Context, *DeleteSecFilingReq) (*CommonResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteSecFiling not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) IsSecFilingExist(context.Context, *IsSecFilingExistReq) (*IsSecFilingExistResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method IsSecFilingExist not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) UpdateSecFilingStatus(context.Context, *UpdateSecFilingStatusReq) (*CommonResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateSecFilingStatus not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) ListFormType(context.Context, *ListFormTypeReq) (*FormTypeListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListFormType not implemented")
|
||||
}
|
||||
func (UnimplementedSecFilingsServer) WebListSecFiling(context.Context, *WebListSecFilingReq) (*WebListSecFilingResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WebListSecFiling not implemented")
|
||||
}
|
||||
func (s *UnimplementedSecFilingsServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedSecFilingsServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedSecFilingsServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &SecFilings_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedSecFilingsServer) XXX_InterfaceName() string {
|
||||
return "secFilings.SecFilings"
|
||||
}
|
||||
|
||||
func (UnimplementedSecFilingsServer) mustEmbedUnimplementedSecFilingsServer() {}
|
||||
|
||||
// UnsafeSecFilingsServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SecFilingsServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSecFilingsServer interface {
|
||||
mustEmbedUnimplementedSecFilingsServer()
|
||||
}
|
||||
|
||||
func RegisterSecFilingsServer(s grpc_go.ServiceRegistrar, srv SecFilingsServer) {
|
||||
s.RegisterService(&SecFilings_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _SecFilings_CreateSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("CreateSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_UpdateSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_DetailSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DetailSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DetailSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_ListSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("ListSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_DeleteSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("DeleteSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_IsSecFilingExist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IsSecFilingExistReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("IsSecFilingExist", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_UpdateSecFilingStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateSecFilingStatusReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateSecFilingStatus", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_ListFormType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListFormTypeReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("ListFormType", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _SecFilings_WebListSecFiling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WebListSecFilingReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("WebListSecFiling", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// SecFilings_ServiceDesc is the grpc_go.ServiceDesc for SecFilings service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var SecFilings_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "secFilings.SecFilings",
|
||||
HandlerType: (*SecFilingsServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateSecFiling",
|
||||
Handler: _SecFilings_CreateSecFiling_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateSecFiling",
|
||||
Handler: _SecFilings_UpdateSecFiling_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DetailSecFiling",
|
||||
Handler: _SecFilings_DetailSecFiling_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListSecFiling",
|
||||
Handler: _SecFilings_ListSecFiling_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteSecFiling",
|
||||
Handler: _SecFilings_DeleteSecFiling_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "IsSecFilingExist",
|
||||
Handler: _SecFilings_IsSecFilingExist_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateSecFilingStatus",
|
||||
Handler: _SecFilings_UpdateSecFilingStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListFormType",
|
||||
Handler: _SecFilings_ListFormType_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WebListSecFiling",
|
||||
Handler: _SecFilings_WebListSecFiling_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "secFilings.proto",
|
||||
}
|
1
clear.sh
1
clear.sh
@ -1,3 +1,4 @@
|
||||
ls api/account/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
|
||||
ls api/bundle/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
|
||||
ls api/order/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
|
||||
ls api/secFilings/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}';
|
||||
|
@ -21,6 +21,7 @@ import (
|
||||
"fmt"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
"fonchain-fiee/pkg/logger"
|
||||
"fonchain-fiee/pkg/router"
|
||||
)
|
||||
|
||||
@ -44,6 +45,7 @@ func bootstrap() (err error) {
|
||||
fmt.Println(configEnv)
|
||||
fmt.Println(config.AppConfig)
|
||||
|
||||
logger.LogInit(config.AppConfig)
|
||||
////redis
|
||||
redisConfig := cache.RedisConfig{
|
||||
RedisDB: configEnv.Redis.RedisDB,
|
||||
|
@ -109,10 +109,14 @@ type Redis struct {
|
||||
|
||||
type System struct {
|
||||
Mode string
|
||||
AppMode string
|
||||
Version string
|
||||
HttpPort string
|
||||
Host string
|
||||
RedirectUri string
|
||||
Domain string
|
||||
ErpHost string
|
||||
FieeHost string
|
||||
}
|
||||
type Oss struct {
|
||||
AccessKeyId string
|
||||
@ -122,6 +126,14 @@ type Oss struct {
|
||||
BaseDir string
|
||||
CdnHost string
|
||||
}
|
||||
|
||||
type ZapLog struct {
|
||||
Level string
|
||||
Filename string
|
||||
MaxSize int
|
||||
MaxAge int
|
||||
MaxBackups int
|
||||
}
|
||||
type Mobile struct {
|
||||
SK string
|
||||
AK string
|
||||
@ -141,6 +153,7 @@ type Config struct {
|
||||
Mobile Mobile `toml:"mobile"`
|
||||
Ai Ai `toml:"ai"`
|
||||
Oss Oss `toml:"oss"`
|
||||
ZapLog ZapLog `toml:"zapLog"`
|
||||
}
|
||||
|
||||
/********start-配置信息*********/
|
||||
|
2
conf/.gitignore
vendored
Normal file
2
conf/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
conf.ini
|
||||
dubbogo.yaml
|
@ -1,36 +0,0 @@
|
||||
[system]
|
||||
Domain = "fiee"
|
||||
AppMode = "debug"
|
||||
HttpPort = ":8085"
|
||||
Host = "http://127.0.0.1:8085"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
BucketName = "dci-file-new"
|
||||
BosUrl = ".bj.bcebos.com"
|
||||
BosBaseDir = "fonchain-main"
|
||||
BosHttp = "https://"
|
||||
BosDomain = "cdns.fontree.cn"
|
||||
[oss]
|
||||
AccessKeyId = "LTAI5tLz1fSK53FQAEC9uNSb"
|
||||
AccessKeySecret = "oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
|
||||
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
|
||||
BucketName = "fontree-test"
|
||||
BaseDir = "fonchain-main"
|
||||
CdnHost = "https://cdn-test.szjixun.cn"
|
||||
[redis]
|
||||
RedisDB = "2"
|
||||
RedisAddr = "127.0.0.1:6379"
|
||||
RedisPW = ""
|
||||
RedisDBNAme = "2"
|
||||
|
||||
|
||||
[ai]
|
||||
Host = "https://erpapi.fontree.cn"
|
||||
TelNum = "18021272627"
|
||||
Password = "Gy.123456"
|
||||
|
||||
[service]
|
||||
IsHTTPS = false
|
@ -9,7 +9,16 @@ dubbo:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.micro.account
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
|
||||
AccountFieeClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.micro.account.fiee
|
||||
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
# params:
|
||||
# .accessKeyId: "Accountksl"
|
||||
@ -18,3 +27,7 @@ dubbo:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
|
||||
SecFilingsClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.SecFiling
|
@ -1,10 +1,11 @@
|
||||
[system]
|
||||
Domain = "artistinfo"
|
||||
AppMode = "debug"
|
||||
Domain = "app"
|
||||
AppMode = "dev"
|
||||
HttpPort = ":8085"
|
||||
Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
|
||||
ErpHost = "http://114.218.158.24:9020"
|
||||
FieeHost = "http://114.218.158.24:9020"
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
@ -34,3 +35,10 @@ Password = "Gy.123456"
|
||||
|
||||
[stripe]
|
||||
Webhookkey = "whsec_uOQpG6IZTqtfLuePIDtfLCGJPqedSCCN"
|
||||
|
||||
[zapLog]
|
||||
level = "info"
|
||||
filename = "logs/fiee_zap.log"
|
||||
max_size = 5
|
||||
max_age = 30
|
||||
max_backups = 30
|
||||
|
@ -25,12 +25,65 @@ dubbo:
|
||||
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
retries: 3
|
||||
interface: com.fontree.microservices.common.micro.account
|
||||
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
||||
PaymentClientImpl:
|
||||
interface: com.fontree.microservices.common.payment # must be compatible with grpc or dubbo-java
|
||||
filter: cshutdown,sign,auth
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute
|
||||
params:
|
||||
.accessKeyId: "Paymentksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_payment"
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
AccountFieeClientImpl:
|
||||
protocol: tri
|
||||
retries: 3
|
||||
interface: com.fontree.microservices.common.micro.account.fiee
|
||||
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
||||
PaymentCentClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.payment.cent # must be compatible with grpc or dubbo-java
|
||||
CastClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.multicast
|
||||
SecFilingsClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.SecFiling
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
development: false
|
||||
disableCaller: false
|
||||
disableStacktrace: false
|
||||
encoding: "json"
|
||||
# zap encoder 配置
|
||||
encoderConfig:
|
||||
messageKey: "message"
|
||||
levelKey: "level"
|
||||
timeKey: "time"
|
||||
nameKey: "logger"
|
||||
callerKey: "caller"
|
||||
stacktraceKey: "stacktrace"
|
||||
lineEnding: ""
|
||||
levelEncoder: "capitalColor"
|
||||
timeEncoder: "iso8601"
|
||||
durationEncoder: "seconds"
|
||||
callerEncoder: "short"
|
||||
nameEncoder: ""
|
||||
EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"),
|
||||
EncodeDuration: zapcore.SecondsDurationEncoder,
|
||||
outputPaths:
|
||||
- "stderr"
|
||||
errorOutputPaths:
|
||||
- "stderr"
|
||||
lumberjack-config:
|
||||
# 写日志的文件名称
|
||||
filename: "runtime/logs/fiee.log"
|
||||
# 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB
|
||||
maxSize: 5
|
||||
# 日志保留的最大天数(只保留最近多少天的日志)
|
||||
maxAge: 30
|
||||
# 只保留最近多少个日志文件,用于控制程序总日志的大小
|
||||
maxBackups: 30
|
||||
# 是否使用本地时间,默认使用 UTC 时间
|
||||
localTime: true
|
||||
# 是否压缩日志文件,压缩方法 gzip
|
||||
compress: false
|
||||
|
@ -1,10 +1,11 @@
|
||||
[system]
|
||||
Domain = "artistinfo"
|
||||
AppMode = "debug"
|
||||
Domain = "app"
|
||||
AppMode = "prod"
|
||||
HttpPort = ":8085"
|
||||
Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
|
||||
ErpHost = "https://erpapi.fontree.cn"
|
||||
FieeHost = "https://erpapi.fiee.com"
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
@ -34,3 +35,10 @@ CdnHost = "https://e-cdn.fontree.cn"
|
||||
|
||||
[stripe]
|
||||
Webhookkey = "whsec_Mol32WD1KcKHUdYsSwap0LR03q2g9qNY"
|
||||
|
||||
[zapLog]
|
||||
level = "info"
|
||||
filename = "logs/fiee_zap.log"
|
||||
max_size = 5
|
||||
max_age = 30
|
||||
max_backups = 30
|
||||
|
@ -25,7 +25,15 @@ dubbo:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.micro.account
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
AccountFieeClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.micro.account.fiee
|
||||
PaymentCentClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
@ -34,3 +42,50 @@ dubbo:
|
||||
params:
|
||||
.accessKeyId: "Paymentksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_payment"
|
||||
CastClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.multicast
|
||||
SecFilingsClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.SecFiling
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
development: false
|
||||
disableCaller: false
|
||||
disableStacktrace: false
|
||||
encoding: "json"
|
||||
# zap encoder 配置
|
||||
encoderConfig:
|
||||
messageKey: "message"
|
||||
levelKey: "level"
|
||||
timeKey: "time"
|
||||
nameKey: "logger"
|
||||
callerKey: "caller"
|
||||
stacktraceKey: "stacktrace"
|
||||
lineEnding: ""
|
||||
levelEncoder: "capitalColor"
|
||||
timeEncoder: "iso8601"
|
||||
durationEncoder: "seconds"
|
||||
callerEncoder: "short"
|
||||
nameEncoder: ""
|
||||
EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"),
|
||||
EncodeDuration: zapcore.SecondsDurationEncoder,
|
||||
outputPaths:
|
||||
- "stderr"
|
||||
errorOutputPaths:
|
||||
- "stderr"
|
||||
lumberjack-config:
|
||||
# 写日志的文件名称
|
||||
filename: "runtime/logs/fiee.log"
|
||||
# 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB
|
||||
maxSize: 5
|
||||
# 日志保留的最大天数(只保留最近多少天的日志)
|
||||
maxAge: 30
|
||||
# 只保留最近多少个日志文件,用于控制程序总日志的大小
|
||||
maxBackups: 30
|
||||
# 是否使用本地时间,默认使用 UTC 时间
|
||||
localTime: true
|
||||
# 是否压缩日志文件,压缩方法 gzip
|
||||
compress: false
|
@ -1,25 +1,52 @@
|
||||
[system]
|
||||
Domain = "artistinfo"
|
||||
AppMode = "debug"
|
||||
Domain = "app"
|
||||
AppMode = "test"
|
||||
HttpPort = ":8085"
|
||||
Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
|
||||
ErpHost = "http://114.218.158.24:9020"
|
||||
FieeHost = "http://114.218.158.24:9020"
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
BucketName = "dci-file-new"
|
||||
BucketName = "dci-file-new"
|
||||
BosUrl = ".bj.bcebos.com"
|
||||
BosBaseDir = "fonchain-main"
|
||||
BosBaseDir = "fiee"
|
||||
BosHttp = "https://"
|
||||
BosDomain = "cdns.fontree.cn"
|
||||
[oss]
|
||||
AccessKeyId = "LTAI5tLz1fSK53FQAEC9uNSb"
|
||||
AccessKeySecret = "oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
|
||||
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
|
||||
BucketName = "fontree-test"
|
||||
BaseDir = "fiee"
|
||||
CdnHost = "https://cdn-test.szjixun.cn"
|
||||
|
||||
[oss]
|
||||
AccessKeyId="LTAI5tLz1fSK53FQAEC9uNSb"
|
||||
AccessKeysecret ="oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
|
||||
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
|
||||
BucketName = "fontree-test"
|
||||
BaseDir = "fiee"
|
||||
CdnHost = "https://cdn-test.szjixun.cn"
|
||||
|
||||
[redis]
|
||||
RedisDB = "2"
|
||||
RedisAddr = "redis:6379"
|
||||
RedisPW = "root"
|
||||
RedisAddr = "172.16.100.114:6379"
|
||||
RedisPW = "kP6tW4tS3qB2dW4aE6uI5cX2"
|
||||
RedisDBNAme = "2"
|
||||
|
||||
[ai]
|
||||
Host = "https://erpapi.fontree.cn"
|
||||
TelNum = "18021272627"
|
||||
Password = "Gy.123456"
|
||||
|
||||
[stripe]
|
||||
Webhookkey = "whsec_uOQpG6IZTqtfLuePIDtfLCGJPqedSCCN"
|
||||
|
||||
[zapLog]
|
||||
level = "info"
|
||||
filename = "logs/fiee_zap.log"
|
||||
max_size = 5
|
||||
max_age = 30
|
||||
max_backups = 30
|
||||
|
@ -4,5 +4,86 @@ dubbo:
|
||||
protocol: zookeeper
|
||||
timeout: 3s
|
||||
# address: 121.229.45.214:9004
|
||||
address: 127.0.0.1:2181
|
||||
address: 172.16.100.93:2181
|
||||
# address: 127.0.0.1:2181
|
||||
# address: 114.218.158.24:2181
|
||||
consumer:
|
||||
filter: tracing
|
||||
request-timeout: 30s
|
||||
references:
|
||||
OrderClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.order # must be compatible with grpc or dubbo-java
|
||||
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
params:
|
||||
.accessKeyId: "SYD8-order-04"
|
||||
.secretAccessKey: "Al-order-FDF112"
|
||||
BundleClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
AccountFieeClientImpl:
|
||||
protocol: tri
|
||||
retries: 3
|
||||
interface: com.fontree.microservices.common.micro.account.fiee
|
||||
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
||||
PaymentCentClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.payment.cent # must be compatible with grpc or dubbo-java
|
||||
CastClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.multicast
|
||||
SecFilingsClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.SecFiling
|
||||
logger:
|
||||
zap-config:
|
||||
level: error # 日志级别
|
||||
development: false
|
||||
disableCaller: false
|
||||
disableStacktrace: false
|
||||
encoding: "json"
|
||||
# zap encoder 配置
|
||||
encoderConfig:
|
||||
messageKey: "message"
|
||||
levelKey: "level"
|
||||
timeKey: "time"
|
||||
nameKey: "logger"
|
||||
callerKey: "caller"
|
||||
stacktraceKey: "stacktrace"
|
||||
lineEnding: ""
|
||||
levelEncoder: "capitalColor"
|
||||
timeEncoder: "iso8601"
|
||||
durationEncoder: "seconds"
|
||||
callerEncoder: "short"
|
||||
nameEncoder: ""
|
||||
EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"),
|
||||
EncodeDuration: zapcore.SecondsDurationEncoder,
|
||||
outputPaths:
|
||||
- "stderr"
|
||||
errorOutputPaths:
|
||||
- "stderr"
|
||||
lumberjack-config:
|
||||
# 写日志的文件名称
|
||||
filename: "runtime/logs/fiee.log"
|
||||
# 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB
|
||||
maxSize: 5
|
||||
# 日志保留的最大天数(只保留最近多少天的日志)
|
||||
maxAge: 30
|
||||
# 只保留最近多少个日志文件,用于控制程序总日志的大小
|
||||
maxBackups: 30
|
||||
# 是否使用本地时间,默认使用 UTC 时间
|
||||
localTime: true
|
||||
# 是否压缩日志文件,压缩方法 gzip
|
||||
compress: false
|
49
go.mod
49
go.mod
@ -1,25 +1,16 @@
|
||||
module fonchain-fiee
|
||||
|
||||
go 1.18
|
||||
go 1.21.3
|
||||
|
||||
//github.com/fonchain_enterprise/utils/aes => ./docs/utils/aes
|
||||
//github.com/fonchain_enterprise/utils/chain => ./docs/utils/chain
|
||||
//github.com/fonchain_enterprise/utils/jwt => ./docs/utils/jwt
|
||||
//github.com/fonchain_enterprise/utils/logger => ./docs/utils/logger
|
||||
//github.com/fonchain_enterprise/utils/rand => ./docs/utils/rand
|
||||
toolchain go1.23.6
|
||||
|
||||
//github.com/fonchain/electronic-contract => ../../electronic-contract
|
||||
//github.com/fonchain_enterprise/utils/aes => ../utils/aes
|
||||
//github.com/fonchain_enterprise/utils/baidu => ../utils/baidu
|
||||
//github.com/fonchain_enterprise/utils/bankQuery => ../utils/bankQuery
|
||||
//github.com/fonchain_enterprise/utils/chain => ../utils/chain
|
||||
//github.com/fonchain_enterprise/utils/feie => ../utils/feie
|
||||
//github.com/fonchain_enterprise/utils/ipAddrQuery => ../utils/ipAddrQuery
|
||||
//github.com/fonchain_enterprise/utils/jwt => ../utils/jwt
|
||||
//github.com/fonchain_enterprise/utils/logger => ../utils/logger
|
||||
//replace github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-新/utils/objstorage
|
||||
replace (
|
||||
//github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-新/utils/objstorage
|
||||
github.com/fonchain/utils/voice => ../utils/voice
|
||||
github.com/fonchain_enterprise/utils/aes => ../utils/aes
|
||||
github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
|
||||
)
|
||||
|
||||
replace github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
|
||||
//
|
||||
require (
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.2
|
||||
@ -28,7 +19,7 @@ require (
|
||||
//github.com/fonchain_enterprise/utils/jwt v0.0.0-00010101000000-000000000000
|
||||
//github.com/fonchain_enterprise/utils/logger v0.0.0-00010101000000-000000000000
|
||||
github.com/gin-contrib/gzip v0.0.5
|
||||
github.com/gin-gonic/gin v1.9.1
|
||||
github.com/gin-gonic/gin v1.9.0
|
||||
github.com/golang/protobuf v1.5.4
|
||||
github.com/mwitkow/go-proto-validators v0.3.2
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
@ -57,12 +48,12 @@ require (
|
||||
github.com/go-ole/go-ole v1.2.4 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.14.0 // indirect
|
||||
github.com/goccy/go-json v0.10.2 // indirect
|
||||
github.com/go-playground/validator/v10 v10.11.2 // indirect
|
||||
github.com/goccy/go-json v0.10.2
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.0
|
||||
github.com/jinzhu/copier v0.3.5 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/k0kubun/pp v3.0.1+incompatible // indirect
|
||||
@ -70,7 +61,7 @@ require (
|
||||
github.com/leodido/go-urn v1.2.4 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/mitchellh/copystructure v1.2.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
@ -109,8 +100,12 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1
|
||||
github.com/BurntSushi/toml v1.2.1
|
||||
github.com/PuerkitoBio/goquery v1.8.1
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0
|
||||
github.com/fonchain/utils/voice v0.0.0-00010101000000-000000000000
|
||||
github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000
|
||||
github.com/gin-contrib/pprof v1.4.0
|
||||
github.com/go-redis/redis v6.15.9+incompatible
|
||||
@ -119,15 +114,15 @@ require (
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
||||
github.com/spf13/viper v1.7.1
|
||||
github.com/u2takey/ffmpeg-go v0.5.0
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8
|
||||
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.65.0 // indirect
|
||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1 // indirect
|
||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 // indirect
|
||||
github.com/alibaba/sentinel-golang v1.0.4 // indirect
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 // indirect
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1376 // indirect
|
||||
github.com/andybalholm/cascadia v1.3.1 // indirect
|
||||
github.com/aws/aws-sdk-go v1.38.20 // indirect
|
||||
github.com/baidubce/bce-sdk-go v0.9.123 // indirect
|
||||
github.com/buger/jsonparser v1.1.1 // indirect
|
||||
@ -138,12 +133,11 @@ require (
|
||||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 // indirect
|
||||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
|
||||
github.com/dorlolo/simpleRequest v1.2.7 // indirect
|
||||
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.7.4 // indirect
|
||||
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-co-op/gocron v1.9.0 // indirect
|
||||
github.com/go-errors/errors v1.4.2 // indirect
|
||||
@ -179,6 +173,7 @@ require (
|
||||
github.com/spf13/jwalterweatherman v1.0.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/subosito/gotenv v1.2.0 // indirect
|
||||
github.com/tealeg/xlsx v1.0.5 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.6 // indirect
|
||||
github.com/tklauser/numcpus v0.2.2 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
|
45
go.sum
45
go.sum
@ -48,6 +48,8 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob
|
||||
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
|
||||
github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
|
||||
github.com/RoaringBitmap/roaring v1.1.0 h1:b10lZrZXaY6Q6EKIRrmOF519FIyQQ5anPgGr3niw2yY=
|
||||
github.com/RoaringBitmap/roaring v1.1.0/go.mod h1:icnadbWcNyfEHlYdr+tDlOTih1Bf/h+rzPpv4sbomAA=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
@ -69,11 +71,14 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/alibaba/sentinel-golang v1.0.4 h1:i0wtMvNVdy7vM4DdzYrlC4r/Mpk1OKUUBurKKkWhEo8=
|
||||
github.com/alibaba/sentinel-golang v1.0.4/go.mod h1:Lag5rIYyJiPOylK8Kku2P+a23gdKMMqzQS7wTnjWEpk=
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 h1:zOVTBdCKFd9JbCKz9/nt+FovbjPFmb7mUnp8nH9fQBA=
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk=
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1376 h1:lExo7heZgdFn5AbaNJEllbA0KSJ/Z8T7MphvMREJOOo=
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1376/go.mod h1:9CMdKNL3ynIGPpfTcdwTvIm8SGuAZYYC4jFVSSvE1YQ=
|
||||
github.com/aliyun/aliyun-oss-go-sdk v2.2.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
|
||||
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible h1:KXeJoM1wo9I/6xPTyt6qCxoSZnmASiAjlrr0dyTUKt8=
|
||||
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
|
||||
github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
|
||||
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/apache/dubbo-getty v1.4.8 h1:Q9WKXmVu4Dm16cMJHamegRbxpDiYaGIU+MnPGhJhNyk=
|
||||
github.com/apache/dubbo-getty v1.4.8/go.mod h1:cPJlbcHUTNTpiboMQjMHhE9XBni11LiBiG8FdrDuVzk=
|
||||
@ -183,6 +188,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
|
||||
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
|
||||
github.com/dorlolo/simpleRequest v1.2.7 h1:I6AlEhMBSZPNQ4QjpCevhpxsPRDa3lgDOxJYYfmPTU8=
|
||||
github.com/dorlolo/simpleRequest v1.2.7/go.mod h1:koVT8DQu+JK40UoMNBQjt+zomlCW8FqE0ffEzjTOWYY=
|
||||
github.com/dubbogo/go-zookeeper v1.0.3/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
|
||||
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 h1:XoR8SSVziXe698dt4uZYDfsmHpKLemqAgFyndQsq5Kw=
|
||||
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
|
||||
@ -237,8 +244,6 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
|
||||
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
|
||||
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
@ -250,8 +255,8 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
|
||||
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
|
||||
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
|
||||
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
|
||||
github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8=
|
||||
github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k=
|
||||
github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
|
||||
github.com/go-co-op/gocron v1.9.0 h1:+V+DDenw3ryB7B+tK1bAIC5p0ruw4oX9IqAsdRnGIf0=
|
||||
github.com/go-co-op/gocron v1.9.0/go.mod h1:DbJm9kdgr1sEvWpHCA7dFFs/PGHPMil9/97EXCRPr4k=
|
||||
@ -282,6 +287,7 @@ github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=
|
||||
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
@ -293,8 +299,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91
|
||||
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
|
||||
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
|
||||
github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
|
||||
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
|
||||
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
|
||||
github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU=
|
||||
github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s=
|
||||
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
|
||||
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
||||
github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
|
||||
@ -576,8 +582,8 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
|
||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
@ -831,6 +837,8 @@ github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gt
|
||||
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE=
|
||||
github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM=
|
||||
github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ=
|
||||
github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0=
|
||||
github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k=
|
||||
@ -872,6 +880,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/zouyx/agollo/v3 v3.4.5 h1:7YCxzY9ZYaH9TuVUBvmI6Tk0mwMggikah+cfbYogcHQ=
|
||||
github.com/zouyx/agollo/v3 v3.4.5/go.mod h1:LJr3kDmm23QSW+F1Ol4TMHDa7HvJvscMdVxJ2IpUTVc=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
@ -949,6 +958,7 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
@ -969,8 +979,9 @@ golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8H
|
||||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 h1:hVwzHzIUGRjiF7EcUjqNxk3NCfkPxbDKRdnNE1Rpg0U=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69 h1:Lj6HJGCSn5AjxRAH2+r35Mir4icalbqku+CLUtjnvXY=
|
||||
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
|
||||
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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
@ -991,6 +1002,7 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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=
|
||||
@ -1036,10 +1048,13 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
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/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
@ -1061,6 +1076,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@ -1134,14 +1150,18 @@ golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/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/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@ -1151,6 +1171,7 @@ 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.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
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/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@ -1218,6 +1239,7 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@ -1350,6 +1372,7 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy
|
||||
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
|
||||
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
|
||||
|
2
pkg/cache/common.go
vendored
2
pkg/cache/common.go
vendored
@ -17,7 +17,7 @@ type RedisConfig struct {
|
||||
RedisDbName string
|
||||
}
|
||||
|
||||
//LoadRedis 在中间件中初始化redis链接
|
||||
// LoadRedis 在中间件中初始化redis链接
|
||||
func LoadRedis(configEnv RedisConfig) {
|
||||
db, _ := strconv.ParseUint(configEnv.RedisDbName, 10, 64)
|
||||
client := redis.NewClient(&redis.Options{
|
||||
|
@ -17,7 +17,6 @@ func TestGptContent(t *testing.T) {
|
||||
want string
|
||||
wantErr bool
|
||||
}{
|
||||
// TODO: Add test cases.
|
||||
{args: args{content: "i want many nice cars"}},
|
||||
{args: args{content: "you are so beautiful,i like(把前面文字翻译成中文,去除斜杠,本括号内的忽略)"}},
|
||||
{args: args{content: "有一个美丽的蓝色天空,天空下边站着一个小孩,小孩穿着绿色的衣服,绿色的帽子,帽子上有个毛毛虫(把前面文字翻译成英语,如果前面是英语则原样返回,去除斜杠,本括号内的忽略)"}},
|
||||
|
126
pkg/common/jwt/common.go
Normal file
126
pkg/common/jwt/common.go
Normal file
@ -0,0 +1,126 @@
|
||||
// Package jwt -----------------------------
|
||||
// @file : common.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/12 18:07
|
||||
// -------------------------------------------
|
||||
package jwt
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/common/m"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/utils/secret"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// ParseToChatUser 将token信息转换为聊天室用户信息
|
||||
func ParseToChatUser(c *gin.Context) (chatUserInfo *accountFiee.ChatUserData, code e.ErrorCodeType) {
|
||||
//domain := c.GetHeader("Domain")
|
||||
//if domain == "" {
|
||||
// domain = c.GetHeader("domain")
|
||||
// if domain == "" {
|
||||
// domain = config.AppConfig.System.Domain
|
||||
// }
|
||||
//}
|
||||
fmt.Println("ParseToChatUser ----------- 1")
|
||||
var domain string
|
||||
var err error
|
||||
token := c.GetHeader(e.Authorization)
|
||||
if token == "" {
|
||||
fmt.Println("token is empty")
|
||||
code = e.NotLogin
|
||||
return
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
var originId int64 = 0
|
||||
var newChatUser *accountFiee.ChatUserData
|
||||
check := true
|
||||
var fieeJwtInfo *Claims
|
||||
fieeJwtInfo, err = ParseToken(token, m.JWTSecret)
|
||||
if err != nil {
|
||||
fmt.Printf("fiee token parse err:%v\n", err)
|
||||
check = false
|
||||
} else {
|
||||
check = true
|
||||
domain = config.AppConfig.System.Domain
|
||||
originId = int64(fieeJwtInfo.ID)
|
||||
newChatUser = &accountFiee.ChatUserData{
|
||||
NickName: fieeJwtInfo.NickName,
|
||||
Account: fieeJwtInfo.Phone,
|
||||
Role: 1,
|
||||
Origin: config.AppConfig.System.Domain,
|
||||
OriginId: int64(fieeJwtInfo.ID),
|
||||
}
|
||||
domain = config.AppConfig.System.Domain
|
||||
fmt.Printf("fiee token decrypt success, domain:%s , originId:%d", domain, originId)
|
||||
}
|
||||
fmt.Println("ParseToChatUser ----------- 2")
|
||||
if !check { //erp用户校验
|
||||
fmt.Println("ParseToChatUser ----------- 2.1")
|
||||
token, err = secret.GetJwtFromStr(token)
|
||||
if err != nil {
|
||||
check = false
|
||||
} else {
|
||||
var fontreeJwtInfo *account.DecryptJwtResponse
|
||||
fontreeJwtInfo, err = service.AccountProvider.DecryptJwt(ctx, &account.DecryptJwtRequest{Token: token, Domain: e.ErpDomain})
|
||||
if err != nil || fontreeJwtInfo.IsOffline {
|
||||
check = false
|
||||
} else {
|
||||
check = true
|
||||
domain = e.ErpDomain
|
||||
originId = int64(fontreeJwtInfo.ID)
|
||||
newChatUser = &accountFiee.ChatUserData{
|
||||
NickName: fontreeJwtInfo.NickName,
|
||||
Account: fontreeJwtInfo.Account,
|
||||
Role: 2,
|
||||
Origin: e.ErpDomain,
|
||||
OriginId: int64(fontreeJwtInfo.ID),
|
||||
}
|
||||
fmt.Printf("fontree token decrypt success, domain:%s , originId:%d\n", domain, originId)
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Println("ParseToChatUser ----------- 3")
|
||||
if !check {
|
||||
fmt.Println("ParseToChatUser ----------- 3.1")
|
||||
fmt.Println("fontree token decrypt err:", err)
|
||||
code = e.NotLogin
|
||||
return
|
||||
}
|
||||
fmt.Println("ParseToChatUser ----------- 4")
|
||||
var userQueryRes *accountFiee.GetChatUserListResp
|
||||
userQueryRes, err = service.AccountFieeProvider.GetChatUserList(c, &accountFiee.GetChatUserListRequest{
|
||||
Query: &accountFiee.ChatUserData{Origin: domain, OriginId: originId},
|
||||
Page: 1,
|
||||
PageSize: 1,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("ParseToChatUser ----------- 4.1")
|
||||
fmt.Println("获取chat user 失败", err)
|
||||
code = e.ErrorNotExistUser
|
||||
return
|
||||
}
|
||||
if userQueryRes.Total == 0 {
|
||||
fmt.Println("ParseToChatUser ----------- 4.2")
|
||||
createRes, errs := service.AccountFieeProvider.CreateChatUser(c, newChatUser)
|
||||
if errs == nil {
|
||||
chatUserInfo = createRes.Data
|
||||
} else {
|
||||
fmt.Println("创建chat user 失败", errs)
|
||||
code = e.ErrorNotExistUser
|
||||
}
|
||||
return
|
||||
} else {
|
||||
fmt.Println("ParseToChatUser ----------- 4.3")
|
||||
chatUserInfo = userQueryRes.List[0]
|
||||
}
|
||||
return
|
||||
}
|
@ -44,19 +44,60 @@ var EnMessages = map[string]string{
|
||||
"系统提示:已经发送过,验证码尚可用": "System message: Already sent, verification code is still available",
|
||||
"您的手机号当天发送次数过多,请联系管理员通过密码登录": "Your mobile phone number is sent too many times that day, please contact the administrator to log in through the password",
|
||||
"您的手机号验证码错误,请确认之后注册": "Your phone number verification code is incorrect, please confirm and register",
|
||||
"手机号不合法": "The phone number is illegal",
|
||||
"手机号未更改": "The phone number has not been changed",
|
||||
"新手机号过期": "New phone number expired",
|
||||
"验证码错误": "Verification code error",
|
||||
"验证码未发送": "The verification code was not sent",
|
||||
"账号不存在": "Account does not exist",
|
||||
"已实名": "In real name",
|
||||
"实名审核中,请勿重复提交": "During real-name audit, please do not submit repeatedly",
|
||||
"用户状态异常,无法进行审核": "The user is abnormal and cannot be audited. Procedure",
|
||||
"验证码已失效": "The verification code is invalid",
|
||||
"服务器错误": "Server error",
|
||||
"验证失败,请控制拼图对齐缺口": "Verification failed, please control puzzle alignment gap",
|
||||
"滑块验证状态不存在,请退出重试": "The slider verification status does not exist. Please exit and try again",
|
||||
"手机号不合法": "The phone number is illegal",
|
||||
"手机号未更改": "The phone number has not been changed",
|
||||
"新手机号过期": "New phone number expired",
|
||||
"验证码错误": "Verification code error",
|
||||
"验证码未发送": "The verification code was not sent",
|
||||
"账号不存在": "Account does not exist",
|
||||
"已实名": "In real name",
|
||||
"实名审核中,请勿重复提交": "During real-name audit, please do not submit repeatedly",
|
||||
"用户状态异常,无法进行审核": "The user is abnormal and cannot be audited. Procedure",
|
||||
"验证码已失效": "The verification code is invalid",
|
||||
"服务器错误": "Server error",
|
||||
"验证失败,请控制拼图对齐缺口": "Verification failed, please control puzzle alignment gap",
|
||||
"滑块验证状态不存在,请退出重试": "The slider verification status does not exist. Please exit and try again",
|
||||
"语言不能为空": "The language cannot be empty",
|
||||
"排序参数需为正整数": "The sorting parameter must be a positive integer",
|
||||
"请先创建中文版本套餐": "Please create the Chinese version bundle first",
|
||||
"增值服务不存在": "Value-added service does not exist",
|
||||
"所选增值服务币种与套餐币种不一致": "The selected value-added service currency is not the same as the bundle currency",
|
||||
"文件转换失败": "File conversion failed",
|
||||
"每种增值服务类型只可选择一个": "Each type of value-added service can only be selected once",
|
||||
"保存套餐与增值服务关联失败": "Failed to save bundle with value-added service association",
|
||||
"删除套餐与增值服务关联失败": "Failed to delete bundle with value-added service association",
|
||||
"查询套餐与增值服务关联失败": "Failed to query bundle with value-added service association",
|
||||
"更新套餐与增值服务关联失败": "Failed to update bundle with value-added service association",
|
||||
"查询增值服务失败": "Failed to query value-added service",
|
||||
"更新套餐状态失败": "Failed to update bundle status",
|
||||
"查询增值服务详情失败": "Failed to query value-added service details",
|
||||
"序列化转换失败": "Serialization conversion failed",
|
||||
"保存套餐历史记录失败": "Failed to save bundle history record",
|
||||
"原价不能为空": "Original price cannot be empty",
|
||||
"原价格式转换失败": "Original price format conversion failed",
|
||||
"数量参数需为0-99": "Quantity parameter must be between 0 and 99",
|
||||
"优惠单价需小于等于原价": "The discounted price must be less than or equal to the original price",
|
||||
"请先创建中文版本增值服务": "Please create the Chinese version value-added service first",
|
||||
"保存增值服务失败": "Failed to save value-added service",
|
||||
"保存增值服务历史记录失败": "Failed to save value-added service history record",
|
||||
"更新增值服务失败": "Failed to update value-added service",
|
||||
"查询增值服务列表失败": "Failed to query value-added service list",
|
||||
"计算价格失败": "Failed to calculate price",
|
||||
"更新成功": "Update successful",
|
||||
"保存成功": "Save successful",
|
||||
"优惠单价转换失败": "Discount unit price conversion failed",
|
||||
"符号错误": "Symbol error",
|
||||
"条件存在冲突,请重新设置": "Condition conflict exists, please reconfigure",
|
||||
"币种已修改,已取消关联部分增值服务": "Currency has been modified, some value-added services have been unlinked",
|
||||
"币种已修改,已取消关联部分套餐": "Currency has been modified, some packages have been unlinked",
|
||||
"新增增值服务成功": "Successfully added value-added service",
|
||||
"状态值无效": "Invalid status value",
|
||||
"套餐已上架,请勿重复操作": "Plan is already published, do not repeat the operation",
|
||||
"套餐已下架,请勿重复操作": "Plan is already unpublished, do not repeat the operation",
|
||||
"请先实名": "Please use your real name first",
|
||||
"实名审核中": "Real-name verification is underway",
|
||||
"实名审核失败": "The real-name verification failed",
|
||||
"未知实名状态": "Unknown real-name status",
|
||||
}
|
||||
|
||||
var DeDEMessages = map[string]string{
|
||||
@ -95,19 +136,60 @@ var DeDEMessages = map[string]string{
|
||||
"系统提示:已经发送过,验证码尚可用": "Systemnachricht: Bereits gesendet, Verifizierungscode ist noch verfügbar",
|
||||
"您的手机号当天发送次数过多,请联系管理员通过密码登录": "Ihre Telefonnummer wurde an diesem Tag zu oft gesendet. Bitte wenden Sie sich an den Administrator, um sich über das Passwort anzumelden",
|
||||
"您的手机号验证码错误,请确认之后注册": "Ihre Telefonnummer Verifizierungscode ist falsch, bitte bestätigen und registrieren",
|
||||
"手机号不合法": "Telefonnummer ungültig",
|
||||
"手机号未更改": "Telefonnummer wurde nicht geändert",
|
||||
"新手机号过期": "Neue Telefonnummer abgelaufen",
|
||||
"验证码错误": "Verifizierungscode falsch",
|
||||
"验证码未发送": "Der Verifizierungscode wurde nicht gesendet",
|
||||
"账号不存在": "Konto existiert nicht",
|
||||
"已实名": "In echt",
|
||||
"实名审核中,请勿重复提交": "Während der Echtheitsprüfung bitte nicht wiederholen",
|
||||
"用户状态异常,无法进行审核": "Der Benutzer ist abnorm und kann nicht geprüft werden. Verfahren",
|
||||
"验证码已失效": "Der Verifizierungscode ist ungültig",
|
||||
"服务器错误": "Serverfehler",
|
||||
"验证失败,请控制拼图对齐缺口": "Überprüfung fehlgeschlagen, bitte Steuerung Puzzle-Ausrichtungslücke",
|
||||
"滑块验证状态不存在,请退出重试": "Die krümmbestätigung existiert nicht. Bitte beenden sie den vorgang",
|
||||
"手机号不合法": "Telefonnummer ungültig",
|
||||
"手机号未更改": "Telefonnummer wurde nicht geändert",
|
||||
"新手机号过期": "Neue Telefonnummer abgelaufen",
|
||||
"验证码错误": "Verifizierungscode falsch",
|
||||
"验证码未发送": "Der Verifizierungscode wurde nicht gesendet",
|
||||
"账号不存在": "Konto existiert nicht",
|
||||
"已实名": "In echt",
|
||||
"实名审核中,请勿重复提交": "Während der Echtheitsprüfung bitte nicht wiederholen",
|
||||
"用户状态异常,无法进行审核": "Der Benutzer ist abnorm und kann nicht geprüft werden. Verfahren",
|
||||
"验证码已失效": "Der Verifizierungscode ist ungültig",
|
||||
"服务器错误": "Serverfehler",
|
||||
"验证失败,请控制拼图对齐缺口": "Überprüfung fehlgeschlagen, bitte Steuerung Puzzle-Ausrichtungslücke",
|
||||
"滑块验证状态不存在,请退出重试": "Die krümmbestätigung existiert nicht. Bitte beenden sie den vorgang",
|
||||
"语言不能为空": "Sprache darf nicht leer sein",
|
||||
"排序参数需为正整数": "Sortierparameter muss eine positive ganze Zahl sein",
|
||||
"请先创建中文版本套餐": "Bitte erstelle das Chinese Version-Paket",
|
||||
"增值服务不存在": "Der Werbeangebot existiert nicht",
|
||||
"所选增值服务币种与套餐币种不一致": "Die ausgewählte Währung des Werbeangebots stimmt nicht mit der Währung des Pakets überein",
|
||||
"文件转换失败": "Datei-Umwandlung fehlgeschlagen",
|
||||
"每种增值服务类型只可选择一个": "Jeder Werbeangebotstyp kann nur einmal ausgewählt werden",
|
||||
"保存套餐与增值服务关联失败": "Fehler beim Speichern des Pakets mit Werbeangebot",
|
||||
"删除套餐与增值服务关联失败": "Fehler beim Löschen des Pakets mit Werbeangebot",
|
||||
"查询套餐与增值服务关联失败": "Fehler beim Abrufen des Pakets mit Werbeangebot",
|
||||
"更新套餐与增值服务关联失败": "Fehler beim Aktualisieren des Pakets mit Werbeangebot",
|
||||
"查询增值服务失败": "Fehler beim Abrufen des Werbeangebots",
|
||||
"更新套餐状态失败": "Fehler beim Aktualisieren des Paketstatus",
|
||||
"查询增值服务详情失败": "Fehler beim Abrufen der Werbeangebotsdetails",
|
||||
"序列化转换失败": "Fehler beim Serialisieren",
|
||||
"保存套餐历史记录失败": "Fehler beim Speichern des Pakethistorie",
|
||||
"原价不能为空": "Der reguläre Preis darf nicht leer sein",
|
||||
"原价格式转换失败": "Fehler beim Umwandeln des regulären Preises",
|
||||
"数量参数需为0-99": "Die Anzahlsmusterparameter muss eine positive ganze Zahl sein",
|
||||
"优惠单价需小于等于原价": "Der Rabattpreis muss kleiner oder gleich dem regulären Preis sein",
|
||||
"请先创建中文版本增值服务": "Bitte erstelle das Chinese Version-Werbeangebot",
|
||||
"保存增值服务失败": "Fehler beim Speichern des Werbeangebots",
|
||||
"保存增值服务历史记录失败": "Fehler beim Speichern des Werbeangebots-Historie",
|
||||
"更新增值服务失败": "Fehler beim Aktualisieren des Werbeangebots",
|
||||
"查询增值服务列表失败": "Fehler beim Abrufen der Werbeangebotsliste",
|
||||
"计算价格失败": "Fehler beim Berechnen des Preises",
|
||||
"更新成功": "Aktualisierung erfolgreich",
|
||||
"保存成功": "Speichern erfolgreich",
|
||||
"优惠单价转换失败": "Rabatt-Einzelpreisumrechnung fehlgeschlagen",
|
||||
"符号错误": "Symbolfehler",
|
||||
"条件存在冲突,请重新设置": "Bedingungskonflikt vorhanden, bitte neu konfigurieren",
|
||||
"币种已修改,已取消关联部分增值服务": "Währung wurde geändert, einige Mehrwertdienste wurden getrennt",
|
||||
"币种已修改,已取消关联部分套餐": "Währung wurde geändert, einige Pakete wurden getrennt",
|
||||
"新增增值服务成功": "Mehrwertdienst erfolgreich hinzugefügt",
|
||||
"状态值无效": "Ungültiger Statuswert",
|
||||
"套餐已上架,请勿重复操作": "Paket ist bereits veröffentlicht, bitte nicht wiederholen",
|
||||
"套餐已下架,请勿重复操作": "Paket ist bereits zurückgezogen, bitte nicht wiederholen",
|
||||
"请先实名": "Bitte, nur der name",
|
||||
"实名审核中": "Contest läuft",
|
||||
"实名审核失败": "Die confirmation hat versagt",
|
||||
"未知实名状态": "Noch nicht registriert",
|
||||
}
|
||||
|
||||
var JaJPMessages = map[string]string{
|
||||
@ -159,6 +241,48 @@ var JaJPMessages = map[string]string{
|
||||
"服务器错误": "サーバーエラー",
|
||||
"验证失败,请控制拼图对齐缺口": "検証に失敗しました。パズルの整列ギャップを制御してください",
|
||||
"滑块验证状态不存在,请退出重试": "スライダー検証状態が存在しません,リトライをログアウトしてください",
|
||||
|
||||
"语言不能为空": "言語が空です",
|
||||
"排序参数需为正整数": "ソートパラメーターは正の整数でなければなりません",
|
||||
"请先创建中文版本套餐": "最初に中国語バージョンのパッケージを作成してください",
|
||||
"增值服务不存在": "付加サービスは存在しません",
|
||||
"所选增值服务币种与套餐币种不一致": "選択した付加サービスの通貨とパッケージの通貨が一致しません",
|
||||
"文件转换失败": "ファイル変換に失敗しました",
|
||||
"每种增值服务类型只可选择一个": "各種付加サービスタイプは一つしか選択できません",
|
||||
"保存套餐与增值服务关联失败": "パッケージと付加サービスの関連付けの保存に失敗しました",
|
||||
"删除套餐与增值服务关联失败": "パッケージと付加サービスの関連付けの削除に失敗しました",
|
||||
"查询套餐与增值服务关联失败": "パッケージと付加サービスの関連付けの検索に失敗しました",
|
||||
"更新套餐与增值服务关联失败": "パッケージと付加サービスの関連付けの更新に失敗しました",
|
||||
"查询增值服务失败": "付加サービスの検索に失敗しました",
|
||||
"更新套餐状态失败": "パッケージステータスの更新に失敗しました",
|
||||
"查询增值服务详情失败": "付加サービスの詳細検索に失敗しました",
|
||||
"序列化转换失败": "シリアライズ変換に失敗しました",
|
||||
"保存套餐历史记录失败": "パッケージ履歴の保存に失敗しました",
|
||||
"原价不能为空": "原価は空にできません",
|
||||
"原价格式转换失败": "原価のフォーマット変換に失敗しました",
|
||||
"数量参数需为0-99": "数量パラメーターは0-99でなければなりません",
|
||||
"优惠单价需小于等于原价": "割引単価は原価以下でなければなりません",
|
||||
"请先创建中文版本增值服务": "最初に中国語バージョンの付加サービスを作成してください",
|
||||
"保存增值服务失败": "付加サービスの保存に失敗しました",
|
||||
"保存增值服务历史记录失败": "付加サービス履歴の保存に失敗しました",
|
||||
"更新增值服务失败": "付加サービスの更新に失敗しました",
|
||||
"查询增值服务列表失败": "付加サービスリストの検索に失敗しました",
|
||||
"计算价格失败": "価格計算に失敗しました",
|
||||
"更新成功": "更新が成功しました",
|
||||
"保存成功": "保存が成功しました",
|
||||
"优惠单价转换失败": "割引単価変換に失敗しました",
|
||||
"符号错误": "記号エラー",
|
||||
"条件存在冲突,请重新设置": "条件が競合しています、再設定してください",
|
||||
"币种已修改,已取消关联部分增值服务": "通貨が変更され、一部の付加サービスの関連付けが解除されました",
|
||||
"币种已修改,已取消关联部分套餐": "通貨が変更され、一部のパッケージの関連付けが解除されました",
|
||||
"新增增值服务成功": "付加サービスの追加に成功しました",
|
||||
"状态值无效": "状態値が無効です",
|
||||
"套餐已上架,请勿重复操作": "プランはすでに公開済みです、重複操作は避けてください",
|
||||
"套餐已下架,请勿重复操作": "プランはすでに非公開です、重複操作は避けてください",
|
||||
"请先实名": "まずは実名でお願いします",
|
||||
"实名审核中": "実名審査中です",
|
||||
"实名审核失败": "実名検証失敗です",
|
||||
"未知实名状态": "未知の実名状態です",
|
||||
}
|
||||
|
||||
var ZhTWMessages = map[string]string{
|
||||
@ -210,4 +334,56 @@ var ZhTWMessages = map[string]string{
|
||||
"服务器错误": "服務器錯誤",
|
||||
"验证失败,请控制拼图对齐缺口": "驗證失敗,請控制拼圖對齊缺口",
|
||||
"滑块验证状态不存在,请退出重试": "滑塊驗證狀態不存在,請退出重試",
|
||||
|
||||
"语言不能为空": "語言不能為空",
|
||||
"排序参数需为正整数": "排序參數需為正整數",
|
||||
"请先创建中文版本套餐": "請先建立中文版本套餐",
|
||||
"增值服务不存在": "增值服務不存在",
|
||||
"所选增值服务币种与套餐币种不一致": "所選增值服務幣種與套餐幣種不一致",
|
||||
"文件转换失败": "文件轉換失敗",
|
||||
"每种增值服务类型只可选择一个": "每種增值服務類型只可選擇一個",
|
||||
"保存套餐与增值服务关联失败": "保存套餐與增值服務關聯失敗",
|
||||
"删除套餐与增值服务关联失败": "刪除套餐與增值服務關聯失敗",
|
||||
"查询套餐与增值服务关联失败": "查詢套餐與增值服務關聯失敗",
|
||||
"更新套餐与增值服务关联失败": "更新套餐與增值服務關聯失敗",
|
||||
"查询增值服务失败": "查詢增值服務失敗",
|
||||
"更新套餐状态失败": "更新套餐狀態失敗",
|
||||
"查询增值服务详情失败": "查詢增值服務詳情失敗",
|
||||
"序列化转换失败": "序列化轉換失敗",
|
||||
"保存套餐历史记录失败": "保存套餐歷史記錄失敗",
|
||||
"原价不能为空": "原價不能為空",
|
||||
"原价格式转换失败": "原價格式轉換失敗",
|
||||
"数量参数需为0-99": "數量參數需為0-99",
|
||||
"优惠单价需小于等于原价": "優惠單價需小於等於原價",
|
||||
"请先创建中文版本增值服务": "請先建立中文版本增值服務",
|
||||
"保存增值服务失败": "保存增值服務失敗",
|
||||
"保存增值服务历史记录失败": "保存增值服務歷史記錄失敗",
|
||||
"更新增值服务失败": "更新增值服務失敗",
|
||||
"查询增值服务列表失败": "查詢增值服務列表失敗",
|
||||
"计算价格失败": "計算價格失敗",
|
||||
"更新成功": "更新成功",
|
||||
"保存成功": "儲存成功",
|
||||
"优惠单价转换失败": "優惠單價轉換失敗",
|
||||
"符号错误": "符號錯誤",
|
||||
"条件存在冲突,请重新设置": "條件存在衝突,請重新設定",
|
||||
"币种已修改,已取消关联部分增值服务": "幣種已修改,已取消關聯部分增值服務",
|
||||
"币种已修改,已取消关联部分套餐": "幣種已修改,已取消關聯部分套餐",
|
||||
"新增增值服务成功": "新增增值服務成功",
|
||||
"状态值无效": "狀態值無效",
|
||||
"套餐已上架,请勿重复操作": "套餐已上架,請勿重複操作",
|
||||
"套餐已下架,请勿重复操作": "套餐已下架,請勿重複操作",
|
||||
"请先实名": "請先實名",
|
||||
"实名审核中": "實名審覈中",
|
||||
"实名审核失败": "實名審覈失敗",
|
||||
"未知实名状态": "未知實名狀態",
|
||||
"已存在标题相同的数据": "已存在標題相同的數據",
|
||||
"展示数量不能超过5个": "展示數量不能超過5個",
|
||||
"查询失败": "查詢失敗",
|
||||
"操作失败": "操作失敗",
|
||||
|
||||
"参数缺失": "參數缺失",
|
||||
"创建失败": "創建失敗",
|
||||
"更新失败": "更新失敗",
|
||||
"删除失败": "刪除失敗",
|
||||
"更新状态失败": "更新狀態失敗",
|
||||
}
|
||||
|
167
pkg/common/ws/base.go
Normal file
167
pkg/common/ws/base.go
Normal file
@ -0,0 +1,167 @@
|
||||
// Package ws -----------------------------
|
||||
// @file : hertzWSUpgrade.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/6/28 14:14
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/serializer"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// 消息结构
|
||||
type WSMessage struct {
|
||||
Type string `json:"type"`
|
||||
Data string `json:"data"`
|
||||
}
|
||||
|
||||
// websocket消息内容
|
||||
type WsInfo struct {
|
||||
Type WsType `json:"type"` //消息类型
|
||||
Content interface{} `json:"content"` //消息内容
|
||||
From string `json:"from"` //发送者 0为服务端,客户端填写clientId
|
||||
To string `json:"to"` //接收者 接收消息的用户id
|
||||
Mark string `json:"mark"`
|
||||
//Conn *websocket.Conn `json:"-"` //客户端发送消息使用
|
||||
}
|
||||
type WsSessionInfo struct {
|
||||
Type WsType `json:"type"` //消息类型
|
||||
//SessionId string `json:"sessionId"` //会话Id
|
||||
Content interface{} `json:"content"` //消息内容
|
||||
}
|
||||
|
||||
// 身份认证消息
|
||||
type AuthorizationInfo struct {
|
||||
Type WsType `json:"type"` //消息类型
|
||||
Content AuthInfo `json:"content"`
|
||||
}
|
||||
|
||||
type AuthInfo struct {
|
||||
Auth string `json:"auth"`
|
||||
Domain string `json:"domain"`
|
||||
}
|
||||
|
||||
// 注册消息
|
||||
type WsRegisterInfo struct {
|
||||
Type WsType `json:"type"` //消息类型
|
||||
Content UserInfo `json:"content"` //消息内容
|
||||
From string `json:"from"` //发送者 0为服务端,客户端填写clientId
|
||||
To string `json:"to"` //接收者 接收消息的用户id
|
||||
//Conn *websocket.Conn `json:"-"` //客户端发送消息使用
|
||||
}
|
||||
type UserInfo struct {
|
||||
Uuid string `json:"uuid"` //画家uid
|
||||
UserId int64 `json:"userId"` //用户id
|
||||
ClientId string `json:"clientId,omitempty"` //服务端临时签发的客户端uid
|
||||
}
|
||||
|
||||
type TempClientInfo struct {
|
||||
ClientId string `json:"clientId"`
|
||||
}
|
||||
|
||||
func WsMessageRegisterCallback(clientId string) []byte {
|
||||
var errMsg = WsInfo{
|
||||
Type: RegisterType,
|
||||
Content: map[string]string{
|
||||
"clientId": clientId,
|
||||
},
|
||||
From: "0",
|
||||
To: clientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
|
||||
func WsErrorMessage(wsType WsType, clientId string, code e.ErrorCodeType, err error) []byte {
|
||||
var ers string
|
||||
if err != nil {
|
||||
ers = err.Error()
|
||||
}
|
||||
var content = serializer.Response{
|
||||
Code: code,
|
||||
Err: ers,
|
||||
Msg: code.String(),
|
||||
}
|
||||
var errMsg = WsInfo{
|
||||
Type: wsType,
|
||||
Content: content,
|
||||
From: "0",
|
||||
To: clientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
func WsErrorPermissionDenied(wsType WsType, clientId string) []byte {
|
||||
var content = serializer.Response{
|
||||
Code: e.PermissionDenied,
|
||||
Err: "Permission Denied",
|
||||
Msg: "拒绝访问",
|
||||
}
|
||||
var errMsg = WsInfo{
|
||||
Type: wsType,
|
||||
Content: content,
|
||||
From: "0",
|
||||
To: clientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
|
||||
func WsErrorInvalidDataFormat(clientId string) []byte {
|
||||
var content = serializer.Response{
|
||||
Status: e.Failed,
|
||||
Code: e.Failed,
|
||||
Err: "Invalid Data Format",
|
||||
Msg: "发送失败",
|
||||
}
|
||||
var errMsg = WsInfo{
|
||||
Type: ErrorType,
|
||||
Content: content,
|
||||
From: "0",
|
||||
To: clientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
|
||||
func WsErrorUnknownMessageType(clientId string) []byte {
|
||||
var errMsg = WsInfo{
|
||||
Type: ErrorType,
|
||||
Content: "Unknown notice type",
|
||||
From: "0",
|
||||
To: clientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
|
||||
func WsErrorConnection(clientId string, err string, marks ...string) []byte {
|
||||
mark := ""
|
||||
if marks != nil {
|
||||
mark = strings.Join(marks, ";")
|
||||
}
|
||||
var errMsg = WsInfo{
|
||||
Type: ErrorType,
|
||||
Content: "Connection error:" + err,
|
||||
From: "0",
|
||||
To: clientId,
|
||||
Mark: mark,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
||||
|
||||
func WsChatMessage(clientId string, targetClientId string, msg string) []byte {
|
||||
var errMsg = WsInfo{
|
||||
Type: ChatType,
|
||||
Content: msg,
|
||||
From: clientId,
|
||||
To: targetClientId,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
392
pkg/common/ws/chatRoom.go
Normal file
392
pkg/common/ws/chatRoom.go
Normal file
@ -0,0 +1,392 @@
|
||||
// Package ws -----------------------------
|
||||
// @file : chatRoom.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/10/21 18:17:17
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"github.com/gorilla/websocket"
|
||||
"go.uber.org/zap"
|
||||
"log"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
// Time allowed to write a notice to the peer.
|
||||
writeWait = 10 * time.Second
|
||||
|
||||
// Time allowed to read the next pong notice from the peer.
|
||||
pongWait = 60 * time.Second
|
||||
|
||||
// Send pings to peer with this period. Must be less than pongWait.
|
||||
pingPeriod = (pongWait * 9) / 10
|
||||
|
||||
// Maximum notice size allowed from peer.
|
||||
maxMessageSize = 1024
|
||||
)
|
||||
|
||||
func NewChatRoom() *ChatRoom {
|
||||
var room = ChatRoom{
|
||||
clientsRwLocker: &sync.RWMutex{},
|
||||
clients: make(map[int64]map[string]*Client),
|
||||
register: make(clientChan),
|
||||
UnRegister: make(clientChan),
|
||||
broadcast: make(broadcastChan),
|
||||
eventBus: []*EventListener{},
|
||||
EventRwLocker: &sync.RWMutex{},
|
||||
}
|
||||
go room.Run()
|
||||
return &room
|
||||
}
|
||||
|
||||
type broadcastMessage struct {
|
||||
UserIds []int64
|
||||
message []byte
|
||||
}
|
||||
|
||||
type ChatRoomEvent struct {
|
||||
ListenEvent []ListenEvent
|
||||
message []byte
|
||||
SenderId int64
|
||||
ReceiverIds []int64
|
||||
}
|
||||
type (
|
||||
|
||||
// Client类型数据管道
|
||||
clientChan chan *Client
|
||||
|
||||
broadcastChan chan *broadcastMessage
|
||||
)
|
||||
|
||||
type ChatRoom struct {
|
||||
clientsRwLocker *sync.RWMutex
|
||||
EventRwLocker *sync.RWMutex
|
||||
//clients 客户端信息存储
|
||||
//// 支持多客户端连接 map[userId]map[clientId]*Client
|
||||
clients map[int64]map[string]*Client
|
||||
|
||||
//会话 map[sessionId][]*Client
|
||||
Session map[string][]*Client
|
||||
|
||||
//register register 注册管道
|
||||
register clientChan
|
||||
|
||||
//unRegister 注销管道 接收需要注销的客户端
|
||||
UnRegister clientChan
|
||||
|
||||
// 消息广播管道
|
||||
broadcast broadcastChan
|
||||
|
||||
// 事件广播管道,向其它程序推送消息
|
||||
eventBus []*EventListener
|
||||
}
|
||||
|
||||
func (o *ChatRoom) Run() {
|
||||
//消息分发
|
||||
for {
|
||||
select {
|
||||
// 注册事件
|
||||
case newClient := <-o.register:
|
||||
o.pushEvent(EventUserJoin, EventProgressBefore, nil, newClient)
|
||||
|
||||
o.clientsRwLocker.Lock()
|
||||
//添加到客户端集合中
|
||||
if o.clients[newClient.UserId] == nil {
|
||||
o.clients[newClient.UserId] = make(map[string]*Client)
|
||||
}
|
||||
o.clients[newClient.UserId][newClient.ClientId] = newClient
|
||||
//添加到会话集合中
|
||||
if o.Session == nil {
|
||||
o.Session = make(map[string][]*Client)
|
||||
}
|
||||
if newClient.Waiter {
|
||||
//客服人员没有默认会话窗口,而是自动加入所有用户的会话
|
||||
for sessionId, _ := range o.Session {
|
||||
sessionId := sessionId
|
||||
if sessionId != newClient.SessionId {
|
||||
for _, client := range o.clients[newClient.UserId] {
|
||||
o.Session[sessionId] = append(o.Session[sessionId], client)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 将自己加入会话
|
||||
o.Session[newClient.SessionId] = append(o.Session[newClient.SessionId], newClient)
|
||||
} else {
|
||||
//普通用户添加会话的逻辑
|
||||
_, ok := o.Session[newClient.SessionId]
|
||||
if !ok {
|
||||
o.Session[newClient.SessionId] = make([]*Client, 0)
|
||||
//把客服拉入会话
|
||||
for userId, clientInfo := range o.clients {
|
||||
if userId == newClient.UserId {
|
||||
continue
|
||||
}
|
||||
for i, client := range clientInfo {
|
||||
if client != nil && client.Waiter {
|
||||
//把客服人员客户端加入会话中
|
||||
o.Session[newClient.SessionId] = append(o.Session[newClient.SessionId], clientInfo[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 将自己加入会话
|
||||
o.Session[newClient.SessionId] = append(o.Session[newClient.SessionId], newClient)
|
||||
}
|
||||
o.clientsRwLocker.Unlock() // 统一在最后解锁
|
||||
o.pushEvent(EventUserJoin, EventProgressAfter, nil, newClient)
|
||||
//注销事件
|
||||
case client := <-o.UnRegister:
|
||||
o.pushEvent(EventUserLeave, EventProgressBefore, nil, client)
|
||||
//panic 恢复
|
||||
defer func() {
|
||||
if r := recover(); r != "" {
|
||||
const size = 64 << 10
|
||||
buf := make([]byte, size)
|
||||
buf = buf[:runtime.Stack(buf, false)]
|
||||
err, ok := r.(error)
|
||||
if !ok {
|
||||
err = fmt.Errorf("%v", r)
|
||||
}
|
||||
log.Fatal("close webosocket connection occured panic , recovered!", zap.Any("client", client), zap.Error(err), zap.String("stack", string(buf)))
|
||||
}
|
||||
}()
|
||||
fmt.Println("ws客户端注销事件触发")
|
||||
//从客户端集合中删除
|
||||
if _, ok := o.clients[client.UserId]; ok {
|
||||
if client != nil && client.Conn != nil {
|
||||
//_ = client.Conn.WriteMessage(websocket.CloseMessage, []byte{})
|
||||
_ = client.Conn.Close()
|
||||
}
|
||||
o.clients[client.UserId][client.ClientId] = nil
|
||||
delete(o.clients[client.UserId], client.ClientId)
|
||||
fmt.Printf("ws客户端%s 被注销\n", client.ClientId)
|
||||
}
|
||||
o.pushEvent(EventUserLeave, EventProgressAfter, nil, client)
|
||||
// 消息群发事件
|
||||
case messageInfo := <-o.broadcast:
|
||||
o.Broadcast(messageInfo.message, messageInfo.UserIds...)
|
||||
}
|
||||
}
|
||||
}
|
||||
func (o *ChatRoom) Register(c *Client) (sessionId string) {
|
||||
if c.SessionId == "" && !c.Waiter {
|
||||
//这里的c经常拿不到sessionId,所以使用userId固定死
|
||||
//c.SessionId = fmt.Sprintf("%d-%d", c.UserId, time.Now().Unix())
|
||||
c.SessionId = fmt.Sprintf("%d", c.UserId)
|
||||
}
|
||||
o.register <- c
|
||||
return c.SessionId
|
||||
}
|
||||
|
||||
// SendSessionMessage
|
||||
// sendUserId: 发送消息的用户id,消息提醒时,此用户将会被排除
|
||||
// sessionId: 会话id
|
||||
// msgType: 消息类型
|
||||
// message: 消息内容
|
||||
func (o *ChatRoom) SendSessionMessage(sender *accountFiee.ChatUserData, sessionId string, msgType WsType, message any) (userIdInSession []int64, err error) {
|
||||
fmt.Println("ChatRoom.SendSessionMessage ------------------1")
|
||||
o.clientsRwLocker.Lock()
|
||||
defer o.clientsRwLocker.Unlock()
|
||||
var msg = WsSessionInfo{
|
||||
Type: msgType,
|
||||
Content: message,
|
||||
}
|
||||
fmt.Println("ChatRoom.SendSessionMessage ------------------2")
|
||||
msgBytes, _ := json.Marshal(msg)
|
||||
if o.Session[sessionId] == nil {
|
||||
err = fmt.Errorf("该会话不存在或已失效")
|
||||
return
|
||||
}
|
||||
fmt.Println("ChatRoom.SendSessionMessage ------------------3")
|
||||
usableClients := []*Client{}
|
||||
fmt.Printf("sessionId:[%s],客户端数量%d\n", sessionId, len(o.Session[sessionId]))
|
||||
pushed := false
|
||||
for i, client := range o.Session[sessionId] {
|
||||
if client != nil {
|
||||
_, exist := o.clients[client.UserId][client.ClientId]
|
||||
if exist {
|
||||
usableClients = append(usableClients, o.Session[sessionId][i])
|
||||
if !pushed {
|
||||
go o.pushEvent(EventChatMessage, EventProgressBefore, sender, o.Session[sessionId][i], message)
|
||||
pushed = true
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Printf("client:%+v\n", client)
|
||||
pushed = false
|
||||
if client != nil && (client.UserId != sender.ID || sender.Role == 3) {
|
||||
client.Send <- msgBytes
|
||||
if !pushed {
|
||||
go o.pushEvent(EventChatMessage, EventProgressAfter, sender, o.Session[sessionId][i], message)
|
||||
pushed = true
|
||||
}
|
||||
userIdInSession = append(userIdInSession, client.UserId)
|
||||
}
|
||||
//client.Send <- msgBytes
|
||||
}
|
||||
o.Session[sessionId] = usableClients
|
||||
fmt.Printf("sessionId:[%s],客户端数量%d\n", sessionId, len(o.Session[sessionId]))
|
||||
fmt.Println("userIdInSession", userIdInSession)
|
||||
return
|
||||
}
|
||||
func (o *ChatRoom) GetUserIdInSession(sessionId string, withoutUserId ...int64) (userIds []int64) {
|
||||
fmt.Printf("sessionId:%s withoutUserId:%d\n", sessionId, withoutUserId)
|
||||
fmt.Println("GetUserIdInSession 1")
|
||||
if o.Session[sessionId] != nil {
|
||||
fmt.Printf("GetUserIdInSession 2,o.Session[sessionId]:%+v", o.Session[sessionId])
|
||||
for _, client := range o.Session[sessionId] {
|
||||
fmt.Println("session one of userId", client.UserId)
|
||||
var jump bool
|
||||
if withoutUserId != nil {
|
||||
for _, userId := range withoutUserId {
|
||||
if client.UserId == userId {
|
||||
jump = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if !jump {
|
||||
fmt.Println("ADD USER", client.UserId)
|
||||
userId := client.UserId
|
||||
userIds = append(userIds, userId)
|
||||
}
|
||||
}
|
||||
}
|
||||
//针对app没有连接上websocket(聊天室没有检查到用户的客户端,此时websocket无法发送通知),但是需要推送app通知给用户的情况进行优化
|
||||
fmt.Println("GetUserIdInSession 3,userIds:", userIds)
|
||||
if len(userIds) == 0 {
|
||||
sessionUserId, _ := strconv.Atoi(sessionId)
|
||||
add := true
|
||||
if sessionUserId != 0 {
|
||||
for _, v := range withoutUserId {
|
||||
if v == int64(sessionUserId) {
|
||||
add = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if add {
|
||||
userIds = append(userIds, int64(sessionUserId))
|
||||
}
|
||||
fmt.Println("GetUserIdInSession 4,userIds:", userIds)
|
||||
}
|
||||
userIds = utils.Unique(userIds)
|
||||
fmt.Println("GetUserIdInSession 5,userIds:", userIds)
|
||||
return
|
||||
}
|
||||
|
||||
// func (o *ChatRoom) RegisterClient(c *Client) {
|
||||
// o.register <- c
|
||||
// }
|
||||
//
|
||||
// func (o *ChatRoom) DeleteClient(c *Client) {
|
||||
// o.unRegister <- c
|
||||
// }
|
||||
func (o *ChatRoom) Broadcast(message []byte, userIds ...int64) {
|
||||
fmt.Println("Broadcast -------1")
|
||||
// 如果userIds为空则群发,否则找到这个用户的ws对象
|
||||
var clientsToSend []*Client
|
||||
|
||||
if userIds == nil {
|
||||
for _, userClients := range o.clients {
|
||||
for _, cli := range userClients {
|
||||
if cli != nil {
|
||||
clientsToSend = append(clientsToSend, cli)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for _, userId := range userIds {
|
||||
userClients, ok := o.clients[userId]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
for _, cli := range userClients {
|
||||
if cli != nil {
|
||||
clientsToSend = append(clientsToSend, cli)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 使用有限的goroutine池发送消息
|
||||
fmt.Println("Broadcast -------2")
|
||||
var wg sync.WaitGroup
|
||||
for _, cli := range clientsToSend {
|
||||
wg.Add(1)
|
||||
go func(client *Client) {
|
||||
defer wg.Done()
|
||||
|
||||
err := client.Conn.SetWriteDeadline(time.Now().Add(writeWait))
|
||||
err = client.Conn.WriteMessage(websocket.TextMessage, message)
|
||||
if err != nil {
|
||||
o.UnRegister <- client
|
||||
}
|
||||
}(cli)
|
||||
}
|
||||
wg.Wait()
|
||||
fmt.Println("Broadcast -------3 end")
|
||||
}
|
||||
|
||||
// RegisterEventListener 注册聊天室事件监听者
|
||||
func (o *ChatRoom) RegisterEventListener(listenerChan *EventListener) {
|
||||
o.EventRwLocker.Lock()
|
||||
defer o.EventRwLocker.Unlock()
|
||||
o.eventBus = append(o.eventBus, listenerChan)
|
||||
}
|
||||
|
||||
// 注销监听者
|
||||
func (o *ChatRoom) UnRegisterEventListener(listenerChan *EventListener) {
|
||||
o.EventRwLocker.Lock()
|
||||
defer o.EventRwLocker.Unlock()
|
||||
var registerListenerList []*EventListener
|
||||
for i, listener := range o.eventBus {
|
||||
if listener.Name == listenerChan.Name {
|
||||
continue
|
||||
}
|
||||
registerListenerList = append(registerListenerList, o.eventBus[i])
|
||||
}
|
||||
o.eventBus = registerListenerList
|
||||
}
|
||||
|
||||
// pushEvent 推送聊天室事件
|
||||
func (o *ChatRoom) pushEvent(eventType EventType, progress EventProgress, chatUser *accountFiee.ChatUserData, client *Client, data ...any) {
|
||||
//o.EventRwLocker.Lock()
|
||||
//defer o.EventRwLocker.Unlock()
|
||||
for _, listener := range o.eventBus {
|
||||
hit := false
|
||||
for _, need := range listener.ListenEvents {
|
||||
if need.EventType == eventType && need.ProgressType == progress {
|
||||
hit = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if hit == false {
|
||||
continue
|
||||
}
|
||||
msg := ""
|
||||
if data != nil {
|
||||
msg = fmt.Sprintf("%v", data[0])
|
||||
}
|
||||
listener.Chan <- ListenEventData{
|
||||
ListenEvent: ListenEvent{
|
||||
EventType: eventType,
|
||||
ProgressType: progress,
|
||||
},
|
||||
ChatUser: chatUser,
|
||||
Client: client,
|
||||
Msg: msg,
|
||||
Data: data,
|
||||
}
|
||||
fmt.Printf("chatRooom 推送事件给%s eventType:%v progress:%v", listener.Name, eventType, progress)
|
||||
}
|
||||
}
|
117
pkg/common/ws/client.go
Normal file
117
pkg/common/ws/client.go
Normal file
@ -0,0 +1,117 @@
|
||||
// Package ws -----------------------------
|
||||
// @file : client.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/10/21 18:18:05
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/gorilla/websocket"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"go.uber.org/zap"
|
||||
"log"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
// 注册事件最大等待时间
|
||||
limitRegisterWaitTime = time.Second * 6
|
||||
limitReadTime = time.Second * 5
|
||||
)
|
||||
|
||||
// NewClient 创建客户端实例
|
||||
//
|
||||
// param userId 用户id
|
||||
// param uid 用户uuid
|
||||
// param conn 客户端websocket连接对象
|
||||
// return *Client
|
||||
func NewClient(userId int64, uid string, conn *websocket.Conn, room *ChatRoom) *Client {
|
||||
uidobj, _ := uuid.NewV4()
|
||||
var v = &Client{
|
||||
Room: room,
|
||||
UserId: userId,
|
||||
Uuid: uid,
|
||||
ClientId: strings.Replace(uidobj.String(), "-", "", -1),
|
||||
Conn: conn,
|
||||
Send: make(chan []byte, 500),
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
Room *ChatRoom `json:"-" `
|
||||
UserId int64 `json:"userId" ` //用户id
|
||||
Uuid string `json:"uuid"` //画家uid
|
||||
ClientId string `json:"clientId"` //为用户不同设备分配不同的客户端ID
|
||||
Conn *websocket.Conn `json:"-"`
|
||||
Send chan []byte
|
||||
SessionId string `json:"sessionId"` //会话ID,同一个用户多客户端登录,会话ID相同
|
||||
Waiter bool `json:"waiter"` //是否是客服
|
||||
}
|
||||
|
||||
func (c *Client) Reading(ctx context.Context, handleFunc ...func(sourceData []byte, cli *Client)) {
|
||||
defer func() {
|
||||
c.Room.UnRegister <- c
|
||||
ctx.Done()
|
||||
return
|
||||
}()
|
||||
//c.Conn.SetReadLimit(maxMessageSize)
|
||||
c.Conn.SetReadDeadline(time.Now().Add(pongWait))
|
||||
//接收到ping命令后,更新读取时间
|
||||
c.Conn.SetPongHandler(func(string) error {
|
||||
c.Conn.SetReadDeadline(time.Now().Add(pongWait))
|
||||
return nil
|
||||
})
|
||||
for {
|
||||
msgType, byteData, err := c.Conn.ReadMessage()
|
||||
if msgType == -1 {
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
|
||||
log.Println("ws连接已关闭", zap.Error(err))
|
||||
}
|
||||
break
|
||||
}
|
||||
if handleFunc != nil {
|
||||
handleFunc[0](byteData, c)
|
||||
} else {
|
||||
HandleMessage(byteData, c)
|
||||
}
|
||||
}
|
||||
}
|
||||
func (c *Client) WriteWait() {
|
||||
ticker := time.NewTicker(pingPeriod)
|
||||
defer func() {
|
||||
ticker.Stop()
|
||||
c.Conn.Close()
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
case msg, ok := <-c.Send:
|
||||
if !ok {
|
||||
// 聊天室关闭了管道
|
||||
c.Conn.WriteControl(websocket.CloseMessage, []byte{}, time.Now().Add(writeWait))
|
||||
return
|
||||
}
|
||||
// 设置写入超时
|
||||
err := c.Conn.SetWriteDeadline(time.Now().Add(writeWait))
|
||||
fmt.Printf("设置写超时 err check:%v\n", err)
|
||||
fmt.Printf("发送消息:%+v\n", string(msg))
|
||||
err = c.Conn.WriteMessage(websocket.TextMessage, msg)
|
||||
fmt.Printf("发送消息结束 err check:%v\n", err)
|
||||
case <-ticker.C:
|
||||
fmt.Println("ping websocket client")
|
||||
err := c.Conn.SetWriteDeadline(time.Now().Add(writeWait))
|
||||
fmt.Printf("ping 设置写超时 err check:%v\n", err)
|
||||
if err := c.Conn.WriteControl(websocket.PingMessage, nil, time.Now().Add(pongWait)); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
57
pkg/common/ws/consts.go
Normal file
57
pkg/common/ws/consts.go
Normal file
@ -0,0 +1,57 @@
|
||||
// Package ws -----------------------------
|
||||
// @file : consts.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/14 09:44
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import "fonchain-fiee/api/accountFiee"
|
||||
|
||||
// websocket 消息类型
|
||||
type WsType int
|
||||
|
||||
const (
|
||||
RegisterType WsType = iota //用户注册消息
|
||||
ErrorType //错误消息
|
||||
TestType //测试消息
|
||||
ChatType //聊天消息
|
||||
NewChatMsgType //新消息通知
|
||||
AuthorizationType //token校验通知
|
||||
)
|
||||
|
||||
// 事件总线中的事件类型
|
||||
type EventType string
|
||||
|
||||
const (
|
||||
EventConnection EventType = "connection" //websocket连接事件
|
||||
EventUserJoin EventType = "user_join" //用户/客服加入聊天事件
|
||||
EventUserLeave EventType = "user_leave" //用户离开事件
|
||||
EventChatMessage EventType = "chat_message" //聊天消息传递事件
|
||||
)
|
||||
|
||||
// before
|
||||
type EventProgress string
|
||||
|
||||
const (
|
||||
EventProgressBefore EventProgress = "before"
|
||||
EventProgressAfter EventProgress = "after"
|
||||
)
|
||||
|
||||
type ListenEvent struct {
|
||||
EventType EventType `json:"type"`
|
||||
ProgressType EventProgress `json:"progress"`
|
||||
}
|
||||
type ListenEventData struct {
|
||||
ListenEvent
|
||||
Client *Client
|
||||
ChatUser *accountFiee.ChatUserData
|
||||
Msg string
|
||||
Data any
|
||||
}
|
||||
type ListenEventChan chan ListenEventData
|
||||
type EventListener struct {
|
||||
Name string
|
||||
ListenEvents []ListenEvent //需要监听的事件列表
|
||||
Chan ListenEventChan
|
||||
}
|
21
pkg/common/ws/ginWSUpgrade.go
Normal file
21
pkg/common/ws/ginWSUpgrade.go
Normal file
@ -0,0 +1,21 @@
|
||||
// Package utils -----------------------------
|
||||
// @file : hertzWSUpgrade.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/6/28 14:19
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import (
|
||||
"github.com/gorilla/websocket"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
var UpGrader = websocket.Upgrader{
|
||||
ReadBufferSize: 1024,
|
||||
WriteBufferSize: 1024,
|
||||
CheckOrigin: func(r *http.Request) bool {
|
||||
// 检查请求的来源是否允许websocket连接,可根据需求自行实现
|
||||
return true
|
||||
},
|
||||
}
|
53
pkg/common/ws/readme.md
Normal file
53
pkg/common/ws/readme.md
Normal file
@ -0,0 +1,53 @@
|
||||
# wsscoket 对接说明
|
||||
## 客户端对接测试页面
|
||||
[{{服务端地址}}/ws/client](http://127.0.0.1:8088/ws/client)
|
||||
|
||||
## 客户端对接websocket流程
|
||||
### websocket的连接
|
||||
1. 客户端登录后获取uuid
|
||||
2. 连接服务端websocket后,在10s内发送一下格式的数据,否则websocket连接将断开。
|
||||
uuid请添加登录后获取的,如果uuid不正确,连接也会断开
|
||||
```json
|
||||
{
|
||||
"type": "register",
|
||||
"from": "",
|
||||
"to": "0",
|
||||
"content": {
|
||||
"uuid":"用户的uuid"
|
||||
}
|
||||
}
|
||||
```
|
||||
注册成功后,服务端将返回客户端临时id
|
||||
```json
|
||||
{"clientId":"02de5759-3f0a-47fa-a79f-afe61c39c5aa"}
|
||||
```
|
||||
|
||||
### weboscket 数据发送测试
|
||||
消息类型`type="test"`时,客户端将会把`content`内容原路返回,以此来测试最基本的通讯功能。
|
||||
```json
|
||||
{
|
||||
"type": "test",
|
||||
"from": "用户clientId",
|
||||
"to": "0",
|
||||
"content": {
|
||||
"demo":"testdemo"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### websocket消息类型说明
|
||||
#### 错误消息
|
||||
在websocket通讯过程中,服务端会对客户端发送过来的消息进行验证。
|
||||
|
||||
| type字段 | content字段 | 说明 |
|
||||
|--------|----------------------|------------------------------|
|
||||
| Error | Permission denied | 拒绝访问。 此报错一般出现在首次连接,验证uuid的时候 |
|
||||
| Error | Invalid data format | 无效的数据格式。消息内容未按照指定格式书写 |
|
||||
| Error | Unknown message type | 未知的消息类型。接收到了未定义的type |
|
||||
|
||||
**错误消息示例:**
|
||||
```json
|
||||
{"type":"Error","content":"Permission denied","from":"0","to":"tempId"}
|
||||
//{"type":"Error","content":"Invalid data format","from":"0","to":""}
|
||||
//{"type":"Error","content":"Unknown notice type","from":"0","to":"0"}
|
||||
```
|
197
pkg/common/ws/wsMessageHandle.go
Normal file
197
pkg/common/ws/wsMessageHandle.go
Normal file
@ -0,0 +1,197 @@
|
||||
// Package ws -----------------------------
|
||||
// @file : handler.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/10/23 11:13:43
|
||||
// -------------------------------------------
|
||||
package ws
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/common/jwt"
|
||||
"fonchain-fiee/pkg/common/m"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/utils/secret"
|
||||
)
|
||||
|
||||
func AuthorizationVerify(sourceData []byte) (userInfo *accountFiee.ChatUserData, ok bool, err error) {
|
||||
fmt.Println("AuthorizationVerify ----------------1")
|
||||
var msg AuthorizationInfo
|
||||
err = json.Unmarshal(sourceData, &msg)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
fmt.Println("AuthorizationVerify ----------------2")
|
||||
if msg.Type != AuthorizationType {
|
||||
return
|
||||
}
|
||||
fmt.Println("AuthorizationVerify ----------------3")
|
||||
if msg.Content.Auth == "" {
|
||||
return
|
||||
}
|
||||
fmt.Println("AuthorizationVerify ----------------4")
|
||||
var check = true
|
||||
var ctx = context.Background()
|
||||
var accountInfo accountFiee.ChatUserData
|
||||
//fiee token校验
|
||||
switch msg.Content.Domain {
|
||||
case "app":
|
||||
var fieeJwtInfo *jwt.Claims
|
||||
fieeJwtInfo, err = jwt.ParseToken(msg.Content.Auth, m.JWTSecret)
|
||||
if err != nil {
|
||||
check = false
|
||||
fmt.Printf("fiee token parse err:%v\n", err)
|
||||
} else {
|
||||
fmt.Printf("fieeJwtInfo :%#v\n", fieeJwtInfo)
|
||||
accountInfo.Origin = config.AppConfig.System.Domain
|
||||
//accountInfo.OriginId = int64(fieeJwtInfo.ID)
|
||||
accountInfo.Account = fieeJwtInfo.Account
|
||||
accountInfo.NickName = fieeJwtInfo.NickName
|
||||
infoReq := &accountFiee.UserByTelRequest{
|
||||
Tel: fieeJwtInfo.Phone,
|
||||
Domain: config.AppConfig.System.Domain,
|
||||
}
|
||||
var accInfo *accountFiee.UserInfoResponse
|
||||
accInfo, err = service.AccountFieeProvider.UserByTel(ctx, infoReq)
|
||||
if err != nil {
|
||||
check = false
|
||||
fmt.Printf("err:%#v\n", err)
|
||||
} else if accInfo != nil {
|
||||
fmt.Printf("fiee accInfo :%#v\n", accInfo)
|
||||
accountInfo.OriginId = int64(accInfo.Id)
|
||||
accountInfo.Account = accInfo.TelNum
|
||||
accountInfo.Avatar = accInfo.GroupPhoto
|
||||
if accInfo.Name != "" {
|
||||
accountInfo.NickName = accInfo.Name
|
||||
}
|
||||
}
|
||||
}
|
||||
case "fontree":
|
||||
msg.Content.Auth, err = secret.GetJwtFromStr(msg.Content.Auth)
|
||||
if err != nil {
|
||||
fmt.Println("token解析失败:", err.Error())
|
||||
check = false
|
||||
} else {
|
||||
var fontreeJwtInfo *account.DecryptJwtResponse
|
||||
fontreeJwtInfo, err = service.AccountProvider.DecryptJwt(ctx, &account.DecryptJwtRequest{Token: msg.Content.Auth, Domain: e.ErpDomain})
|
||||
if err != nil || fontreeJwtInfo.IsOffline {
|
||||
check = false
|
||||
} else {
|
||||
check = true
|
||||
fmt.Printf("fontreeJwtInfo is %#v\n", fontreeJwtInfo)
|
||||
accountInfo.Origin = e.ErpDomain
|
||||
accountInfo.OriginId = int64(fontreeJwtInfo.ID)
|
||||
accountInfo.Account = fontreeJwtInfo.Account
|
||||
accountInfo.NickName = fontreeJwtInfo.NickName
|
||||
}
|
||||
}
|
||||
}
|
||||
if !check {
|
||||
return
|
||||
}
|
||||
|
||||
//查询是否已经注册
|
||||
var chatUserQuery *accountFiee.GetChatUserListResp
|
||||
chatUserQuery, err = service.AccountFieeProvider.GetChatUserList(ctx, &accountFiee.GetChatUserListRequest{
|
||||
Query: &accountFiee.ChatUserData{OriginId: accountInfo.OriginId, Origin: msg.Content.Domain},
|
||||
Page: 1,
|
||||
PageSize: 1,
|
||||
})
|
||||
//如果找不到聊天用户则创建
|
||||
if err != nil || chatUserQuery.Total == 0 {
|
||||
//注册客服
|
||||
var createUserRes *accountFiee.CreateChatUserResp
|
||||
var createChatUserReq = &accountFiee.ChatUserData{
|
||||
NickName: accountInfo.NickName,
|
||||
Account: accountInfo.Account,
|
||||
Role: 1,
|
||||
Origin: msg.Content.Domain,
|
||||
OriginId: accountInfo.OriginId,
|
||||
}
|
||||
if msg.Content.Domain == e.ErpDomain {
|
||||
createChatUserReq.Role = 2
|
||||
}
|
||||
createUserRes, err = service.AccountFieeProvider.CreateChatUser(ctx, createChatUserReq)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
userInfo = createUserRes.GetData()
|
||||
fmt.Printf("注册聊天用户:%#v\n", userInfo)
|
||||
} else {
|
||||
userInfo = chatUserQuery.List[0]
|
||||
if msg.Content.Domain == config.AppConfig.System.Domain && (accountInfo.NickName != userInfo.NickName || accountInfo.Account != userInfo.Account || accountInfo.Avatar != userInfo.Avatar) {
|
||||
_, _ = service.AccountFieeProvider.UpdateChatUser(ctx, &accountFiee.ChatUserData{
|
||||
NickName: accountInfo.NickName,
|
||||
ID: userInfo.ID,
|
||||
Account: accountInfo.Account,
|
||||
Avatar: accountInfo.Avatar,
|
||||
})
|
||||
userInfo.NickName = accountInfo.NickName
|
||||
userInfo.Account = accountInfo.Account
|
||||
userInfo.Avatar = accountInfo.Avatar
|
||||
}
|
||||
fmt.Printf("获取聊天用户:%#v\n", userInfo)
|
||||
}
|
||||
ok = true
|
||||
return
|
||||
}
|
||||
func HandleMessage(sourceData []byte, cli *Client) {
|
||||
var msg WsInfo
|
||||
err := json.Unmarshal(sourceData, &msg)
|
||||
if err != nil {
|
||||
cli.Send <- WsErrorInvalidDataFormat(msg.From)
|
||||
return
|
||||
}
|
||||
switch msg.Type {
|
||||
default:
|
||||
cli.Send <- WsErrorUnknownMessageType(msg.From)
|
||||
//fmt.Printf("不支持的ws业务消息:%#v\n", msg)
|
||||
case TestType:
|
||||
var newMsg = WsInfo{
|
||||
Type: TestType,
|
||||
Content: msg.Content,
|
||||
From: "0",
|
||||
To: msg.From,
|
||||
}
|
||||
byteMsg, _ := json.Marshal(newMsg)
|
||||
cli.Send <- byteMsg
|
||||
case ChatType:
|
||||
if msg.From == "" {
|
||||
//客户端id不能为空
|
||||
cli.Send <- WsErrorMessage(ChatType, "null", e.ErrInvalidClientId, nil)
|
||||
return
|
||||
}
|
||||
var chatInfo ChatInfo
|
||||
_ = json.Unmarshal(sourceData, &chatInfo)
|
||||
//解析Content
|
||||
if clients, ok := cli.Room.clients[chatInfo.Content.TargetUserId]; ok {
|
||||
for _, targetObj := range clients {
|
||||
if targetObj != nil {
|
||||
targetObj.Send <- WsChatMessage(msg.From, chatInfo.Content.TargetClientId, chatInfo.Content.Msg)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//对方不在线
|
||||
cli.Send <- WsErrorMessage(ChatType, msg.From, e.ErrTargetOutLine, nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type ChatInfo struct {
|
||||
Type WsType `json:"type"` //消息类型
|
||||
Content ChatContent `json:"content"` //消息内容
|
||||
From string `json:"from"` //发送者 0为服务端,客户端填写clientId
|
||||
To string `json:"to"` //接收者 接收消息的用户id
|
||||
}
|
||||
type ChatContent struct {
|
||||
TargetUuid string `json:"targetUuid"`
|
||||
TargetUserId int64 `json:"targetUserId"`
|
||||
TargetClientId string `json:"targetClientId"`
|
||||
Msg string `json:"msg"`
|
||||
}
|
127
pkg/common/ws/wsRoom.html
Normal file
127
pkg/common/ws/wsRoom.html
Normal file
@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Chat Example</title>
|
||||
<script type="text/javascript">
|
||||
window.onload = function () {
|
||||
var conn;
|
||||
var msg = document.getElementById("msg");
|
||||
var log = document.getElementById("log");
|
||||
|
||||
function appendLog(item) {
|
||||
var doScroll = log.scrollTop > log.scrollHeight - log.clientHeight - 1;
|
||||
log.appendChild(item);
|
||||
if (doScroll) {
|
||||
log.scrollTop = log.scrollHeight - log.clientHeight;
|
||||
}
|
||||
}
|
||||
//时间格式化
|
||||
Date.prototype.Format = function (fmt) { // author: meizz
|
||||
var o = {
|
||||
"M+": this.getMonth() + 1, // 月份
|
||||
"d+": this.getDate(), // 日
|
||||
"h+": this.getHours(), // 小时
|
||||
"m+": this.getMinutes(), // 分
|
||||
"s+": this.getSeconds(), // 秒
|
||||
"q+": Math.floor((this.getMonth() + 3) / 3), // 季度
|
||||
"S": this.getMilliseconds() // 毫秒
|
||||
};
|
||||
if (/(y+)/.test(fmt))
|
||||
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
for (var k in o)
|
||||
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||
return fmt;
|
||||
}
|
||||
|
||||
document.getElementById("form").onsubmit = function () {
|
||||
if (!conn) {
|
||||
return false;
|
||||
}
|
||||
if (!msg.value) {
|
||||
return false;
|
||||
}
|
||||
conn.send(msg.value);
|
||||
|
||||
|
||||
var item = document.createElement("div");
|
||||
var now = new Date().Format("yyyy-MM-dd hh:mm:ss:S")
|
||||
item.innerText = "客户端发送消息:\t"+now+"\n\t\t"+msg.value+"\n\n";
|
||||
appendLog(item);
|
||||
|
||||
|
||||
msg.value = "";
|
||||
return false;
|
||||
};
|
||||
|
||||
if (window["WebSocket"]) {
|
||||
conn = new WebSocket("ws://" + document.location.host + "/ws");
|
||||
conn.onclose = function (evt) {
|
||||
var item = document.createElement("div");
|
||||
item.innerHTML = "<b>Connection closed.</b>";
|
||||
appendLog(item);
|
||||
};
|
||||
conn.onmessage = function (evt) {
|
||||
var messages = evt.data.split('\n');
|
||||
var now = new Date().Format("yyyy-MM-dd hh:mm:ss:S")
|
||||
for (var i = 0; i < messages.length; i++) {
|
||||
var item = document.createElement("div");
|
||||
item.innerText = "服务端回复消息:\t"+now+"\n\t\t"+messages[i]+"\n\n";
|
||||
appendLog(item);
|
||||
}
|
||||
};
|
||||
} else {
|
||||
var item = document.createElement("div");
|
||||
item.innerHTML = "<b>Your browser does not support WebSockets.</b>";
|
||||
appendLog(item);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style type="text/css">
|
||||
html {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: gray;
|
||||
}
|
||||
|
||||
#log {
|
||||
background: white;
|
||||
margin: 0;
|
||||
padding: 0.5em 0.5em 0.5em 0.5em;
|
||||
position: absolute;
|
||||
top: 0.5em;
|
||||
left: 0.5em;
|
||||
right: 0.5em;
|
||||
bottom: 3em;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#form {
|
||||
padding: 0 0.5em 0 0.5em;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
bottom: 1em;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
input{
|
||||
height: 50px;
|
||||
font-size: larger;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<form id="form">
|
||||
<input type="submit" value="Send" />
|
||||
<input type="text" id="msg" size="64" autofocus />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -23,7 +23,6 @@ var (
|
||||
DriverUrl string
|
||||
AppointUrl string
|
||||
MaterialHost string
|
||||
//TODO
|
||||
//BosAk string
|
||||
//BosSk string
|
||||
//BosBucketName string
|
||||
@ -31,7 +30,6 @@ var (
|
||||
//BosUrl string
|
||||
//BosHttp string
|
||||
//BosDomain string
|
||||
//TODO
|
||||
ProjectMapDir string
|
||||
JaegerHost string
|
||||
JaegerOpen bool
|
||||
|
63
pkg/e/chatCode.go
Normal file
63
pkg/e/chatCode.go
Normal file
@ -0,0 +1,63 @@
|
||||
// Package e -----------------------------
|
||||
// @file : chatCode.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/12 16:57
|
||||
// -------------------------------------------
|
||||
package e
|
||||
|
||||
import "fmt"
|
||||
|
||||
type ErrorCodeType int
|
||||
|
||||
func (e ErrorCodeType) String() string {
|
||||
return GetCodeMsg(e)
|
||||
}
|
||||
|
||||
func (e ErrorCodeType) Error() string {
|
||||
return GetCodeMsg(e)
|
||||
}
|
||||
func (e ErrorCodeType) Int() int {
|
||||
return int(e)
|
||||
}
|
||||
func GetCodeMsg(e ErrorCodeType) string {
|
||||
v, ok := msgFlags[e]
|
||||
if !ok {
|
||||
return fmt.Sprintf("未知错误:[%d]", e)
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
var msgFlags = map[ErrorCodeType]string{
|
||||
SUCCESS: "操作成功",
|
||||
UpdatePasswordSuccess: "修改密码成功",
|
||||
NotExistInentifier: "该第三方账号未绑定",
|
||||
ERROR: "fail",
|
||||
InvalidParams: "请求参数错误",
|
||||
BindError: "参数绑定错误,类型不一致",
|
||||
JsonUnmarshal: "Json解析错误",
|
||||
|
||||
ErrorDatabase: "数据库操作出错,请重试",
|
||||
|
||||
ErrorOss: "OSS配置错误",
|
||||
|
||||
InvalidToken: "Token验证失败",
|
||||
|
||||
ErrorUploadFile: "上传失败",
|
||||
ErrorUploadVideoCover: "视频截取封面错误",
|
||||
ErrorUploadValidParam: "上传参数非法",
|
||||
ErrorFileReadErr: "读取文件错误",
|
||||
ErrorFileNotExists: "文件不存在",
|
||||
ErrorChunkNotGt: "分块数量不一致",
|
||||
ErrorChunk: "读取分块错误",
|
||||
ErrorUploadBos: "上传bos错误",
|
||||
ErrorFileCreate: "文件创建错误",
|
||||
ErrInvalidDataFormat: "无效的数据格式",
|
||||
ErrInvalidClientId: "无效的客户端ID",
|
||||
ErrRegisterFailed: "注册失败",
|
||||
ErrUnRegistered: "未注册客户端",
|
||||
PermissionDenied: "拒绝访问",
|
||||
ErrChatSendErr: "消息发送失败",
|
||||
NotLogin: "请先登录",
|
||||
ErrorNotExistUser: "用户不存在",
|
||||
}
|
@ -13,6 +13,7 @@ const (
|
||||
|
||||
const (
|
||||
DomainAdmin = "blockchain"
|
||||
ErpDomain = "fontree"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -20,8 +21,9 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
ErrNotLogin = "请先登录"
|
||||
ErrOffline = "您已经下线"
|
||||
ErrNotLogin = "请先登录"
|
||||
ErrOffline = "您已经下线"
|
||||
InvalidStatus = "状态非法"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -38,7 +40,7 @@ const (
|
||||
NotExistInentifier = 202
|
||||
ERROR = 500
|
||||
InvalidParams = 400
|
||||
|
||||
NotLoginSqueeze = 409
|
||||
//成员错误
|
||||
ErrorExistNick = 10001
|
||||
ErrorExistUser = 10002
|
||||
@ -139,6 +141,15 @@ const (
|
||||
ERROR_Text_Irregularity = 90018
|
||||
ERROR_Text_Length = 90019
|
||||
ERROR_NoPermission = 90020
|
||||
|
||||
//聊天室
|
||||
ErrInvalidDataFormat = 80100 //无效的数据格式
|
||||
ErrInvalidClientId = 80101 //无效的客户端id
|
||||
ErrRegisterFailed = 80102 //注册失败
|
||||
ErrUnRegistered = 80103 //未注册
|
||||
PermissionDenied = 80104 //拒绝访问
|
||||
ErrChatSendErr = 80105 //聊天记录发送失败
|
||||
ErrTargetOutLine = 80106 //目标离线
|
||||
)
|
||||
const (
|
||||
Push = 1
|
||||
@ -146,3 +157,14 @@ const (
|
||||
NotFilled = 3
|
||||
Save = 4
|
||||
)
|
||||
|
||||
var OfflineMap = map[string]string{
|
||||
"ErrOfflineZhCN": "您已经下线",
|
||||
"ErrOfflineEN": "You have been offline",
|
||||
"ErrOfflineZhTW": "您已經下線",
|
||||
}
|
||||
var LoginMap = map[string]string{
|
||||
"ErrNotLoginZhCN": "请先登录",
|
||||
"ErrNotLoginEN": "Please login first",
|
||||
"ErrNotLoginZhTW": "請先登錄",
|
||||
}
|
||||
|
56
pkg/e/fileType.go
Normal file
56
pkg/e/fileType.go
Normal file
@ -0,0 +1,56 @@
|
||||
package e
|
||||
|
||||
import "strings"
|
||||
|
||||
type FileType int
|
||||
|
||||
// 定义文件类型值
|
||||
const (
|
||||
Video FileType = 1
|
||||
Audio FileType = 2
|
||||
Image FileType = 3
|
||||
File FileType = 4
|
||||
Other FileType = 5
|
||||
)
|
||||
|
||||
// 根据扩展名映射到文件类型值
|
||||
var extensionToType = map[string]FileType{
|
||||
// 视频文件
|
||||
".3g2": Video, ".3gp": Video, ".asf": Video, ".avi": Video, ".divx": Video, ".drc": Video,
|
||||
".flv": Video, ".h261": Video, ".h264": Video, ".mkv": Video, ".mov": Video, ".mp4": Video, ".mpg": Video,
|
||||
".mpeg": Video, ".mpv": Video, ".mxf": Video, ".nuv": Video, ".qt": Video, ".rm": Video,
|
||||
".rmvb": Video, ".srt": Video, ".swf": Video, ".vob": Video, ".vp6": Video, ".vp8": Video, ".webm": Video,
|
||||
".wmv": Video, ".xesc": Video,
|
||||
|
||||
// 音频文件
|
||||
".aac": Audio, ".aax": Audio, ".ac3": Audio, ".act": Audio, ".au": Audio, ".flac": Audio,
|
||||
".m4a": Audio, ".m4p": Audio, ".m4r": Audio, ".mid": Audio, ".midi": Audio, ".mp2": Audio,
|
||||
".mp3": Audio, ".mpa": Audio, ".mpc": Audio, ".ogg": Audio, ".wav": Audio, ".wma": Audio, ".wv": Audio,
|
||||
|
||||
// 图像文件
|
||||
".bmp": Image, ".gif": Image, ".ico": Image, ".jpeg": Image, ".jpg": Image, ".jpe": Image,
|
||||
".png": Image, ".psd": Image, ".tiff": Image, ".webp": Image,
|
||||
|
||||
// 普通文件
|
||||
".a": File, ".abw": File, ".azw": File, ".bin": File, ".bz2": File, ".c": File, ".cab": File,
|
||||
".class": File, ".conf": File, ".crt": File, ".css": File, ".csv": File, ".dat": File, ".deb": File,
|
||||
".dll": File, ".dms": File, ".doc": File, ".docx": File, ".eot": File, ".eps": File, ".exe": File,
|
||||
".gz": File, ".h": File, ".htm": File, ".html": File, ".iso": File, ".jar": File,
|
||||
".js": File, ".json": File, ".log": File, ".m3u": File, ".m3u8": File, ".md": File, ".msi": File,
|
||||
".otf": File, ".pcap": File, ".pdf": File, ".ppt": File, ".pptx": File, ".rar": File, ".rpm": File,
|
||||
".rss": File, ".run": File, ".sh": File, ".sql": File, ".svg": File, ".tar": File, ".tgz": File,
|
||||
".ttf": File, ".txt": File, ".vsd": File, ".weba": File,
|
||||
".wps": File, ".xml": File, ".xpi": File, ".zip": File, ".z": File,
|
||||
|
||||
// 未知文件扩展名
|
||||
"": Other,
|
||||
}
|
||||
|
||||
// DetectFileTypeByExtension 通过文件扩展名判断文件类型并返回对应的值
|
||||
func DetectFileTypeByExtension(extension string) FileType {
|
||||
extension = strings.ToLower(extension)
|
||||
if fileType, exists := extensionToType[extension]; exists {
|
||||
return fileType
|
||||
}
|
||||
return Other
|
||||
}
|
@ -4,6 +4,8 @@ const (
|
||||
SERVER_CONFIG = "conf.ini"
|
||||
SERVER_DUBBOGO_CONFIG = "dubbogo.yaml"
|
||||
MODE_ENV = "MODE_ENV"
|
||||
LoginFromPC = "pc"
|
||||
OfflineSqueeze = "squeeze"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -144,10 +146,13 @@ var MsgFlags = map[int]string{
|
||||
ERROR_Text_Irregularity: "文字内容不合规",
|
||||
ERROR_Text_Length: "文本长度超出限制",
|
||||
ERROR_NoPermission: "您暂无权限,请联系客服",
|
||||
|
||||
ErrInvalidClientId: "无效的客户端ID",
|
||||
}
|
||||
|
||||
const (
|
||||
ErrorCreateFeedback = "请勿重复提交"
|
||||
ErrorCreateFeedback = "请勿重复提交"
|
||||
ErrorBalanceInsufficient = "余额不足"
|
||||
)
|
||||
|
||||
// GetMsg 获取状态码对应信息
|
||||
|
1093
pkg/e/oa_msg.go
Normal file
1093
pkg/e/oa_msg.go
Normal file
File diff suppressed because it is too large
Load Diff
54
pkg/logger/zap_logger.go
Normal file
54
pkg/logger/zap_logger.go
Normal file
@ -0,0 +1,54 @@
|
||||
package logger
|
||||
|
||||
import (
|
||||
"fonchain-fiee/cmd/config"
|
||||
"github.com/natefinch/lumberjack"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
"os"
|
||||
)
|
||||
|
||||
func LogInit(appConfig *config.Config) *zap.Logger {
|
||||
var err error
|
||||
writeSyncer := getLogWriter(appConfig.ZapLog.Filename, appConfig.ZapLog.MaxSize, appConfig.ZapLog.MaxBackups, appConfig.ZapLog.MaxAge)
|
||||
encoder := getEncoder()
|
||||
var l = new(zapcore.Level)
|
||||
err = l.UnmarshalText([]byte(appConfig.ZapLog.Level))
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
var core zapcore.Core
|
||||
//if appConfig.System.Mode == "dev" {
|
||||
// 进入开发模式,日志输出到终端
|
||||
consoleEncoder := zapcore.NewConsoleEncoder(zap.NewDevelopmentEncoderConfig())
|
||||
core = zapcore.NewTee(
|
||||
zapcore.NewCore(encoder, writeSyncer, l),
|
||||
zapcore.NewCore(consoleEncoder, zapcore.Lock(os.Stdout), zapcore.DebugLevel),
|
||||
)
|
||||
//} else {
|
||||
// core = zapcore.NewCore(encoder, writeSyncer, l)
|
||||
//}
|
||||
lg := zap.New(core, zap.AddCaller())
|
||||
zap.ReplaceGlobals(lg)
|
||||
return lg
|
||||
}
|
||||
|
||||
func getEncoder() zapcore.Encoder {
|
||||
encoderConfig := zap.NewProductionEncoderConfig()
|
||||
encoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
|
||||
encoderConfig.TimeKey = "time"
|
||||
encoderConfig.EncodeLevel = zapcore.CapitalLevelEncoder
|
||||
encoderConfig.EncodeDuration = zapcore.SecondsDurationEncoder
|
||||
encoderConfig.EncodeCaller = zapcore.ShortCallerEncoder
|
||||
return zapcore.NewJSONEncoder(encoderConfig)
|
||||
}
|
||||
|
||||
func getLogWriter(filename string, maxSize, maxBackup, maxAge int) zapcore.WriteSyncer {
|
||||
lumberJackLogger := &lumberjack.Logger{
|
||||
Filename: filename,
|
||||
MaxSize: maxSize,
|
||||
MaxBackups: maxBackup,
|
||||
MaxAge: maxAge,
|
||||
}
|
||||
return zapcore.AddSync(lumberJackLogger)
|
||||
}
|
132
pkg/logic/language.go
Normal file
132
pkg/logic/language.go
Normal file
@ -0,0 +1,132 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/e"
|
||||
"github.com/gin-gonic/gin"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func GetLanguage(c *gin.Context) string {
|
||||
lang := c.Request.Header.Get("Accept-Language")
|
||||
lang = strings.Split(lang, ",")[0]
|
||||
if lang == "zh-CN" || lang == "zh" || lang == "ZhCN" {
|
||||
lang = "ZhCN"
|
||||
} else if lang == "zh-TW" || lang == "ZhTW" {
|
||||
lang = "ZhTW"
|
||||
} else if lang == "en" || lang == "EN" {
|
||||
lang = "EN"
|
||||
}
|
||||
return lang
|
||||
}
|
||||
|
||||
func ConvertOfflineMsg(c *gin.Context, key string) string {
|
||||
language := GetLanguage(c)
|
||||
switch language {
|
||||
case "EN":
|
||||
return e.OfflineMap[strings.Join([]string{key, "EN"}, "")]
|
||||
case "ZhCN":
|
||||
return e.OfflineMap[strings.Join([]string{key, "ZhCN"}, "")]
|
||||
case "ZhTW":
|
||||
return e.OfflineMap[strings.Join([]string{key, "ZhTW"}, "")]
|
||||
default:
|
||||
return key
|
||||
}
|
||||
}
|
||||
|
||||
func ConvertLoginMsg(c *gin.Context, key string) string {
|
||||
language := GetLanguage(c)
|
||||
switch language {
|
||||
case "EN":
|
||||
return e.LoginMap[strings.Join([]string{key, "EN"}, "")]
|
||||
case "ZhCN":
|
||||
return e.LoginMap[strings.Join([]string{key, "ZhCN"}, "")]
|
||||
case "ZhTW":
|
||||
return e.LoginMap[strings.Join([]string{key, "ZhTW"}, "")]
|
||||
default:
|
||||
return key
|
||||
}
|
||||
}
|
||||
|
||||
func ConvertWeek(language string, week int32) string {
|
||||
switch language {
|
||||
case "EN":
|
||||
switch week {
|
||||
case 1:
|
||||
return "Monday"
|
||||
case 2:
|
||||
return "Tuesday"
|
||||
case 3:
|
||||
return "Wednesday"
|
||||
case 4:
|
||||
return "Thursday"
|
||||
case 5:
|
||||
return "Friday"
|
||||
case 6:
|
||||
return "Saturday"
|
||||
case 7:
|
||||
return "Sunday"
|
||||
}
|
||||
case "ZhCN":
|
||||
switch week {
|
||||
case 1:
|
||||
return "星期一"
|
||||
case 2:
|
||||
return "星期二"
|
||||
case 3:
|
||||
return "星期三"
|
||||
case 4:
|
||||
return "星期四"
|
||||
case 5:
|
||||
return "星期五"
|
||||
case 6:
|
||||
return "星期六"
|
||||
case 7:
|
||||
return "星期日"
|
||||
}
|
||||
case "ZhTW":
|
||||
switch week {
|
||||
case 1:
|
||||
return "星期一"
|
||||
case 2:
|
||||
return "星期二"
|
||||
case 3:
|
||||
return "星期三"
|
||||
case 4:
|
||||
return "星期四"
|
||||
case 5:
|
||||
return "星期五"
|
||||
case 6:
|
||||
return "星期六"
|
||||
case 7:
|
||||
return "星期日"
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func ConvertAmPm(language string, amPm string) string {
|
||||
switch language {
|
||||
case "EN":
|
||||
switch amPm {
|
||||
case "上午":
|
||||
return "AM"
|
||||
case "下午":
|
||||
return "PM"
|
||||
}
|
||||
}
|
||||
return amPm
|
||||
}
|
||||
|
||||
func ConvertOaMsg(c *gin.Context, key string) string {
|
||||
language := GetLanguage(c)
|
||||
switch language {
|
||||
case "EN":
|
||||
return e.GetMsgEN(strings.Join([]string{key, "EN"}, ""))
|
||||
case "ZhCN":
|
||||
return e.GetMsgZhCN(strings.Join([]string{key, "ZhCN"}, ""))
|
||||
case "ZhTW":
|
||||
return e.GetMsgZhTW(strings.Join([]string{key, "ZhTW"}, ""))
|
||||
default:
|
||||
return key
|
||||
}
|
||||
}
|
@ -3,17 +3,24 @@ package middleware
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
api "fonchain-fiee/api/account"
|
||||
"fonchain-fiee/api/account"
|
||||
api "fonchain-fiee/api/accountFiee"
|
||||
jwt2 "fonchain-fiee/pkg/common/jwt"
|
||||
"fonchain-fiee/pkg/common/m"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/logic"
|
||||
"fonchain-fiee/pkg/model"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/utils/secret"
|
||||
"time"
|
||||
|
||||
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// CheckLogin 检测登陆
|
||||
func CheckLogin(provider *api.AccountClientImpl) gin.HandlerFunc {
|
||||
func CheckLogin(provider *api.AccountFieeClientImpl) gin.HandlerFunc {
|
||||
|
||||
return func(ctx *gin.Context) {
|
||||
|
||||
@ -38,7 +45,7 @@ func CheckLogin(provider *api.AccountClientImpl) gin.HandlerFunc {
|
||||
Domain: jwt.Domain,
|
||||
}
|
||||
|
||||
infoRes, err := service.AccountProvider.UserByTel(ctx, infoReq)
|
||||
infoRes, err := service.AccountFieeProvider.UserByTel(ctx, infoReq)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
@ -69,3 +76,112 @@ func CheckLogin(provider *api.AccountClientImpl) gin.HandlerFunc {
|
||||
ctx.Next()
|
||||
}
|
||||
}
|
||||
func CheckWebLogin(provider *account.AccountClientImpl) gin.HandlerFunc {
|
||||
|
||||
return func(ctx *gin.Context) {
|
||||
startTime := time.Now()
|
||||
//如果没有登录
|
||||
authorization := ctx.GetHeader(e.Authorization)
|
||||
if authorization == "" {
|
||||
authorization = ctx.Query("token")
|
||||
}
|
||||
if authorization == "" {
|
||||
service.NotLoginRes(ctx, logic.ConvertLoginMsg(ctx, e.ErrNotLogin))
|
||||
return
|
||||
}
|
||||
|
||||
jwt, err := secret.GetJwtFromStr(authorization)
|
||||
|
||||
logger.Info("---------end帐号转jwt:时间:", time.Now().Sub(startTime))
|
||||
if err != nil {
|
||||
service.NotLoginRes(ctx, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
//0 解密
|
||||
req := account.DecryptJwtRequest{
|
||||
Token: jwt,
|
||||
Domain: "fontree",
|
||||
}
|
||||
|
||||
info, err := service.AccountProvider.DecryptJwt(ctx, &req)
|
||||
logger.Info("---------end帐号微服务解密:时间:", time.Now().Sub(startTime))
|
||||
|
||||
if err != nil {
|
||||
service.NotLoginRes(ctx, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
//if info.OfflineCode == e.OfflineSqueeze {
|
||||
// service.Error(ctx, e.NotLoginSqueeze, errors.New(e.ErrOfflineSqueeze))
|
||||
// return
|
||||
//}
|
||||
|
||||
if info.IsOffline == true {
|
||||
service.ErrorWeb(ctx, e.NotLogin, errors.New(logic.ConvertOfflineMsg(ctx, e.ErrOffline)))
|
||||
return
|
||||
}
|
||||
|
||||
//1 获取用户的账号信息
|
||||
infoReq := &account.InfoRequest{
|
||||
ID: info.ID,
|
||||
Scene: "base",
|
||||
Domain: "fontree",
|
||||
}
|
||||
|
||||
infoRes, err := service.AccountProvider.Info(ctx, infoReq)
|
||||
|
||||
logger.Info("---------end帐号info时间:", time.Now().Sub(startTime))
|
||||
|
||||
if err != nil {
|
||||
service.ErrorWeb(ctx, e.Error, err)
|
||||
return
|
||||
}
|
||||
|
||||
//3 获取用户的岗位信息
|
||||
//uReq := rule.RulesRequest{
|
||||
// AccountID: info.ID,
|
||||
//}
|
||||
//
|
||||
//qres, err1 := service.RuleProvider.UserInfo(ctx, &uReq)
|
||||
//
|
||||
//logger.Info("---------end帐号,rule的userInfo:时间:", time.Now().Sub(startTime))
|
||||
//if err1 != nil {
|
||||
// service.Error(ctx, e.Error, err)
|
||||
// return
|
||||
//}
|
||||
|
||||
loginInfo := login.Info{
|
||||
Domain: info.Domain,
|
||||
ID: info.ID,
|
||||
Name: info.NickName,
|
||||
//Account: info.Account,
|
||||
//NickName: info.NickName,
|
||||
//PositionUsers: qres.PositionUsers,
|
||||
//Extend: infoRes.Info.Extend,
|
||||
TelNum: infoRes.Info.TelNum,
|
||||
//Avatar: infoRes.Info.Avatar,
|
||||
//JumpTo: "",
|
||||
//DepartmentName: "",
|
||||
}
|
||||
|
||||
//if infoRes.Info.Extend != nil {
|
||||
// loginInfo.JumpTo = infoRes.Info.Extend.JumpTo
|
||||
//}
|
||||
//
|
||||
//if len(qres.PositionUsers) >= 1 {
|
||||
// loginInfo.DepartmentName = qres.PositionUsers[0].DepartmentName
|
||||
//}
|
||||
|
||||
ctx.Set("jwtInfo", loginInfo)
|
||||
var mLoginInfo model.LoginInfo
|
||||
mLoginInfo.ID = loginInfo.ID
|
||||
mLoginInfo.NickName = loginInfo.Name
|
||||
mLoginInfo.Phone = loginInfo.TelNum
|
||||
//mLoginInfo.PositionUsers = qres.PositionUsers
|
||||
ctx.Set("mLoginInfo", mLoginInfo)
|
||||
logger.Info("---------check_login:总时间", time.Now().Sub(startTime))
|
||||
ctx.Next()
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -29,12 +29,12 @@ func Cors() gin.HandlerFunc {
|
||||
c.Header("Access-Control-Allow-Origin", "*") // 这是允许访问所有域
|
||||
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE,UPDATE") //服务器支持的所有跨域请求的方法,为了避免浏览次请求的多次'预检'请求
|
||||
// header的类型
|
||||
c.Header("Access-Control-Allow-Headers", "Authorization, Content-Length, X-CSRF-Token, Token, tokenC, session,X_Requested_With,Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language,DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Pragma")
|
||||
c.Header("Access-Control-Allow-Headers", "Authorization, Content-Length, X-CSRF-Token, Token, tokenC, session,X_Requested_With,Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language,DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Pragma, Upload-Offset")
|
||||
// 允许跨域设置 可以返回其他子段
|
||||
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers,Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma,FooBar") // 跨域关键设置 让浏览器可以解析
|
||||
c.Header("Access-Control-Max-Age", "172800") // 缓存请求信息 单位为秒
|
||||
c.Header("Access-Control-Allow-Credentials", "false") // 跨域请求是否需要带cookie信息 默认设置为true
|
||||
c.Set("content-type", "application/json")
|
||||
c.Set("content-type", c.ContentType())
|
||||
//c.Header("Access-Control-Allow-Credentials", "true") // 跨域请求是否需要带cookie信息 默认设置为true
|
||||
//c.Header("Access-Control-Request-Private-Network", "true") // 跨域请求是否需要带cookie信息 默认设置为true
|
||||
//c.Header("Access-Control-Allow-Private-Network", "true") // 设置返回格式是json
|
||||
|
@ -2,7 +2,7 @@ package middleware
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
@ -24,11 +24,17 @@ func NewLogger() gin.HandlerFunc {
|
||||
latencyTime := endTime.Sub(startTime) // 请求方式
|
||||
path := c.Request.URL.Path
|
||||
query := c.Request.URL.RawQuery
|
||||
data, _ := ioutil.ReadAll(c.Request.Body)
|
||||
log.Printf("[%s] %s %d %s %s %s %s %s %s", path, c.Request.Method, c.Writer.Status(), query,
|
||||
string(data), c.ClientIP(), c.Request.UserAgent(), c.Errors.ByType(gin.ErrorTypePrivate).String(), latencyTime.String())
|
||||
if _, err := c.FormFile("file"); err != nil {
|
||||
data, _ := io.ReadAll(c.Request.Body)
|
||||
log.Printf("[%s] %s %d %s %s %s %s %s %s", path, c.Request.Method, c.Writer.Status(), query,
|
||||
string(data), c.ClientIP(), c.Request.UserAgent(), c.Errors.ByType(gin.ErrorTypePrivate).String(), latencyTime.String())
|
||||
|
||||
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(data))
|
||||
c.Request.Body = io.NopCloser(bytes.NewBuffer(data))
|
||||
}
|
||||
val := c.GetHeader("Accept-Language")
|
||||
if val == "" {
|
||||
c.Request.Header.Set("Accept-Language", "zh-CN")
|
||||
}
|
||||
c.Next()
|
||||
}
|
||||
}
|
||||
|
7
pkg/model/bundle/bundle.go
Normal file
7
pkg/model/bundle/bundle.go
Normal file
@ -0,0 +1,7 @@
|
||||
package bundle
|
||||
|
||||
type UserWorkConfirmReq struct {
|
||||
WorkUuid string `json:"workUuid"`
|
||||
ConfirmRemark string `json:"confirmRemark"`
|
||||
ConfirmStatus int `json:"confirmStatus"` // 1确认 2 驳回
|
||||
}
|
25
pkg/model/cast/approval.go
Normal file
25
pkg/model/cast/approval.go
Normal file
@ -0,0 +1,25 @@
|
||||
package cast
|
||||
|
||||
type ApprovalDetailResponse struct {
|
||||
Status int `json:"status"`
|
||||
Data Data `json:"data"`
|
||||
Msg string `json:"msg"`
|
||||
Code int `json:"code"`
|
||||
Error *string `json:"error"`
|
||||
Err string `json:"err"`
|
||||
Keys []string `json:"keys"`
|
||||
Positions *interface{} `json:"positions"`
|
||||
}
|
||||
|
||||
type Data struct {
|
||||
Count int `json:"Count"`
|
||||
Data []Item `json:"data"`
|
||||
Status int `json:"Status"`
|
||||
}
|
||||
|
||||
type Item struct {
|
||||
ID int `json:"ID"`
|
||||
Domain string `json:"Domain"`
|
||||
Status int `json:"Status"`
|
||||
Reply string `json:"Reply"`
|
||||
}
|
10
pkg/model/cast/media.go
Normal file
10
pkg/model/cast/media.go
Normal file
@ -0,0 +1,10 @@
|
||||
package cast
|
||||
|
||||
type BalanceTypeEnum int32
|
||||
|
||||
// 定义枚举值
|
||||
const (
|
||||
BalanceTypeAccountValue BalanceTypeEnum = 1
|
||||
BalanceTypeImageValue BalanceTypeEnum = 2
|
||||
BalanceTypeVideoValue BalanceTypeEnum = 3
|
||||
)
|
10
pkg/model/cast/oauth.go
Normal file
10
pkg/model/cast/oauth.go
Normal file
@ -0,0 +1,10 @@
|
||||
package cast
|
||||
|
||||
type OAuthPlatformReq struct {
|
||||
MediaAccountUuid string `json:"mediaAccountUuid" form:"mediaAccountUuid" binding:"required"`
|
||||
PlatformID int `json:"platformID" form:"platformID" binding:"required"`
|
||||
}
|
||||
|
||||
type OAuthPlatformResp struct {
|
||||
Url string `json:"url"`
|
||||
}
|
11
pkg/model/cast/work.go
Normal file
11
pkg/model/cast/work.go
Normal file
@ -0,0 +1,11 @@
|
||||
package cast
|
||||
|
||||
const (
|
||||
WorkStatusPending = 1 // 待提交
|
||||
WorkStatusReviewing = 2 // 审核中
|
||||
WorkStatusReviewFailed = 3 // 审核失败
|
||||
WorkStatusArtistConfirming = 4 // 待艺人确认
|
||||
WorkStatusArtistRejected = 5 // 艺人驳回
|
||||
WorkStatusPublishSuccess = 6 // 发布成功
|
||||
WorkStatusPublishFailed = 7 // 发布失败
|
||||
)
|
18
pkg/model/middleware.go
Normal file
18
pkg/model/middleware.go
Normal file
@ -0,0 +1,18 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
api "fonchain-fiee/api/account"
|
||||
//"github.com/fonchain_enterprise/fonchain-main/api/rule"
|
||||
)
|
||||
|
||||
type LoginInfo struct {
|
||||
Domain string
|
||||
ID uint64
|
||||
Account string
|
||||
NickName string
|
||||
JumpTo string
|
||||
DepartmentName string
|
||||
Phone string
|
||||
Extend *api.Extend
|
||||
//PositionUsers []*rule.PositionUser
|
||||
}
|
5
pkg/model/query/cast.go
Normal file
5
pkg/model/query/cast.go
Normal file
@ -0,0 +1,5 @@
|
||||
package query
|
||||
|
||||
type RemindReq struct {
|
||||
WorkUuid string `json:"workUuid"`
|
||||
}
|
18
pkg/router/app/media.go
Normal file
18
pkg/router/app/media.go
Normal file
@ -0,0 +1,18 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/service"
|
||||
serviceCast "fonchain-fiee/pkg/service/app/cast"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func MediaAppRouter(r *gin.RouterGroup) {
|
||||
auth := r.Group("")
|
||||
auth.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
media := auth.Group("app/media")
|
||||
{
|
||||
media.POST("user-accounts", serviceCast.UserAccounts)
|
||||
media.POST("work-list", serviceCast.MediaWorks)
|
||||
}
|
||||
}
|
@ -1,13 +1,19 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func BundleRouter(r *gin.RouterGroup) {
|
||||
bundleRoute := r.Group("bundle")
|
||||
|
||||
bundleRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
bundleAppRoute := r.Group("bundle")
|
||||
bundleAppNoAuthRoute := r.Group("bundle")
|
||||
bundleAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
// 套餐
|
||||
{
|
||||
bundleClientRoute := bundleRoute.Group("system")
|
||||
@ -15,13 +21,49 @@ func BundleRouter(r *gin.RouterGroup) {
|
||||
bundleClientRoute.POST("create", bundle.CreateBundle)
|
||||
bundleClientRoute.POST("update", bundle.UpdateBundle)
|
||||
bundleClientRoute.POST("remove", bundle.DeleteBundle)
|
||||
}
|
||||
bundleClientRoute.POST("bundle-list", bundle.BundleList)
|
||||
bundleClientRoute.POST("add-value/only", bundle.OnlyAddValueListByOrderNo)
|
||||
|
||||
bundleAppRoute := bundleRoute.Group("common")
|
||||
bundleExtend := bundleClientRoute.Group("extend")
|
||||
{
|
||||
bundleExtend.POST("", bundle.BundleExtend)
|
||||
bundleExtend.POST("list", bundle.BundleExtendRecordsList)
|
||||
}
|
||||
bundleBalance := bundleClientRoute.Group("balance")
|
||||
{
|
||||
bundleBalance.POST("list", bundle.GetBundleBalance)
|
||||
bundleBalance.POST("used-record", bundle.GetUsedRecordList)
|
||||
}
|
||||
}
|
||||
bundleClientRouteV2 := bundleRoute.Group("system/v2")
|
||||
{
|
||||
bundleAppRoute.POST("bundle-list", bundle.BundleList)
|
||||
bundleClientRouteV2.POST("save", bundle.SaveBundleV2)
|
||||
bundleClientRouteV2.POST("update/shelfStatus", bundle.HandShelf)
|
||||
bundleClientRouteV2.POST("bundle-list", bundle.BundleListV2)
|
||||
bundleClientRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
||||
}
|
||||
bundleAppRouteV1 := bundleAppRoute.Group("common")
|
||||
{
|
||||
bundleAppRouteV1.POST("bundle-list", bundle.BundleList)
|
||||
bundleAppRoute.POST("bundle-list", bundle.BundleList)
|
||||
|
||||
bundleAppRoute.POST("pending-confirmation-list", bundle.GetToBeComfirmedWorks) // 作品状态变更的待确认记录
|
||||
bundleAppRoute.POST("confirm-cast-log", bundle.CastLogConfirm) // 对变更记录进行确认
|
||||
|
||||
bundleAppRoute.POST("balance", bundle.GetUserBalance)
|
||||
bundleAppRoute.POST("work-detail", bundle.GetWorkDetail)
|
||||
bundleAppRoute.POST("work-confirm", bundle.WorkConfirm)
|
||||
}
|
||||
bundleAppRouteV2 := bundleAppRoute.Group("app/system/v2")
|
||||
{
|
||||
bundleAppRouteV2.POST("add-value/only", bundle.OnlyAddValueListByOrderNo)
|
||||
}
|
||||
bundleAppNoAuthRouteV2 := bundleAppNoAuthRoute.Group("app/system/v2")
|
||||
{
|
||||
bundleAppNoAuthRouteV2.POST("bundle-list", bundle.BundleListH5V2)
|
||||
bundleAppNoAuthRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,26 +12,38 @@ func BundleOrderRouter(r *gin.RouterGroup) {
|
||||
|
||||
r.POST("/stripe-pay/callback", bundle.StripeCheckoutSessionWebhook)
|
||||
r.POST("/antom/callback", bundle.AntomWebhook) // Antom回调
|
||||
|
||||
r.POST("/home-page/roll", bundle.HomePageRoll)
|
||||
bundleOrderRoute := r.Group("bundle-order")
|
||||
bundleOrderRoute.Use(middleware.CheckLogin(service.AccountProvider))
|
||||
bundleOrderRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
bundleOrderWebRoute := r.Group("bundle-order")
|
||||
bundleOrderWebRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
// 套餐
|
||||
{
|
||||
bundleOrderClientRoute := bundleOrderRoute.Group("common")
|
||||
bundleOrderClientWebRoute := bundleOrderWebRoute.Group("common/web")
|
||||
{
|
||||
bundleOrderClientRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||
bundleOrderClientWebRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||
bundleOrderClientWebRoute.POST("bundle-order-list-V2", bundle.OrderRecordsListV2)
|
||||
bundleOrderClientWebRoute.POST("bundle-order-list-download", bundle.OrderRecordsListDownload)
|
||||
bundleOrderClientWebRoute.POST("reconciliation-list", bundle.GetReconciliationList)
|
||||
bundleOrderClientWebRoute.POST("reconciliation-list-download", bundle.GetReconciliationListDownload)
|
||||
}
|
||||
bundleOrderClientAppRoute := bundleOrderRoute.Group("common/app")
|
||||
{
|
||||
bundleOrderClientAppRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||
}
|
||||
|
||||
bundleOrderWebRoute := bundleOrderRoute.Group("web")
|
||||
//bundleOrderWebRoute := bundleOrderRoute.Group("web")
|
||||
{
|
||||
bundleOrderWebRoute.POST("financial-confirm", bundle.UpdateFinancialConfirmationStatus)
|
||||
bundleOrderWebRoute.POST("order-export", bundle.ExportOrderInfo)
|
||||
bundleOrderWebRoute.POST("order-export", bundle.ExportOrderInfoOss)
|
||||
}
|
||||
|
||||
bundleOrderAppRoute := bundleOrderRoute.Group("app")
|
||||
{
|
||||
bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature)
|
||||
bundleOrderAppRoute.POST("order-add-signature", bundle.CreateBundleOrderAddSignature)
|
||||
bundleOrderAppRoute.POST("order-del", bundle.DeleteBundleOrder)
|
||||
bundleOrderAppRoute.POST("update-pay", bundle.UpdateBundleOrderStatusPaid)
|
||||
bundleOrderAppRoute.POST("order-detail", bundle.OrderRecordsDetail)
|
||||
|
||||
|
39
pkg/router/media.go
Normal file
39
pkg/router/media.go
Normal file
@ -0,0 +1,39 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/service"
|
||||
serviceCast "fonchain-fiee/pkg/service/cast"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func MediaRouter(r *gin.RouterGroup) {
|
||||
//noAuth := r.Group("")
|
||||
auth := r.Group("")
|
||||
auth.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
media := auth.Group("media")
|
||||
{
|
||||
media.POST("user-list", serviceCast.MediaUserList)
|
||||
media.POST("unbind-manager", serviceCast.UnbindManager)
|
||||
media.POST("bind-manager", serviceCast.BindManager)
|
||||
media.POST("update-account", serviceCast.UpdateMediaAccount)
|
||||
media.POST("oauth-url", serviceCast.OAuthUrl)
|
||||
}
|
||||
mediaNoLogin := r.Group("media")
|
||||
{
|
||||
mediaNoLogin.GET("oauth2callback", serviceCast.OAuth2Callback)
|
||||
mediaNoLogin.GET("test", serviceCast.Test)
|
||||
}
|
||||
|
||||
work := auth.Group("work")
|
||||
{
|
||||
work.POST("update-work-image", serviceCast.UpdateWorkImage)
|
||||
work.POST("update-work-video", serviceCast.UpdateWorkVideo)
|
||||
work.POST("update-approval", serviceCast.UpdateApproval)
|
||||
work.POST("list", serviceCast.WorkList)
|
||||
work.POST("detail", serviceCast.WorkDetail)
|
||||
work.POST("republish", serviceCast.RePublish)
|
||||
work.POST("delete", serviceCast.DelWork)
|
||||
work.POST("remind", serviceCast.Remind)
|
||||
}
|
||||
}
|
@ -2,10 +2,15 @@ package router
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/router/app"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/account"
|
||||
"fonchain-fiee/pkg/service/asChat"
|
||||
"fonchain-fiee/pkg/service/auth"
|
||||
"fonchain-fiee/pkg/service/file"
|
||||
"fonchain-fiee/pkg/service/governance"
|
||||
"fonchain-fiee/pkg/service/lang"
|
||||
"fonchain-fiee/pkg/service/pressreleases"
|
||||
"fonchain-fiee/pkg/service/qr"
|
||||
"fonchain-fiee/pkg/service/redirect"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
@ -22,14 +27,18 @@ import (
|
||||
func NewRouter() *gin.Engine {
|
||||
//使用默认gin路由
|
||||
r := gin.Default()
|
||||
|
||||
wsGroup := r.Group("api/fiee")
|
||||
wsGroup.Use(
|
||||
middleware.GinRecovery(true),
|
||||
)
|
||||
r.Use(gzip.Gzip(gzip.BestSpeed)) // 中间件占用绝大部分内存
|
||||
//加入日志中间件,跨域中间件
|
||||
r.Use(middleware.NewLogger(), middleware.Cors(), middleware.GinRecovery(true))
|
||||
privateGroup := r.Group("api")
|
||||
privateGroup := r.Group("api/fiee")
|
||||
privateGroup.Use(middleware.NewLogger(), middleware.Cors(), middleware.GinRecovery(true))
|
||||
//加入日志中间件,跨域中间件
|
||||
v1 := r.Group("api")
|
||||
v1 := r.Group("api/fiee")
|
||||
v1.Use(middleware.NewLogger(), middleware.Cors(), middleware.GinRecovery(true))
|
||||
GiteaRoute(v1)
|
||||
|
||||
v1.GET("test", func(c *gin.Context) {
|
||||
@ -41,7 +50,9 @@ func NewRouter() *gin.Engine {
|
||||
BundleRouter(privateGroup)
|
||||
BundleOrderRouter(privateGroup)
|
||||
ValueAddBundleRouter(privateGroup)
|
||||
|
||||
MediaRouter(privateGroup)
|
||||
SecFilingRouter(privateGroup)
|
||||
app.MediaAppRouter(privateGroup)
|
||||
{
|
||||
v1.POST("version", version.Version) //版本号公共
|
||||
}
|
||||
@ -55,20 +66,26 @@ func NewRouter() *gin.Engine {
|
||||
privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
|
||||
privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
|
||||
acRoute := privateGroup.Group("/user")
|
||||
acRoute.Use(middleware.CheckLogin(service.AccountProvider))
|
||||
acRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
{
|
||||
acRoute.POST("real-name", account.RealName) //实名
|
||||
acRoute.POST("info", account.UserInfo) //用户详情
|
||||
acRoute.POST("update", account.UserUpdate) //用户更新
|
||||
}
|
||||
webAcRouter := privateGroup.Group("/user")
|
||||
//webAcRouter.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
webAcRouter.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
{
|
||||
acRoute.POST("list", account.UserList) //用户列表
|
||||
acRoute.POST("approval", account.UserApproval) //实名审核
|
||||
webAcRouter.POST("list", account.UserList) //用户列表
|
||||
webAcRouter.POST("approval", account.UserApproval) //实名审核
|
||||
}
|
||||
}
|
||||
{
|
||||
v1.GET("chart/forward/test", redirect.ForwardTest)
|
||||
}
|
||||
// 上传
|
||||
upData := privateGroup.Group("upload")
|
||||
upData.Use(middleware.CheckLogin(service.AccountProvider))
|
||||
upData.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
{
|
||||
upData.POST("img", upload.UploadImg)
|
||||
}
|
||||
@ -101,9 +118,74 @@ func NewRouter() *gin.Engine {
|
||||
redirectRoute.POST("sdk/down/v2", auth.DownImgV2)
|
||||
redirectRoute.POST("sdk/down/v3", auth.DownImgV3)
|
||||
}
|
||||
//========================================================================================
|
||||
// 客服聊天
|
||||
{
|
||||
// websocket数据接收
|
||||
wsGroup.GET("aschat/ws", asChat.ChatHandlerIns.Connection)
|
||||
v1.POST("aschat/message/new", asChat.ChatHandlerIns.NewMessage)
|
||||
v1.POST("aschat/media/upload", asChat.ChatHandlerIns.Upload)
|
||||
v1.POST("aschat/message/list", asChat.ChatHandlerIns.MessageList)
|
||||
v1.POST("aschat/user/stat", asChat.ChatHandlerIns.UserMessageStat)
|
||||
v1.POST("aschat/voicetotext", asChat.ChatHandlerIns.VoiceToText)
|
||||
v1.POST("aschat/userDetail", asChat.ChatHandlerIns.UserDetail)
|
||||
v1.POST("aschat/autoReplyRuler/create", asChat.Handler.CreateChatAutoReplyRuler)
|
||||
v1.POST("aschat/autoReplyRuler/delete", asChat.Handler.DeleteChatAutoReplyRuler)
|
||||
v1.POST("aschat/autoReplyRuler/update", asChat.Handler.UpdateChatAutoReplyRuler)
|
||||
v1.POST("aschat/autoReplyRuler/detail", asChat.Handler.GetChatAutoReplyRulerDetail)
|
||||
v1.POST("aschat/autoReplyRuler/query", asChat.Handler.GetChatAutoReplyRulerList)
|
||||
|
||||
v1.POST("/test/user/log/erp", asChat.Handler.ErpLoginDemo)
|
||||
v1.POST("/test/user/log/fiee", asChat.Handler.FieeLoginDemo)
|
||||
v1.POST("/aschat/test", asChat.Handler.Test)
|
||||
}
|
||||
|
||||
{
|
||||
// 素材库
|
||||
resourceRoute := v1.Group("/resource").Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
resourceRoute.GET("", file.Info)
|
||||
resourceRoute.DELETE("", file.Delete)
|
||||
resourceRoute.PUT("", file.Action)
|
||||
resourceRoute.POST("", file.Create)
|
||||
resourceRoute.GET("/search", file.Search)
|
||||
resourceRoute.POST("/upload", file.Upload)
|
||||
resourceRoute.POST("/tus/create", file.TusCreate)
|
||||
resourceRoute.POST("/tus/upload", file.TusUpload)
|
||||
v1.Group("/resource").GET("/raw/*path", file.Raw)
|
||||
resourceRoute.GET("/dir/raw", file.DirDownload)
|
||||
resourceRoute.GET("/preview/:size/*path", file.Preview)
|
||||
resourceRoute.GET("/list", file.List)
|
||||
resourceRoute.GET("/usage", file.Usage)
|
||||
}
|
||||
|
||||
{
|
||||
// 官网文档
|
||||
governanceRoute := v1.Group("/governance")
|
||||
governanceRouteLogin := governanceRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
governanceRoute.GET("/display", middleware.Cors(), governance.Display)
|
||||
governanceRouteLogin.POST("/list", governance.List)
|
||||
governanceRouteLogin.POST("", governance.Create)
|
||||
governanceRouteLogin.POST("/edit", governance.Edit)
|
||||
governanceRouteLogin.POST("/delete", governance.Delete)
|
||||
|
||||
}
|
||||
{
|
||||
// 官网新闻
|
||||
pressreleasesRoute := v1.Group("/pressreleases")
|
||||
pressreleasesRouteLogin := pressreleasesRoute.Group("", middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
pressreleasesRoute.POST("/display", middleware.Cors(), pressreleases.Display)
|
||||
pressreleasesRoute.GET("", middleware.Cors(), pressreleases.Get)
|
||||
pressreleasesRouteLogin.POST("/list", pressreleases.List)
|
||||
pressreleasesRouteLogin.POST("", pressreleases.Create)
|
||||
pressreleasesRouteLogin.POST("/edit", pressreleases.Edit)
|
||||
pressreleasesRouteLogin.POST("/delete", pressreleases.Delete)
|
||||
|
||||
}
|
||||
//静态文件
|
||||
r.StaticFS("/static", http.Dir("./runtime"))
|
||||
r.StaticFS("/api/static", http.Dir("./runtime"))
|
||||
r.NoRoute(func(c *gin.Context) {
|
||||
c.JSON(http.StatusNotFound, gin.H{
|
||||
"status": 1,
|
||||
|
35
pkg/router/secfiling.go
Normal file
35
pkg/router/secfiling.go
Normal file
@ -0,0 +1,35 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/secfilings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func SecFilingRouter(r *gin.RouterGroup) {
|
||||
SecFilingRouter := r.Group("sec-filing")
|
||||
SecNoAuthRouter := r.Group("sec-filing")
|
||||
SecFilingRouter.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
// sec-filing
|
||||
secFilingRoute := SecFilingRouter.Group("system")
|
||||
{
|
||||
secFilingRoute.POST("create", secfilings.CreateSecFiling)
|
||||
secFilingRoute.POST("update", secfilings.UpdateSecFiling)
|
||||
secFilingRoute.POST("list", secfilings.ListSecFiling)
|
||||
secFilingRoute.POST("detail", secfilings.DetailSecFiling)
|
||||
secFilingRoute.POST("delete", secfilings.DeleteSecFiling)
|
||||
secFilingRoute.POST("get", secfilings.GetSecFilings)
|
||||
secFilingRoute.POST("update/status", secfilings.UpdateSecFilingStatus)
|
||||
secFilingRoute.POST("form/list", secfilings.GetFormList)
|
||||
|
||||
}
|
||||
secNoAUthRouter := SecNoAuthRouter.Group("web")
|
||||
{
|
||||
secNoAUthRouter.POST("list", secfilings.WebListSecFiling)
|
||||
secNoAUthRouter.POST("detail", secfilings.DetailSecFiling)
|
||||
}
|
||||
|
||||
}
|
@ -10,7 +10,10 @@ import (
|
||||
|
||||
func ValueAddBundleRouter(r *gin.RouterGroup) {
|
||||
valueAddBundleRoute := r.Group("valueAdd-bundle")
|
||||
valueAddBundleRoute.Use(middleware.CheckLogin(service.AccountProvider))
|
||||
valueAddBundleRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
|
||||
valueAddBundleAppRoute := r.Group("valueAdd-bundle/app")
|
||||
valueAddBundleAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
||||
|
||||
// 增值套餐
|
||||
{
|
||||
@ -20,6 +23,23 @@ func ValueAddBundleRouter(r *gin.RouterGroup) {
|
||||
bundleClientRoute.POST("list", bundle.ValueAddBundleList)
|
||||
bundleClientRoute.POST("detail", bundle.ValueAddBundleDetail)
|
||||
}
|
||||
bundleClientRouteV2 := valueAddBundleRoute.Group("system/v2")
|
||||
{
|
||||
bundleClientRouteV2.POST("save", bundle.SaveValueAddService)
|
||||
bundleClientRouteV2.POST("list", bundle.ValueAddServiceList)
|
||||
bundleClientRouteV2.POST("detail", bundle.ValueAddServiceDetail)
|
||||
}
|
||||
|
||||
valueAddBundleAppRouteV1 := valueAddBundleAppRoute.Group("system")
|
||||
{
|
||||
valueAddBundleAppRouteV1.POST("list", bundle.ValueAddBundleList)
|
||||
}
|
||||
valueAddBundleAppRouteV2 := valueAddBundleAppRoute.Group("system/v2")
|
||||
{
|
||||
valueAddBundleAppRouteV2.POST("list", bundle.ValueAddServiceList)
|
||||
valueAddBundleAppRouteV2.POST("detail", bundle.ValueAddServiceDetail)
|
||||
valueAddBundleAppRouteV2.POST("detail/lang", bundle.ValueAddServiceLangDetail)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
27
pkg/serializer/common.go
Normal file
27
pkg/serializer/common.go
Normal file
@ -0,0 +1,27 @@
|
||||
package serializer
|
||||
|
||||
import "fonchain-fiee/pkg/e"
|
||||
|
||||
// Response 基础序列化器
|
||||
type Response struct {
|
||||
Status int `json:"status"`
|
||||
Data interface{} `json:"data"`
|
||||
Msg string `json:"msg"`
|
||||
Code e.ErrorCodeType `json:"code"`
|
||||
Error error `json:"error"`
|
||||
Err string `json:"err"`
|
||||
Keys []string `json:"keys"`
|
||||
Mark string `json:"mark,omitempty"`
|
||||
Page *PageInfo `json:"page,omitempty"`
|
||||
Positions interface{} `json:"positions"`
|
||||
}
|
||||
type PageInfo struct {
|
||||
Page int32 `json:"page" query:"page"`
|
||||
PageSize int32 `json:"pageSize" query:"pageSize"`
|
||||
Total int32 `json:"total"`
|
||||
}
|
||||
|
||||
type UseFaceClockIn struct {
|
||||
Result int `json:"Result"`
|
||||
Msg string `json:"Msg"`
|
||||
}
|
@ -3,7 +3,7 @@ package account
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
account "fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/model/union"
|
||||
@ -18,7 +18,7 @@ func UserApproval(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
res, err := service.AccountProvider.CheckRealName(context.Background(), &req)
|
||||
res, err := service.AccountFieeProvider.CheckRealName(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -34,7 +34,7 @@ func UserList(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
req.Domain = "app"
|
||||
res, err := service.AccountProvider.UserList(context.Background(), &req)
|
||||
res, err := service.AccountFieeProvider.UserList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -48,7 +48,7 @@ func UserInfo(c *gin.Context) {
|
||||
user := login.GetUserInfoFromC(c)
|
||||
req.ID = user.ID
|
||||
req.Domain = user.Domain
|
||||
res, err := service.AccountProvider.Info(context.Background(), &req)
|
||||
res, err := service.AccountFieeProvider.Info(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -67,7 +67,7 @@ func UserUpdate(c *gin.Context) {
|
||||
user := login.GetUserInfoFromC(c)
|
||||
req.ID = user.ID
|
||||
req.Domain = user.Domain
|
||||
res, err := service.AccountProvider.Update(context.Background(), &account.UpdateRequest{
|
||||
res, err := service.AccountFieeProvider.Update(c, &account.UpdateRequest{
|
||||
ID: req.ID,
|
||||
Domain: req.Domain,
|
||||
Language: req.Language,
|
||||
@ -88,7 +88,7 @@ func SendMsg(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
data, err := service.AccountProvider.VerifySliderStatus(context.Background(), &account.VerifySliderStatusRequest{
|
||||
data, err := service.AccountFieeProvider.VerifySliderStatus(c, &account.VerifySliderStatusRequest{
|
||||
NonceStr: req.NonceStr,
|
||||
})
|
||||
fmt.Println("data=============>", data, err)
|
||||
@ -151,27 +151,27 @@ func SendMsg(c *gin.Context) {
|
||||
MId: req.MId,
|
||||
Scope: req.Scope,
|
||||
}
|
||||
res, err := service.AccountProvider.SendNationMsg(context.Background(), tempReq)
|
||||
res, err := service.AccountFieeProvider.SendNationMsg(context.Background(), tempReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, res)
|
||||
service.Success1(c, "发送成功", res)
|
||||
return
|
||||
} else {
|
||||
res, err := service.AccountProvider.SendMsg(context.Background(), &req)
|
||||
res, err := service.AccountFieeProvider.SendMsg(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
service.Success1(c, "发送成功", res)
|
||||
return
|
||||
}
|
||||
|
||||
//req.Domain = "app"
|
||||
//req.SignNo = uint32(config.DefaultSignNo)
|
||||
//res, err := service.AccountProvider.SendMsg(context.Background(), &req)
|
||||
//res, err := service.AccountFieeProvider.SendMsg(context.Background(), &req)
|
||||
//if err != nil {
|
||||
// service.Error(c, err)
|
||||
// return
|
||||
@ -187,7 +187,7 @@ func RealName(c *gin.Context) {
|
||||
}
|
||||
user := login.GetUserInfoFromC(c)
|
||||
req.Id = user.ID
|
||||
res, err := service.AccountProvider.RealName(context.Background(), &req)
|
||||
res, err := service.AccountFieeProvider.RealName(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -207,7 +207,7 @@ func CheckMsg(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
req.TelNum = req.Zone + req.TelNum
|
||||
res, err := service.AccountProvider.CheckMsg(context.Background(), &req)
|
||||
res, err := service.AccountFieeProvider.CheckMsg(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -225,7 +225,7 @@ func GenerateCaptcha(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.AccountProvider.GenerateSliderCaptcha(context.Background(), &req)
|
||||
res, err := service.AccountFieeProvider.GenerateSliderCaptcha(context.Background(), &req)
|
||||
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
@ -245,7 +245,7 @@ func ValidateCaptcha(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.AccountProvider.VerifySliderCaptcha(context.Background(), &req)
|
||||
res, err := service.AccountFieeProvider.VerifySliderCaptcha(context.Background(), &req)
|
||||
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
@ -258,7 +258,7 @@ func ValidateCaptcha(c *gin.Context) {
|
||||
func UserLogout(c *gin.Context) {
|
||||
req := account.DecryptJwtRequest{}
|
||||
req.Token = c.GetHeader(e.Authorization)
|
||||
res, err := service.AccountProvider.Logout(c, &req)
|
||||
res, err := service.AccountFieeProvider.Logout(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -274,12 +274,12 @@ func UserRegister(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
req.Domain = "app"
|
||||
res, err := service.AccountProvider.Register(context.Background(), &req)
|
||||
res, err := service.AccountFieeProvider.Register(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
tokenInfo, err := service.AccountProvider.Login(context.Background(), &account.LoginRequest{
|
||||
tokenInfo, err := service.AccountFieeProvider.Login(context.Background(), &account.LoginRequest{
|
||||
Domain: req.Domain,
|
||||
TelNum: req.TelNum,
|
||||
Code: req.Code,
|
||||
@ -303,7 +303,7 @@ func UserLogin(c *gin.Context) {
|
||||
}
|
||||
req.Ip = c.ClientIP()
|
||||
req.Domain = "fontree"
|
||||
res, err := service.AccountProvider.Login(c, &req)
|
||||
res, err := service.AccountFieeProvider.Login(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
|
57
pkg/service/app/cast/media.go
Normal file
57
pkg/service/app/cast/media.go
Normal file
@ -0,0 +1,57 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func UserAccounts(ctx *gin.Context) {
|
||||
var req *cast.MediaAccountsReq = &cast.MediaAccountsReq{}
|
||||
var err error
|
||||
if config.AppConfig.System.AppMode != "dev" {
|
||||
userInfo := login.GetUserInfoFromC(ctx)
|
||||
req.ArtistUuid = fmt.Sprint(userInfo.ID)
|
||||
} else {
|
||||
req.ArtistUuid = "61"
|
||||
}
|
||||
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if err = req.Validate(); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.CastProvider.MediaAccounts(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
|
||||
func MediaWorks(ctx *gin.Context) {
|
||||
var req *cast.MediaWorksReq
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if err = req.Validate(); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.CastProvider.MediaWorks(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
283
pkg/service/approval/model/oa_type.go
Normal file
283
pkg/service/approval/model/oa_type.go
Normal file
@ -0,0 +1,283 @@
|
||||
package model
|
||||
|
||||
// 或签 会签
|
||||
const (
|
||||
AndSignType = "AND"
|
||||
OrSignType = "OR"
|
||||
ErrorSignType = "签核类型错误"
|
||||
)
|
||||
|
||||
var OaTypeMap = map[string]string{
|
||||
"leave": "leave", // 事假
|
||||
"sick": "leave", // 病假
|
||||
"annualLeave": "leave", // 年假
|
||||
"dayOff": "leave", // 调休
|
||||
"maritalLeave": "leave", // 婚假
|
||||
"matingCheckLeave": "leave", // 孕检假
|
||||
"maternityLeave": "leave", // 产假
|
||||
"paternityLeave": "leave", // 陪产假
|
||||
"parentalLeave": "leave", // 育儿假
|
||||
"nursingLeave": "leave", // 独生子女护理假
|
||||
"funeralLeave": "leave", // 丧假
|
||||
"abortLeave": "leave", // 流产假
|
||||
"breastFeedingLeave": "leave", // 哺乳假
|
||||
|
||||
"makeUp": "makeUp", // 补卡
|
||||
"overTime": "overTime", // 加班
|
||||
"outWork": "outWork", // 外勤
|
||||
"handover": "handover", // 离职
|
||||
"handover-1": "handover", // 离职
|
||||
"handover-2": "handover", // 离职
|
||||
"handover-3": "handover", // 离职
|
||||
"handover-4": "handover", // 离职
|
||||
"handover-5": "handover", // 离职
|
||||
"handover-6": "handover", // 离职
|
||||
"handover-7": "handover", // 离职
|
||||
"handover-8": "handover", // 离职
|
||||
"handover-9": "handover", // 离职
|
||||
"handover-10": "handover", // 离职
|
||||
"handover-11": "handover", // 离职
|
||||
"handover-12": "handover", // 离职
|
||||
"handover-13": "handover", // 离职
|
||||
"handover-14": "handover", // 离职
|
||||
"handover-15": "handover", // 离职
|
||||
"handover-16": "handover", // 离职
|
||||
"handover-17": "handover", // 离职
|
||||
"handover-18": "handover", // 离职
|
||||
"handover-19": "handover", // 离职
|
||||
"handover-20": "handover", // 离职
|
||||
"handover-21": "handover", // 离职
|
||||
"handover-22": "handover", // 离职
|
||||
"handover-23": "handover", // 离职
|
||||
"handover-24": "handover", // 离职
|
||||
"handover-25": "handover", // 离职
|
||||
"handover-26": "handover", // 离职
|
||||
"handover-27": "handover", // 离职
|
||||
"handover-28": "handover", // 离职
|
||||
"handover-29": "handover", // 离职
|
||||
"handover-30": "handover", // 离职
|
||||
"handover-31": "handover", // 离职
|
||||
"handover-32": "handover", // 离职
|
||||
"handover-33": "handover", // 离职
|
||||
"handover-34": "handover", // 离职
|
||||
"handover-35": "handover", // 离职
|
||||
"handover-36": "handover", // 离职
|
||||
"handover-37": "handover", // 离职
|
||||
"handover-38": "handover", // 离职
|
||||
"handover-39": "handover", // 离职
|
||||
"handover-40": "handover", // 离职
|
||||
"handover-41": "handover", // 离职
|
||||
"handover-42": "handover", // 离职
|
||||
"handover-43": "handover", // 离职
|
||||
"handover-44": "handover", // 离职
|
||||
"handover-45": "handover", // 离职
|
||||
"handover-46": "handover", // 离职
|
||||
"handover-47": "handover", // 离职
|
||||
"handover-48": "handover", // 离职
|
||||
"handover-49": "handover", // 离职
|
||||
"handover-50": "handover", // 离职
|
||||
"handover-51": "handover", // 离职
|
||||
"handover-52": "handover", // 离职
|
||||
"handover-53": "handover", // 离职
|
||||
"turnover": "turnover", // 离职
|
||||
"turnover-1": "turnover", // 离职
|
||||
"turnover-2": "turnover", // 离职
|
||||
"turnover-3": "turnover", // 离职
|
||||
"turnover-4": "turnover", // 离职
|
||||
"turnover-5": "turnover", // 离职
|
||||
"turnover-6": "turnover", // 离职
|
||||
"turnover-7": "turnover", // 离职
|
||||
"turnover-8": "turnover", // 离职
|
||||
"turnover-9": "turnover", // 离职
|
||||
"turnover-10": "turnover", // 离职
|
||||
"turnover-11": "turnover", // 离职
|
||||
"turnover-12": "turnover", // 离职
|
||||
"turnover-13": "turnover", // 离职
|
||||
"turnover-14": "turnover", // 离职
|
||||
"turnover-15": "turnover", // 离职
|
||||
"turnover-16": "turnover", // 离职
|
||||
"turnover-17": "turnover", // 离职
|
||||
"turnover-18": "turnover", // 离职
|
||||
"turnover-19": "turnover", // 离职
|
||||
"turnover-20": "turnover", // 离职
|
||||
"turnover-21": "turnover", // 离职
|
||||
"turnover-22": "turnover", // 离职
|
||||
"turnover-23": "turnover", // 离职
|
||||
"turnover-24": "turnover", // 离职
|
||||
"turnover-25": "turnover", // 离职
|
||||
"turnover-26": "turnover", // 离职
|
||||
"turnover-27": "turnover", // 离职
|
||||
"turnover-28": "turnover", // 离职
|
||||
"turnover-29": "turnover", // 离职
|
||||
"turnover-30": "turnover", // 离职
|
||||
"turnover-31": "turnover", // 离职
|
||||
"turnover-32": "turnover", // 离职
|
||||
"turnover-33": "turnover", // 离职
|
||||
"turnover-34": "turnover", // 离职
|
||||
"turnover-35": "turnover", // 离职
|
||||
"turnover-36": "turnover", // 离职
|
||||
"turnover-37": "turnover", // 离职
|
||||
"turnover-38": "turnover", // 离职
|
||||
"turnover-39": "turnover", // 离职
|
||||
"turnover-40": "turnover", // 离职
|
||||
"turnover-41": "turnover", // 离职
|
||||
"turnover-42": "turnover", // 离职
|
||||
"turnover-43": "turnover", // 离职
|
||||
"turnover-44": "turnover", // 离职
|
||||
"turnover-45": "turnover", // 离职
|
||||
"turnover-46": "turnover", // 离职
|
||||
"turnover-47": "turnover", // 离职
|
||||
"turnover-48": "turnover", // 离职
|
||||
"turnover-49": "turnover", // 离职
|
||||
"turnover-50": "turnover", // 离职
|
||||
"turnover-51": "turnover", // 离职
|
||||
"turnover-52": "turnover", // 离职
|
||||
"turnover-53": "turnover", // 离职
|
||||
"businessTrip": "businessTrip", // 出差
|
||||
"goOut": "goOut", // 外出
|
||||
|
||||
"annualLeaveApply": "leaveApply", // 年假申请
|
||||
"maritalLeaveApply": "leaveApply", // 婚假申请
|
||||
"matingCheckLeaveApply": "leaveApply", // 孕检假申请
|
||||
"maternityLeaveApply": "leaveApply", // 产假申请
|
||||
"paternityLeaveApply": "leaveApply", // 陪产假申请
|
||||
"parentalLeaveApply": "leaveApply", // 育儿假申请
|
||||
"nursingLeaveApply": "leaveApply", // 独生子女护理假申请
|
||||
"funeralLeaveApply": "leaveApply", // 丧假申请
|
||||
}
|
||||
|
||||
var EnglishMap = map[string]string{
|
||||
"普通审批": "General approval",
|
||||
"画作申请审批": "Approval of the painting application",
|
||||
"画展包审批": "Approval of the exhibition package",
|
||||
"画展包数量审批": "Approval of the number of painting packages",
|
||||
"画展审批": "Approval of art exhibitions",
|
||||
"画展包付款单申请": "Application for payment slip for exhibition package",
|
||||
"画作润格审批": "Painting Runge Approval",
|
||||
"画展包修改审批": "Approval of modification of the exhibition package",
|
||||
"任命审批": "Appointment approval",
|
||||
"人员增补申请": "Personnel Supplement Request",
|
||||
"录用申请": "Job application",
|
||||
"签到申请": "Check-in application",
|
||||
"退回审批": "Return for approval",
|
||||
"特殊画展包生成审批": "Approval of special painting package generation",
|
||||
|
||||
"事假": "Leave", // 事假
|
||||
"病假": "sick leave", // 病假
|
||||
"年假": "annual leave", // 年假
|
||||
"调休": "Compensatory leave", // 调休
|
||||
"婚假": "Marriage leave", // 婚假
|
||||
"孕检假": "Pregnancy test leave", // 孕检假
|
||||
"产假": "maternity leave", // 产假
|
||||
"陪产假": "Paternity leave", // 陪产假
|
||||
"育儿假": "Parental leave", // 育儿假
|
||||
"独生子女护理假": "Nursing leave for an only child", // 独生子女护理假
|
||||
"丧假": "Bereavement leave", // 丧假
|
||||
"流产假": "Miscarriage leave", // 流产假
|
||||
"哺乳假": "Breastfeeding leave", // 哺乳假
|
||||
|
||||
"补卡": "makeUp", // 补卡
|
||||
"加班": "overtime", // 加班
|
||||
"外勤": "out work", // 外勤
|
||||
"离职申请": "Resignation application", // 离职
|
||||
"离职交接": "Separation handover", // 离职交接
|
||||
"出差": "business trip", // 出差
|
||||
"外出": "Out", // 外出
|
||||
|
||||
"育儿假额度申请": "parentalLeaveApply", // 育儿假申请
|
||||
"独生子女护理假申请": "nursingLeaveApply", // 独生子女护理假申请
|
||||
"岗位申请": "employ application", //岗位申请
|
||||
"上午": "AM",
|
||||
"下午": "PM",
|
||||
"开始时间不应晚于结束时间": "The start time should not be later than the end time",
|
||||
"未申请假期余额": "Leave balance is not requested",
|
||||
"请填写完整信息": "Please fill in the complete information",
|
||||
"所选时间段已有申请": "There is already an application for the selected time period",
|
||||
"请填写撤销理由": "Please fill in the reason for withdrawal",
|
||||
"您今天已经对该审批人同类的审批发送过短信!": "You've already sent an SMS message today for an approval of the same type as that approver",
|
||||
"当前状态无法修改": "The current status cannot be modified",
|
||||
"请假时长超出范围": "The length of the leave is out of range",
|
||||
"该请假类型申请时间不在本年度": "This leave type is not available in the current year",
|
||||
"假期余额不足": "Insufficient leave balance",
|
||||
"该请假类型申请时间不在本月": "This leave type is not available in this month",
|
||||
"离职申请未完成": "The resignation application is not complete",
|
||||
"用户已提交过离职申请": "The user has submitted a resignation request",
|
||||
"用户已提交过离职交接": "The user has submitted an off-boarding handover",
|
||||
"该工号已存在": "The job number already exists",
|
||||
"考勤规则查询错误": "Attendance rule query error",
|
||||
}
|
||||
|
||||
var ChineseTraditionalMap = map[string]string{
|
||||
"普通审批": "普通審批",
|
||||
"画作申请审批": "畫作申請審批",
|
||||
"画展包审批": "畫展包審批",
|
||||
"画展包数量审批": "畫展包數量審批",
|
||||
"画展审批": "畫展審批",
|
||||
"画展包付款单申请": "畫展包付款單申請",
|
||||
"画作润格审批": "畫作潤格審批",
|
||||
"画展包修改审批": "畫展包修改審批",
|
||||
"任命审批": "任命審批",
|
||||
"人员增补申请": "人員增補申請",
|
||||
"录用申请": "錄用申請",
|
||||
"签到申请": "簽到申請",
|
||||
"退回审批": "退回審批",
|
||||
"特殊画展包生成审批": "特殊畫展包生成審批",
|
||||
|
||||
"事假": "事假", // 事假
|
||||
"病假": "病假", // 病假
|
||||
"年假": "年假", // 年假
|
||||
"调休": "調休", // 调休
|
||||
"婚假": "婚假", // 婚假
|
||||
"孕检假": "孕檢假", // 孕检假
|
||||
"产假": "產假", // 产假
|
||||
"陪产假": "陪產假", // 陪产假
|
||||
"育儿假": "育兒假", // 育儿假
|
||||
"独生子女护理假": "獨生子女護理假", // 独生子女护理假
|
||||
"丧假": "喪假", // 丧假
|
||||
"流产假": "流產假", // 流产假
|
||||
"哺乳假": "哺乳假", // 哺乳假
|
||||
|
||||
"补卡": "補卡", // 补卡
|
||||
"加班": "加班", // 加班
|
||||
"外勤": "外勤", // 外勤
|
||||
"离职申请": "離職申請", // 离职
|
||||
"离职交接": "離職交接", // 离职交接
|
||||
"出差": "出差", // 出差
|
||||
"外出": "外出", // 外出
|
||||
|
||||
"育儿假额度申请": "育兒假額度申請", // 育儿假申请
|
||||
"独生子女护理假申请": "獨生子女護理假申請", // 独生子女护理假申请
|
||||
"岗位申请": "崗位申請", //岗位申请
|
||||
"上午": "上午",
|
||||
"下午": "下午",
|
||||
"开始时间不应晚于结束时间": "開始時間不應晚於結束時間",
|
||||
"未申请假期余额": "未申請假期餘額",
|
||||
"请填写完整信息": "請填寫完整資訊",
|
||||
"所选时间段已有申请": "所選時間段已有申請",
|
||||
"请填写撤销理由": "請填寫撤銷理由",
|
||||
"您今天已经对该审批人同类的审批发送过短信!": "您今天已經對該審批人同類的審批發送過簡訊",
|
||||
"当前状态无法修改": "當前狀態無法修改",
|
||||
"请假时长超出范围": "請假時長超出範圍",
|
||||
"该请假类型申请时间不在本年度": "該請假類型申請時間不在本年度",
|
||||
"假期余额不足": "假期餘額不足",
|
||||
"该请假类型申请时间不在本月": "該請假類型申請時間不在本月",
|
||||
"离职申请未完成": "離職申請未完成",
|
||||
"用户已提交过离职申请": "使用者已提交過離職申請",
|
||||
"用户已提交过离职交接": "使用者已提交過離職交接",
|
||||
"该工号已存在": "該工號已存在",
|
||||
"考勤规则查询错误": "考勤规则查询错误",
|
||||
}
|
||||
|
||||
func GetOaType(k string) string {
|
||||
return OaTypeMap[k]
|
||||
}
|
||||
|
||||
func GetLanguageType(lang string, k string) string {
|
||||
if lang == "EN" && EnglishMap[k] != "" {
|
||||
return EnglishMap[k]
|
||||
} else if lang == "ZhTW" && ChineseTraditionalMap[k] != "" {
|
||||
return ChineseTraditionalMap[k]
|
||||
} else {
|
||||
return k
|
||||
}
|
||||
}
|
226
pkg/service/asChat/chatAutoReplyRulerHandler.go
Normal file
226
pkg/service/asChat/chatAutoReplyRulerHandler.go
Normal file
@ -0,0 +1,226 @@
|
||||
package asChat
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"fonchain-fiee/pkg/utils"
|
||||
"fonchain-fiee/pkg/utils/secret"
|
||||
"fonchain-fiee/pkg/utils/stime"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
var Handler = &ChatAutoReplyRulerHandler{}
|
||||
|
||||
type ChatAutoReplyRulerHandler struct {
|
||||
}
|
||||
|
||||
// 创建自动回复规则
|
||||
func (a *ChatAutoReplyRulerHandler) CreateChatAutoReplyRuler(c *gin.Context) {
|
||||
var req dto.ChatAutoReplyData
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
rulerBytes, _ := json.Marshal(req.Rules)
|
||||
protoReq := accountFiee.ChatAutoReplyRulerData{
|
||||
Title: req.Title,
|
||||
Ruler: string(rulerBytes),
|
||||
Response: req.Response,
|
||||
}
|
||||
_, err := service.AccountFieeProvider.CreateChatAutoReplyRuler(c, &protoReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
err = ChatHandlerIns.robot.ReloadRules(c)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c)
|
||||
}
|
||||
|
||||
// 删除自动回复规则
|
||||
func (a *ChatAutoReplyRulerHandler) DeleteChatAutoReplyRuler(c *gin.Context) {
|
||||
var req accountFiee.DeleteChatAutoReplyRulerRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
_, err := service.AccountFieeProvider.DeleteChatAutoReplyRuler(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c)
|
||||
}
|
||||
|
||||
// 更新自动回复规则
|
||||
func (a *ChatAutoReplyRulerHandler) UpdateChatAutoReplyRuler(c *gin.Context) {
|
||||
var req dto.ChatAutoReplyData
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
protoReq := req.ToProtoData()
|
||||
_, err := service.AccountFieeProvider.UpdateChatAutoReplyRuler(c, protoReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
err = ChatHandlerIns.robot.ReloadRules(c)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c)
|
||||
}
|
||||
|
||||
// 使用id查询自动回复规则
|
||||
func (a *ChatAutoReplyRulerHandler) GetChatAutoReplyRulerDetail(c *gin.Context) {
|
||||
var req accountFiee.GetChatAutoReplyRulerByIdRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.AccountFieeProvider.GetChatAutoReplyRulerDetail(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
tmp := dto.ChatAutoReplyData{}
|
||||
tmp.Parse(resp)
|
||||
service.Success(c, tmp)
|
||||
}
|
||||
|
||||
// 批量查询自动回复规则
|
||||
func (a *ChatAutoReplyRulerHandler) GetChatAutoReplyRulerList(c *gin.Context) {
|
||||
var req dto.GetChatAutoReplyRulerListRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
var protoReq = accountFiee.GetChatAutoReplyRulerListRequest{Query: &accountFiee.ChatAutoReplyRulerData{}}
|
||||
utils.RequestDataConvert(&req, &protoReq)
|
||||
if req.RuleType != "" {
|
||||
protoReq.Where = fmt.Sprintf("ruler LIKE '%%%s\":{\"enable\":true%%'", req.RuleType)
|
||||
}
|
||||
resp, err := service.AccountFieeProvider.GetChatAutoReplyRulerList(c, &protoReq)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
var data []dto.ChatAutoReplyData
|
||||
for _, v := range resp.List {
|
||||
tmp := dto.ChatAutoReplyData{}
|
||||
tmp.Parse(v)
|
||||
data = append(data, tmp)
|
||||
}
|
||||
service.Success(c, map[string]interface{}{
|
||||
"data": data,
|
||||
"page": resp.Page,
|
||||
"pagesize": resp.PageSize,
|
||||
"total": resp.Total,
|
||||
})
|
||||
}
|
||||
func (a *ChatAutoReplyRulerHandler) ErpLoginDemo(c *gin.Context) {
|
||||
var req dto.ErpLoginDemoReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
loginRes, err := service.AccountProvider.Login(c, &account.LoginRequest{
|
||||
Domain: "fontree",
|
||||
TelNum: req.TelNum,
|
||||
Password: req.Password,
|
||||
})
|
||||
if err != nil {
|
||||
if err.Error() == "没有找到数据" || err.Error() == "No data found" {
|
||||
registerRequest := account.RegistRequest{
|
||||
Domain: "fontree",
|
||||
NickName: req.TelNum,
|
||||
TelNum: req.TelNum,
|
||||
Password: req.Password,
|
||||
EnterDate: time.Now().Format(stime.Format_Normal_YMD),
|
||||
Extend: &account.Extend{JumpTo: "onsite"}, //origin-老平台 onsite 当前
|
||||
JobNum: fmt.Sprintf("%d", rand.Intn(1000)),
|
||||
}
|
||||
registerRes, errs := service.AccountProvider.Register(c, ®isterRequest)
|
||||
if errs != nil {
|
||||
service.Error(c, errs)
|
||||
return
|
||||
}
|
||||
service.Success(c, registerRes)
|
||||
} else {
|
||||
service.Error(c, err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
departmentName := ""
|
||||
if loginRes.AccountInfo != nil && len(loginRes.AccountInfo.Departments) > 0 {
|
||||
departmentName = loginRes.AccountInfo.Departments[0].Name
|
||||
}
|
||||
loginRes.Token, err = secret.CombineSecret("xxx", departmentName, loginRes.Token)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
service.Success(c, loginRes)
|
||||
}
|
||||
func (a *ChatAutoReplyRulerHandler) FieeLoginDemo(c *gin.Context) {
|
||||
var req dto.ErpLoginDemoReq
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
loginRes, err := service.AccountFieeProvider.Login(c, &accountFiee.LoginRequest{
|
||||
Domain: config.AppConfig.System.Domain,
|
||||
TelNum: req.TelNum,
|
||||
Password: req.Password,
|
||||
})
|
||||
if err != nil {
|
||||
if err.Error() == "账号不存在" || err.Error() == "Account does not exist" {
|
||||
registerRequest := accountFiee.RegistRequest{
|
||||
Domain: config.AppConfig.System.Domain,
|
||||
NickName: req.TelNum,
|
||||
TelNum: req.TelNum,
|
||||
//Password: req.Password,
|
||||
//EnterDate: time.Now().Format(stime.Format_Normal_YMD),
|
||||
//Extend: &account.Extend{JumpTo: "onsite"}, //origin-老平台 onsite 当前
|
||||
//JobNum: fmt.Sprintf("%d", rand.Intn(1000)),
|
||||
}
|
||||
registerRes, errs := service.AccountFieeProvider.Register(c, ®isterRequest)
|
||||
if errs != nil {
|
||||
service.Error(c, errs)
|
||||
return
|
||||
}
|
||||
service.Success(c, registerRes)
|
||||
} else {
|
||||
service.Error(c, err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//departmentName := ""
|
||||
//if loginRes.AccountInfo != nil && len(loginRes.AccountInfo.Departments) > 0 {
|
||||
// departmentName = loginRes.AccountInfo.Departments[0].Name
|
||||
//}
|
||||
//loginRes.Token, err = secret.CombineSecret("xxx", departmentName, loginRes.Token)
|
||||
//if err != nil {
|
||||
// service.Error(c, err)
|
||||
// return
|
||||
//}
|
||||
service.Success(c, loginRes)
|
||||
}
|
||||
func (a *ChatAutoReplyRulerHandler) Test(c *gin.Context) {
|
||||
fmt.Println(c.GetHeader("domain"))
|
||||
}
|
250
pkg/service/asChat/chatCache/cache.go
Normal file
250
pkg/service/asChat/chatCache/cache.go
Normal file
@ -0,0 +1,250 @@
|
||||
// Package asChat -----------------------------
|
||||
// @file : cache.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2024/9/11 下午5:18
|
||||
// -------------------------------------------
|
||||
package chatCache
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
"fonchain-fiee/pkg/service/asChat/dto"
|
||||
"github.com/go-redis/redis"
|
||||
"github.com/goccy/go-json"
|
||||
"go.uber.org/zap"
|
||||
"log"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
const CacheChatRecordKey = "fiee:chatRecord"
|
||||
const CacheSessionKey = "fiee:chatSession"
|
||||
const CacheNewMsgStatKey = "fiee:newMsgStat"
|
||||
|
||||
var chatCacheLocker sync.RWMutex
|
||||
|
||||
type ChatCache struct {
|
||||
NewMessageStatExpireAfter time.Duration //消息统计的数据过期时间
|
||||
}
|
||||
|
||||
// ------------------------------存储用户的会话ID--------------------------------
|
||||
func (cr ChatCache) GetUserSessionCacheKey(userId int64) string {
|
||||
return fmt.Sprintf("%s:%d", CacheSessionKey, userId)
|
||||
}
|
||||
func (cr ChatCache) SaveUserSession(userId int64, sessionId string) {
|
||||
chatCacheLocker.Lock()
|
||||
defer chatCacheLocker.Unlock()
|
||||
////var c = context.Background()
|
||||
err := cache.RedisClient.Set(cr.GetUserSessionCacheKey(userId), sessionId, 0).Err()
|
||||
if err != nil {
|
||||
log.Print("保存用户会话失败", zap.Error(err))
|
||||
}
|
||||
}
|
||||
func (cr ChatCache) GetUserSession(userId int64) (sessionId string) {
|
||||
fmt.Println("GetUserSession-1")
|
||||
chatCacheLocker.RLock()
|
||||
defer chatCacheLocker.RUnlock()
|
||||
//var c = context.Background()
|
||||
sessionId, err := cache.RedisClient.Get(cr.GetUserSessionCacheKey(userId)).Result()
|
||||
fmt.Println("GetUserSession-2")
|
||||
if err != nil {
|
||||
if err.Error() == "redis: nil" {
|
||||
err = nil
|
||||
} else {
|
||||
log.Print("获取用户会话失败", zap.Error(err))
|
||||
}
|
||||
}
|
||||
fmt.Println("GetUserSession-3, sessionId:", sessionId)
|
||||
return
|
||||
}
|
||||
|
||||
// ------------------------------存储会话的聊天记录--------------------------------
|
||||
func (cr ChatCache) GetChatRecordCacheKey(sessionId string) string {
|
||||
return fmt.Sprintf("%s:%s", CacheChatRecordKey, sessionId)
|
||||
}
|
||||
func (cr ChatCache) AddChatRecord(sessionId string, data ...*accountFiee.ChatRecordData) (err error) {
|
||||
////var c = context.Background()
|
||||
messages := cr.GetChatRecord(sessionId)
|
||||
fmt.Printf("AddChatRecord add data:%+v\n", data)
|
||||
messages = append(messages, data...)
|
||||
cacheBytes, _ := json.Marshal(messages)
|
||||
fmt.Println("Marshal result", string(cacheBytes))
|
||||
err = cache.RedisClient.Set(cr.GetChatRecordCacheKey(sessionId), cacheBytes, 2*time.Hour).Err()
|
||||
return
|
||||
}
|
||||
|
||||
func (cr ChatCache) CoverChatRecord(sessionId string, data []*accountFiee.ChatRecordData) (err error) {
|
||||
chatCacheLocker.Lock()
|
||||
defer chatCacheLocker.Unlock()
|
||||
//var c = context.Background()
|
||||
cacheBytes, _ := json.Marshal(data)
|
||||
err = cache.RedisClient.Set(cr.GetChatRecordCacheKey(sessionId), cacheBytes, 2*time.Hour).Err()
|
||||
return
|
||||
}
|
||||
func (cr ChatCache) GetChatRecord(sessionId string) (data []*accountFiee.ChatRecordData) {
|
||||
chatCacheLocker.RLock()
|
||||
defer chatCacheLocker.RUnlock()
|
||||
data = make([]*accountFiee.ChatRecordData, 0)
|
||||
//var c = context.Background()
|
||||
messages, err := cache.RedisClient.Get(cr.GetChatRecordCacheKey(sessionId)).Bytes()
|
||||
if err != nil {
|
||||
if err.Error() == "redis: nil" {
|
||||
err = nil
|
||||
}
|
||||
//log.Print("获取聊天记录失败", zap.Error(err))
|
||||
return
|
||||
}
|
||||
//fmt.Printf("cache data: %+v", string(messages))
|
||||
if len(messages) > 0 {
|
||||
_ = json.Unmarshal(messages, &data)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// ------------------------------存储新消息统计--------------------------------
|
||||
func (cr ChatCache) GetNewMsgStatCacheKey(ownerId int64) string {
|
||||
return fmt.Sprintf("%s:%d", CacheNewMsgStatKey, ownerId)
|
||||
}
|
||||
|
||||
// 消息数量自增
|
||||
func (cr ChatCache) IncreaseNewMessageTotal(ownerId int64, sessionId string) (err error) {
|
||||
chatCacheLocker.Lock()
|
||||
defer chatCacheLocker.Unlock()
|
||||
ctx := context.Background()
|
||||
data := cr.GetNewMessageStat(ctx, ownerId)
|
||||
if len(data) > 0 {
|
||||
foundIndex := -1
|
||||
for i, v := range data {
|
||||
if v.SessionId == sessionId {
|
||||
foundIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if foundIndex > -1 {
|
||||
data[foundIndex].Total += 1
|
||||
}
|
||||
//将foundIndex之后的所有元素右移动一位
|
||||
if foundIndex > 0 {
|
||||
elementToMove := data[foundIndex]
|
||||
copy(data[1:], data[0:foundIndex])
|
||||
data[0] = elementToMove
|
||||
} else if foundIndex == -1 {
|
||||
data = append([]dto.UserMsgStatic{{SessionId: sessionId, Total: 1}}, data...)
|
||||
}
|
||||
} else {
|
||||
data = []dto.UserMsgStatic{{SessionId: sessionId, Total: 1}}
|
||||
}
|
||||
return cr.coverOwnerNewMessageStat(ctx, ownerId, data)
|
||||
}
|
||||
|
||||
// 重置新消息数量
|
||||
func (cr ChatCache) ResetNewMessageTotal(ownerId int64, sessionId string, total ...int64) error {
|
||||
fmt.Printf("ResetNewMessageTotal: %d ,sessionId:%s ,total:%v\n", ownerId, sessionId, total)
|
||||
chatCacheLocker.Lock()
|
||||
defer chatCacheLocker.Unlock()
|
||||
var tl int64
|
||||
if len(total) > 0 {
|
||||
tl = total[0]
|
||||
}
|
||||
fmt.Println("ResetNewMessageTotal tl:", tl)
|
||||
ctx := context.Background()
|
||||
data := cr.GetNewMessageStat(ctx, ownerId)
|
||||
fmt.Printf("ResetNewMessageTotal data:%+v\n", data)
|
||||
found := false
|
||||
for i, v := range data {
|
||||
if v.SessionId == sessionId {
|
||||
found = true
|
||||
data[i].Total = tl
|
||||
fmt.Println("ResetNewMessageTotal found!")
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
fmt.Println("ResetNewMessageTotal not found!")
|
||||
data = append(data, dto.UserMsgStatic{
|
||||
SessionId: sessionId,
|
||||
Total: tl,
|
||||
})
|
||||
}
|
||||
err := cr.coverOwnerNewMessageStat(ctx, ownerId, data)
|
||||
fmt.Println("ResetNewMessageTotal result:", err)
|
||||
return err
|
||||
}
|
||||
|
||||
func (cr ChatCache) RecountNewMessageTotal(ownerId int64) {
|
||||
//var c = context.Background()
|
||||
var keys []string
|
||||
var err error
|
||||
keys, err = cache.RedisClient.Keys(CacheChatRecordKey + "*").Result()
|
||||
if err != nil {
|
||||
log.Print("获取聊天记录所有缓存KEY失败", zap.Error(err))
|
||||
return
|
||||
}
|
||||
var countMap = make(map[string]int)
|
||||
for _, key := range keys {
|
||||
var messages []byte
|
||||
var data []*accountFiee.ChatRecordData
|
||||
messages, err = cache.RedisClient.Get(key).Bytes()
|
||||
if err != nil {
|
||||
if err.Error() == "redis: nil" {
|
||||
err = nil
|
||||
}
|
||||
log.Print("获取聊天记录失败", zap.Error(err))
|
||||
data = make([]*accountFiee.ChatRecordData, 0)
|
||||
continue
|
||||
}
|
||||
if len(messages) > 0 {
|
||||
_ = json.Unmarshal(messages, &data)
|
||||
}
|
||||
lastIndex := strings.Count(key, ":")
|
||||
var sessionId = strings.Split(key, ":")[lastIndex]
|
||||
countMap[sessionId] = 0
|
||||
for _, v := range data {
|
||||
if v.WaiterRead == 2 { //统计未读消息数量
|
||||
countMap[sessionId]++
|
||||
}
|
||||
}
|
||||
}
|
||||
for sessionId, count := range countMap {
|
||||
err = cr.ResetNewMessageTotal(ownerId, sessionId, int64(count))
|
||||
if err != nil {
|
||||
log.Print("重置新消息数量统计",
|
||||
zap.String("function", "RecountNewMessageTotal"),
|
||||
zap.Int64("ownerId", ownerId),
|
||||
zap.String("sessionId", sessionId),
|
||||
zap.Int("count", count),
|
||||
zap.Error(err),
|
||||
)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// erp获取最新的消息统计
|
||||
func (cr ChatCache) GetNewMessageStat(ctx context.Context, ownerId int64) (result []dto.UserMsgStatic) {
|
||||
//chatCacheLocker.RLock()
|
||||
//defer chatCacheLocker.RUnlock()
|
||||
result = make([]dto.UserMsgStatic, 0)
|
||||
vals, err := cache.RedisClient.Get(cr.GetNewMsgStatCacheKey(ownerId)).Bytes()
|
||||
if err != nil && errors.Is(err, redis.Nil) {
|
||||
log.Print("从缓存获取新消息统计失败", zap.Error(err), zap.Int64("ownerId", ownerId))
|
||||
return
|
||||
}
|
||||
if vals != nil {
|
||||
_ = json.Unmarshal(vals, &result)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 覆盖指定erp用户的新消息统计
|
||||
func (cr ChatCache) coverOwnerNewMessageStat(ctx context.Context, ownerId int64, data []dto.UserMsgStatic) (err error) {
|
||||
value, _ := json.Marshal(data)
|
||||
//err = cache.RedisClient.Set(ctx, cr.GetNewMsgStatCacheKey(ownerId), value, cr.NewMessageStatExpireAfter).Err()
|
||||
err = cache.RedisClient.Set(cr.GetNewMsgStatCacheKey(ownerId), value, 0).Err()
|
||||
return
|
||||
}
|
33
pkg/service/asChat/consts/chatRoom.go
Normal file
33
pkg/service/asChat/consts/chatRoom.go
Normal file
@ -0,0 +1,33 @@
|
||||
// package asChat -----------------------------
|
||||
// @file : chatRoom.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2022/10/21 18:17:17
|
||||
// -------------------------------------------
|
||||
package consts
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fonchain-fiee/pkg/common/ws"
|
||||
)
|
||||
|
||||
var (
|
||||
ChatRoom = ws.NewChatRoom()
|
||||
)
|
||||
|
||||
type WsInfo struct {
|
||||
Type ws.WsType `json:"type"` //消息类型
|
||||
Content any `json:"content"`
|
||||
}
|
||||
|
||||
func WsMessageRegisterCallback(clientId string, sessionId string) []byte {
|
||||
var errMsg = WsInfo{
|
||||
Type: ws.RegisterType,
|
||||
Content: map[string]string{
|
||||
//"clientId": clientId,
|
||||
"sessionId": sessionId,
|
||||
},
|
||||
}
|
||||
byteMsg, _ := json.Marshal(errMsg)
|
||||
return byteMsg
|
||||
}
|
7
pkg/service/asChat/consts/consts.go
Normal file
7
pkg/service/asChat/consts/consts.go
Normal file
@ -0,0 +1,7 @@
|
||||
// Package consts -----------------------------
|
||||
// @file : consts.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2025/6/13 17:40
|
||||
// -------------------------------------------
|
||||
package consts
|
220
pkg/service/asChat/dto/dto.go
Normal file
220
pkg/service/asChat/dto/dto.go
Normal file
@ -0,0 +1,220 @@
|
||||
// Package asChat -----------------------------
|
||||
// @file : dto.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2024/9/10 下午6:28
|
||||
// -------------------------------------------
|
||||
package dto
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"log"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
MsgType accountFiee.MsgType `json:"msgType"`
|
||||
Text string `json:"text"` //文本内容
|
||||
Media []MessageMedia `json:"media"`
|
||||
LocalStamp int64 `json:"localStamp"`
|
||||
}
|
||||
type MessageMedia struct {
|
||||
MediaId int64 `json:"mediaId"` //媒体文件id
|
||||
MediaSize string `json:"mediaSize"` //媒体文件大小
|
||||
Ext string `json:"ext"` //后缀格式
|
||||
Url string `json:"url"` //文件地址
|
||||
ConvText string `json:"convText"` //语音转文字内容,需要调用语音转文字接口后才会有值
|
||||
Duration int64 `json:"duration"` //时长 单位:毫秒
|
||||
}
|
||||
|
||||
// 客户端发送消息请求,使用api发送消息
|
||||
type NewMessageRequest struct {
|
||||
Waiter bool `json:"waiter"` //是否是客服发送,客服没有userId
|
||||
Robot bool `json:"-"` //是否机器人发送
|
||||
SessionId string `json:"sessionId"`
|
||||
Message
|
||||
AtUserId int64 `json:"atUserId"` //指定发送给sessionId中的某一个用户
|
||||
}
|
||||
|
||||
// 服务端接收到消息后,使用websocket发送给userId关联的客户端,通知客户端有新消息,然后调用接口获取消息
|
||||
type NewMessageNotice struct {
|
||||
Name string `json:"name"` //名字
|
||||
UserId int64 `json:"userId"` //用户id
|
||||
SessionId string `json:"sessionId"`
|
||||
MessageId int64 `json:"messageId"` //消息id
|
||||
//NewMsgTotal int64 `json:"newMsgTotal"` //新消息数量
|
||||
//Active bool `json:"active"` //是否在线
|
||||
}
|
||||
|
||||
// 获取会话列表
|
||||
type SessionType struct {
|
||||
NewMessageNotice
|
||||
RecentMessage []*Message `json:"recentMessage"` //最近消息
|
||||
}
|
||||
|
||||
type MessageListType struct {
|
||||
ID int64 `json:"ID"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UserId int64 `json:"userId"`
|
||||
Role int32 `json:"role,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Message Message `json:"message"`
|
||||
}
|
||||
|
||||
func (m *MessageListType) BuildMessage(data *accountFiee.ChatRecordData) {
|
||||
m.ID = data.ID
|
||||
m.CreatedAt = data.CreatedAt
|
||||
m.UserId = data.UserId
|
||||
m.Name = data.Name
|
||||
m.Role = data.Role
|
||||
switch data.MsgType {
|
||||
default:
|
||||
m.Message.MsgType = data.MsgType
|
||||
m.Message.Text = data.Content
|
||||
m.Message.LocalStamp = data.LocalStamp
|
||||
if data.Medias != nil {
|
||||
for _, media := range data.Medias {
|
||||
m.Message.Media = append(m.Message.Media, MessageMedia{
|
||||
MediaId: media.ID,
|
||||
MediaSize: media.Size,
|
||||
Ext: media.Ext,
|
||||
Url: media.Url,
|
||||
ConvText: media.ConvText,
|
||||
Duration: media.Duration,
|
||||
})
|
||||
}
|
||||
}
|
||||
case accountFiee.MsgType_TextMsgType:
|
||||
m.Message = Message{
|
||||
MsgType: data.MsgType,
|
||||
Text: data.Content,
|
||||
Media: []MessageMedia{},
|
||||
LocalStamp: data.LocalStamp,
|
||||
}
|
||||
case accountFiee.MsgType_ImageMsgType, accountFiee.MsgType_AudioMsgType, accountFiee.MsgType_VideoMsgType:
|
||||
m.Message.MsgType = data.MsgType
|
||||
m.Message.Text = data.Content
|
||||
m.Message.LocalStamp = data.LocalStamp
|
||||
if data.Medias != nil {
|
||||
for _, media := range data.Medias {
|
||||
m.Message.Media = append(m.Message.Media, MessageMedia{
|
||||
MediaId: media.ID,
|
||||
MediaSize: media.Size,
|
||||
Ext: media.Ext,
|
||||
Url: media.Url,
|
||||
ConvText: media.ConvText,
|
||||
Duration: media.Duration,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
func (m *MessageListType) ToJson() string {
|
||||
jsonBytes, _ := json.Marshal(m)
|
||||
return string(jsonBytes)
|
||||
}
|
||||
|
||||
type UserMsgStatic struct {
|
||||
UserId int64 `json:"userId"` //用户id
|
||||
Name string `json:"name"` //名称
|
||||
ArtistUid string `json:"artistUid,omitempty"`
|
||||
SessionId string `json:"sessionId"` //会话id
|
||||
Total int64 `json:"total"` //新消息数量
|
||||
//NewMessageTime string `json:"newMessageTime"` //最新消息的创建时间
|
||||
}
|
||||
|
||||
type MessageListRequest struct {
|
||||
SessionId string `json:"sessionId"` //不传则获取自己的会话消息里列表
|
||||
CurrentId int64 `json:"currentId"` //组合查询条件1:基于某个消息id,向前或向后查找。两种组合条件不能同时使用
|
||||
Direction int `json:"direction"` //组合查询条件1:方向 1=向前查找 2=向后查找
|
||||
Recent bool `json:"recent"` //组合查询条件2:查找最新的若干条消息。两种组合条件不能同时使用
|
||||
InHour time.Duration `json:"inHour"` //组合查询条件2:可选,查询指定小时内的数据
|
||||
PageSize int64 `json:"pageSize"` //查找数量
|
||||
}
|
||||
|
||||
type VoiceToTextRequest struct {
|
||||
MediaId int64 `json:"mediaId"`
|
||||
}
|
||||
|
||||
type ArtistInfoRequest struct {
|
||||
UserId int64 `json:"userId"`
|
||||
}
|
||||
type ArtistInfo struct {
|
||||
Tnum string `json:"tnum"`
|
||||
ArtistName string `json:"artistName"`
|
||||
Age int64 `json:"age"`
|
||||
Sex string `json:"sex"`
|
||||
NativePlace string `json:"nativePlace"`
|
||||
TelNum string `json:"telNum"`
|
||||
RecentPhoto string `json:"recentPhoto"`
|
||||
}
|
||||
|
||||
type GetChatAutoReplyRulerListRequest struct {
|
||||
Page int64 `json:"page"`
|
||||
PageSize int64 `json:"pageSize"`
|
||||
accountFiee.ChatAutoReplyRulerData
|
||||
RuleType string `json:"ruleType"`
|
||||
}
|
||||
type ErpLoginDemoReq struct {
|
||||
TelNum string `json:"telNum"`
|
||||
Password string `json:"password"`
|
||||
Nickname string `json:"nickname"`
|
||||
RealName string `json:"realName"`
|
||||
}
|
||||
|
||||
type ChatAutoReplyData struct {
|
||||
ID int64 `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Rules map[string]*AutoReplyRule `json:"rules"`
|
||||
Response string `json:"response"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
Status int32 `json:"status"`
|
||||
}
|
||||
|
||||
func (r *ChatAutoReplyData) ToProtoData() (data *accountFiee.ChatAutoReplyRulerData) {
|
||||
jsonBytes, _ := json.Marshal(r.Rules)
|
||||
data = &accountFiee.ChatAutoReplyRulerData{
|
||||
ID: r.ID,
|
||||
CreatedAt: r.CreatedAt,
|
||||
UpdatedAt: r.UpdatedAt,
|
||||
Title: r.Title,
|
||||
Ruler: string(jsonBytes),
|
||||
Status: r.Status,
|
||||
Response: r.Response,
|
||||
}
|
||||
return
|
||||
}
|
||||
func (r *ChatAutoReplyData) Parse(data *accountFiee.ChatAutoReplyRulerData) {
|
||||
err := json.Unmarshal([]byte(data.Ruler), &r.Rules)
|
||||
log.Printf("ChatAutoReplyData parse err:%v\n", err)
|
||||
r.ID = data.ID
|
||||
r.CreatedAt = data.CreatedAt
|
||||
r.UpdatedAt = data.UpdatedAt
|
||||
r.Title = data.Title
|
||||
r.Status = data.Status
|
||||
r.Response = data.Response
|
||||
}
|
||||
|
||||
type AutoReplyRule struct {
|
||||
Enable bool `json:"enable"`
|
||||
Content string `json:"content,omitempty"`
|
||||
SecondDuration time.Duration `json:"secondDuration,omitempty"`
|
||||
}
|
||||
|
||||
type UserDetailReq struct {
|
||||
ChatUserId int64 `json:"chatUserId"` //注意是聊天用户ID(chat_user表),不是账号服务ID
|
||||
}
|
||||
type UserDetailResp struct {
|
||||
UserId uint64 `json:"userId"`
|
||||
ChatUserId int64 `json:"chatUserId"`
|
||||
RnStatus int32 `json:"rnStatus"` //状态 1:未实名 2:审核中 3:审核失败 4:审核通过
|
||||
SubNum string `json:"subNum"`
|
||||
RealName string `json:"realName"`
|
||||
Age string `json:"age"`
|
||||
Gender string `json:"gender"`
|
||||
NativePlace string `json:"nativePlace"`
|
||||
Phone string `json:"phone"`
|
||||
GroupPhoto string `json:"groupPhoto"`
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user