account_grpc.pb.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package account
  3. import (
  4. context "context"
  5. common "git.ikuban.com/server/pw-protobuf/api/common"
  6. grpc "google.golang.org/grpc"
  7. codes "google.golang.org/grpc/codes"
  8. status "google.golang.org/grpc/status"
  9. )
  10. // This is a compile-time assertion to ensure that this generated file
  11. // is compatible with the grpc package it is being compiled against.
  12. // Requires gRPC-Go v1.32.0 or later.
  13. const _ = grpc.SupportPackageIsVersion7
  14. // AccountClient is the client API for Account service.
  15. //
  16. // 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.
  17. type AccountClient interface {
  18. DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...grpc.CallOption) (*TokenReply, error)
  19. Authorization(ctx context.Context, in *AuthorizationRequest, opts ...grpc.CallOption) (*TokenReply, error)
  20. RandomNickname(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomNicknameReply, error)
  21. RandomAvatar(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarReply, error)
  22. // 通过openID和appID查询
  23. GetIdentityByOpenIDAndAppID(ctx context.Context, in *OpenIDAndAppIDRequest, opts ...grpc.CallOption) (*IdentityInfo, error)
  24. // 通过原公众号openID和appID查询
  25. GetIdentityByFromOpenIDAndAppID(ctx context.Context, in *OpenIDAndAppIDRequest, opts ...grpc.CallOption) (*IdentityInfo, error)
  26. // 通过分组名和性别查询标签
  27. FindTagListBySex(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.TagListReply, error)
  28. // 通过标签IDs查询标签
  29. FindByIDs(ctx context.Context, in *common.Ids, opts ...grpc.CallOption) (*common.TagListReply, error)
  30. // 随机介绍接口
  31. RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.RandomIntroduceReply, error)
  32. // 通过微信下载语音并上传到七牛
  33. UploadMaterialVoice(ctx context.Context, in *MediaID, opts ...grpc.CallOption) (*MaterialLink, error)
  34. }
  35. type accountClient struct {
  36. cc grpc.ClientConnInterface
  37. }
  38. func NewAccountClient(cc grpc.ClientConnInterface) AccountClient {
  39. return &accountClient{cc}
  40. }
  41. func (c *accountClient) DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...grpc.CallOption) (*TokenReply, error) {
  42. out := new(TokenReply)
  43. err := c.cc.Invoke(ctx, "/api.account.Account/DebugLogin", in, out, opts...)
  44. if err != nil {
  45. return nil, err
  46. }
  47. return out, nil
  48. }
  49. func (c *accountClient) Authorization(ctx context.Context, in *AuthorizationRequest, opts ...grpc.CallOption) (*TokenReply, error) {
  50. out := new(TokenReply)
  51. err := c.cc.Invoke(ctx, "/api.account.Account/Authorization", in, out, opts...)
  52. if err != nil {
  53. return nil, err
  54. }
  55. return out, nil
  56. }
  57. func (c *accountClient) RandomNickname(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomNicknameReply, error) {
  58. out := new(RandomNicknameReply)
  59. err := c.cc.Invoke(ctx, "/api.account.Account/RandomNickname", in, out, opts...)
  60. if err != nil {
  61. return nil, err
  62. }
  63. return out, nil
  64. }
  65. func (c *accountClient) RandomAvatar(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarReply, error) {
  66. out := new(RandomAvatarReply)
  67. err := c.cc.Invoke(ctx, "/api.account.Account/RandomAvatar", in, out, opts...)
  68. if err != nil {
  69. return nil, err
  70. }
  71. return out, nil
  72. }
  73. func (c *accountClient) GetIdentityByOpenIDAndAppID(ctx context.Context, in *OpenIDAndAppIDRequest, opts ...grpc.CallOption) (*IdentityInfo, error) {
  74. out := new(IdentityInfo)
  75. err := c.cc.Invoke(ctx, "/api.account.Account/GetIdentityByOpenIDAndAppID", in, out, opts...)
  76. if err != nil {
  77. return nil, err
  78. }
  79. return out, nil
  80. }
  81. func (c *accountClient) GetIdentityByFromOpenIDAndAppID(ctx context.Context, in *OpenIDAndAppIDRequest, opts ...grpc.CallOption) (*IdentityInfo, error) {
  82. out := new(IdentityInfo)
  83. err := c.cc.Invoke(ctx, "/api.account.Account/GetIdentityByFromOpenIDAndAppID", in, out, opts...)
  84. if err != nil {
  85. return nil, err
  86. }
  87. return out, nil
  88. }
  89. func (c *accountClient) FindTagListBySex(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.TagListReply, error) {
  90. out := new(common.TagListReply)
  91. err := c.cc.Invoke(ctx, "/api.account.Account/FindTagListBySex", in, out, opts...)
  92. if err != nil {
  93. return nil, err
  94. }
  95. return out, nil
  96. }
  97. func (c *accountClient) FindByIDs(ctx context.Context, in *common.Ids, opts ...grpc.CallOption) (*common.TagListReply, error) {
  98. out := new(common.TagListReply)
  99. err := c.cc.Invoke(ctx, "/api.account.Account/FindByIDs", in, out, opts...)
  100. if err != nil {
  101. return nil, err
  102. }
  103. return out, nil
  104. }
  105. func (c *accountClient) RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.RandomIntroduceReply, error) {
  106. out := new(common.RandomIntroduceReply)
  107. err := c.cc.Invoke(ctx, "/api.account.Account/RandomIntroduce", in, out, opts...)
  108. if err != nil {
  109. return nil, err
  110. }
  111. return out, nil
  112. }
  113. func (c *accountClient) UploadMaterialVoice(ctx context.Context, in *MediaID, opts ...grpc.CallOption) (*MaterialLink, error) {
  114. out := new(MaterialLink)
  115. err := c.cc.Invoke(ctx, "/api.account.Account/UploadMaterialVoice", in, out, opts...)
  116. if err != nil {
  117. return nil, err
  118. }
  119. return out, nil
  120. }
  121. // AccountServer is the server API for Account service.
  122. // All implementations must embed UnimplementedAccountServer
  123. // for forward compatibility
  124. type AccountServer interface {
  125. DebugLogin(context.Context, *DebugLoginRequest) (*TokenReply, error)
  126. Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error)
  127. RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error)
  128. RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error)
  129. // 通过openID和appID查询
  130. GetIdentityByOpenIDAndAppID(context.Context, *OpenIDAndAppIDRequest) (*IdentityInfo, error)
  131. // 通过原公众号openID和appID查询
  132. GetIdentityByFromOpenIDAndAppID(context.Context, *OpenIDAndAppIDRequest) (*IdentityInfo, error)
  133. // 通过分组名和性别查询标签
  134. FindTagListBySex(context.Context, *common.SexReq) (*common.TagListReply, error)
  135. // 通过标签IDs查询标签
  136. FindByIDs(context.Context, *common.Ids) (*common.TagListReply, error)
  137. // 随机介绍接口
  138. RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error)
  139. // 通过微信下载语音并上传到七牛
  140. UploadMaterialVoice(context.Context, *MediaID) (*MaterialLink, error)
  141. mustEmbedUnimplementedAccountServer()
  142. }
  143. // UnimplementedAccountServer must be embedded to have forward compatible implementations.
  144. type UnimplementedAccountServer struct {
  145. }
  146. func (UnimplementedAccountServer) DebugLogin(context.Context, *DebugLoginRequest) (*TokenReply, error) {
  147. return nil, status.Errorf(codes.Unimplemented, "method DebugLogin not implemented")
  148. }
  149. func (UnimplementedAccountServer) Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error) {
  150. return nil, status.Errorf(codes.Unimplemented, "method Authorization not implemented")
  151. }
  152. func (UnimplementedAccountServer) RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error) {
  153. return nil, status.Errorf(codes.Unimplemented, "method RandomNickname not implemented")
  154. }
  155. func (UnimplementedAccountServer) RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error) {
  156. return nil, status.Errorf(codes.Unimplemented, "method RandomAvatar not implemented")
  157. }
  158. func (UnimplementedAccountServer) GetIdentityByOpenIDAndAppID(context.Context, *OpenIDAndAppIDRequest) (*IdentityInfo, error) {
  159. return nil, status.Errorf(codes.Unimplemented, "method GetIdentityByOpenIDAndAppID not implemented")
  160. }
  161. func (UnimplementedAccountServer) GetIdentityByFromOpenIDAndAppID(context.Context, *OpenIDAndAppIDRequest) (*IdentityInfo, error) {
  162. return nil, status.Errorf(codes.Unimplemented, "method GetIdentityByFromOpenIDAndAppID not implemented")
  163. }
  164. func (UnimplementedAccountServer) FindTagListBySex(context.Context, *common.SexReq) (*common.TagListReply, error) {
  165. return nil, status.Errorf(codes.Unimplemented, "method FindTagListBySex not implemented")
  166. }
  167. func (UnimplementedAccountServer) FindByIDs(context.Context, *common.Ids) (*common.TagListReply, error) {
  168. return nil, status.Errorf(codes.Unimplemented, "method FindByIDs not implemented")
  169. }
  170. func (UnimplementedAccountServer) RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error) {
  171. return nil, status.Errorf(codes.Unimplemented, "method RandomIntroduce not implemented")
  172. }
  173. func (UnimplementedAccountServer) UploadMaterialVoice(context.Context, *MediaID) (*MaterialLink, error) {
  174. return nil, status.Errorf(codes.Unimplemented, "method UploadMaterialVoice not implemented")
  175. }
  176. func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {}
  177. // UnsafeAccountServer may be embedded to opt out of forward compatibility for this service.
  178. // Use of this interface is not recommended, as added methods to AccountServer will
  179. // result in compilation errors.
  180. type UnsafeAccountServer interface {
  181. mustEmbedUnimplementedAccountServer()
  182. }
  183. func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) {
  184. s.RegisterService(&Account_ServiceDesc, srv)
  185. }
  186. func _Account_DebugLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  187. in := new(DebugLoginRequest)
  188. if err := dec(in); err != nil {
  189. return nil, err
  190. }
  191. if interceptor == nil {
  192. return srv.(AccountServer).DebugLogin(ctx, in)
  193. }
  194. info := &grpc.UnaryServerInfo{
  195. Server: srv,
  196. FullMethod: "/api.account.Account/DebugLogin",
  197. }
  198. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  199. return srv.(AccountServer).DebugLogin(ctx, req.(*DebugLoginRequest))
  200. }
  201. return interceptor(ctx, in, info, handler)
  202. }
  203. func _Account_Authorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  204. in := new(AuthorizationRequest)
  205. if err := dec(in); err != nil {
  206. return nil, err
  207. }
  208. if interceptor == nil {
  209. return srv.(AccountServer).Authorization(ctx, in)
  210. }
  211. info := &grpc.UnaryServerInfo{
  212. Server: srv,
  213. FullMethod: "/api.account.Account/Authorization",
  214. }
  215. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  216. return srv.(AccountServer).Authorization(ctx, req.(*AuthorizationRequest))
  217. }
  218. return interceptor(ctx, in, info, handler)
  219. }
  220. func _Account_RandomNickname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  221. in := new(common.SexReq)
  222. if err := dec(in); err != nil {
  223. return nil, err
  224. }
  225. if interceptor == nil {
  226. return srv.(AccountServer).RandomNickname(ctx, in)
  227. }
  228. info := &grpc.UnaryServerInfo{
  229. Server: srv,
  230. FullMethod: "/api.account.Account/RandomNickname",
  231. }
  232. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  233. return srv.(AccountServer).RandomNickname(ctx, req.(*common.SexReq))
  234. }
  235. return interceptor(ctx, in, info, handler)
  236. }
  237. func _Account_RandomAvatar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  238. in := new(common.SexReq)
  239. if err := dec(in); err != nil {
  240. return nil, err
  241. }
  242. if interceptor == nil {
  243. return srv.(AccountServer).RandomAvatar(ctx, in)
  244. }
  245. info := &grpc.UnaryServerInfo{
  246. Server: srv,
  247. FullMethod: "/api.account.Account/RandomAvatar",
  248. }
  249. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  250. return srv.(AccountServer).RandomAvatar(ctx, req.(*common.SexReq))
  251. }
  252. return interceptor(ctx, in, info, handler)
  253. }
  254. func _Account_GetIdentityByOpenIDAndAppID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  255. in := new(OpenIDAndAppIDRequest)
  256. if err := dec(in); err != nil {
  257. return nil, err
  258. }
  259. if interceptor == nil {
  260. return srv.(AccountServer).GetIdentityByOpenIDAndAppID(ctx, in)
  261. }
  262. info := &grpc.UnaryServerInfo{
  263. Server: srv,
  264. FullMethod: "/api.account.Account/GetIdentityByOpenIDAndAppID",
  265. }
  266. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  267. return srv.(AccountServer).GetIdentityByOpenIDAndAppID(ctx, req.(*OpenIDAndAppIDRequest))
  268. }
  269. return interceptor(ctx, in, info, handler)
  270. }
  271. func _Account_GetIdentityByFromOpenIDAndAppID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  272. in := new(OpenIDAndAppIDRequest)
  273. if err := dec(in); err != nil {
  274. return nil, err
  275. }
  276. if interceptor == nil {
  277. return srv.(AccountServer).GetIdentityByFromOpenIDAndAppID(ctx, in)
  278. }
  279. info := &grpc.UnaryServerInfo{
  280. Server: srv,
  281. FullMethod: "/api.account.Account/GetIdentityByFromOpenIDAndAppID",
  282. }
  283. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  284. return srv.(AccountServer).GetIdentityByFromOpenIDAndAppID(ctx, req.(*OpenIDAndAppIDRequest))
  285. }
  286. return interceptor(ctx, in, info, handler)
  287. }
  288. func _Account_FindTagListBySex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  289. in := new(common.SexReq)
  290. if err := dec(in); err != nil {
  291. return nil, err
  292. }
  293. if interceptor == nil {
  294. return srv.(AccountServer).FindTagListBySex(ctx, in)
  295. }
  296. info := &grpc.UnaryServerInfo{
  297. Server: srv,
  298. FullMethod: "/api.account.Account/FindTagListBySex",
  299. }
  300. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  301. return srv.(AccountServer).FindTagListBySex(ctx, req.(*common.SexReq))
  302. }
  303. return interceptor(ctx, in, info, handler)
  304. }
  305. func _Account_FindByIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  306. in := new(common.Ids)
  307. if err := dec(in); err != nil {
  308. return nil, err
  309. }
  310. if interceptor == nil {
  311. return srv.(AccountServer).FindByIDs(ctx, in)
  312. }
  313. info := &grpc.UnaryServerInfo{
  314. Server: srv,
  315. FullMethod: "/api.account.Account/FindByIDs",
  316. }
  317. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  318. return srv.(AccountServer).FindByIDs(ctx, req.(*common.Ids))
  319. }
  320. return interceptor(ctx, in, info, handler)
  321. }
  322. func _Account_RandomIntroduce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  323. in := new(common.SexReq)
  324. if err := dec(in); err != nil {
  325. return nil, err
  326. }
  327. if interceptor == nil {
  328. return srv.(AccountServer).RandomIntroduce(ctx, in)
  329. }
  330. info := &grpc.UnaryServerInfo{
  331. Server: srv,
  332. FullMethod: "/api.account.Account/RandomIntroduce",
  333. }
  334. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  335. return srv.(AccountServer).RandomIntroduce(ctx, req.(*common.SexReq))
  336. }
  337. return interceptor(ctx, in, info, handler)
  338. }
  339. func _Account_UploadMaterialVoice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  340. in := new(MediaID)
  341. if err := dec(in); err != nil {
  342. return nil, err
  343. }
  344. if interceptor == nil {
  345. return srv.(AccountServer).UploadMaterialVoice(ctx, in)
  346. }
  347. info := &grpc.UnaryServerInfo{
  348. Server: srv,
  349. FullMethod: "/api.account.Account/UploadMaterialVoice",
  350. }
  351. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  352. return srv.(AccountServer).UploadMaterialVoice(ctx, req.(*MediaID))
  353. }
  354. return interceptor(ctx, in, info, handler)
  355. }
  356. // Account_ServiceDesc is the grpc.ServiceDesc for Account service.
  357. // It's only intended for direct use with grpc.RegisterService,
  358. // and not to be introspected or modified (even as a copy)
  359. var Account_ServiceDesc = grpc.ServiceDesc{
  360. ServiceName: "api.account.Account",
  361. HandlerType: (*AccountServer)(nil),
  362. Methods: []grpc.MethodDesc{
  363. {
  364. MethodName: "DebugLogin",
  365. Handler: _Account_DebugLogin_Handler,
  366. },
  367. {
  368. MethodName: "Authorization",
  369. Handler: _Account_Authorization_Handler,
  370. },
  371. {
  372. MethodName: "RandomNickname",
  373. Handler: _Account_RandomNickname_Handler,
  374. },
  375. {
  376. MethodName: "RandomAvatar",
  377. Handler: _Account_RandomAvatar_Handler,
  378. },
  379. {
  380. MethodName: "GetIdentityByOpenIDAndAppID",
  381. Handler: _Account_GetIdentityByOpenIDAndAppID_Handler,
  382. },
  383. {
  384. MethodName: "GetIdentityByFromOpenIDAndAppID",
  385. Handler: _Account_GetIdentityByFromOpenIDAndAppID_Handler,
  386. },
  387. {
  388. MethodName: "FindTagListBySex",
  389. Handler: _Account_FindTagListBySex_Handler,
  390. },
  391. {
  392. MethodName: "FindByIDs",
  393. Handler: _Account_FindByIDs_Handler,
  394. },
  395. {
  396. MethodName: "RandomIntroduce",
  397. Handler: _Account_RandomIntroduce_Handler,
  398. },
  399. {
  400. MethodName: "UploadMaterialVoice",
  401. Handler: _Account_UploadMaterialVoice_Handler,
  402. },
  403. },
  404. Streams: []grpc.StreamDesc{},
  405. Metadata: "account.proto",
  406. }