account_grpc.pb.go 15 KB

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