account_grpc.pb.go 14 KB

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