user_grpc.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package user
  3. import (
  4. context "context"
  5. base "git.ikuban.com/server/pw-protobuf/api/base"
  6. chat "git.ikuban.com/server/pw-protobuf/api/chat"
  7. partner "git.ikuban.com/server/pw-protobuf/api/partner"
  8. grpc "google.golang.org/grpc"
  9. codes "google.golang.org/grpc/codes"
  10. status "google.golang.org/grpc/status"
  11. emptypb "google.golang.org/protobuf/types/known/emptypb"
  12. )
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the grpc package it is being compiled against.
  15. // Requires gRPC-Go v1.32.0 or later.
  16. const _ = grpc.SupportPackageIsVersion7
  17. // UserClient is the client API for User service.
  18. //
  19. // 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.
  20. type UserClient interface {
  21. DebugLogin(ctx context.Context, in *base.DebugLoginRequest, opts ...grpc.CallOption) (*base.TokenReply, error)
  22. Authorization(ctx context.Context, in *base.AuthorizationRequest, opts ...grpc.CallOption) (*base.TokenReply, error)
  23. UpdateUserInformation(ctx context.Context, in *UpdateUserInformationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  24. GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error)
  25. SendPhoneCode(ctx context.Context, in *SendPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  26. CheckPhoneCode(ctx context.Context, in *CheckPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  27. CheckUserPartnerIsRelationship(ctx context.Context, in *CheckUserPartnerIsRelationshipRequest, opts ...grpc.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error)
  28. GetPartnerCircleInfo(ctx context.Context, in *partner.GetPartnerCircleInfoReq, opts ...grpc.CallOption) (*partner.PartnerCircleInfo, error)
  29. }
  30. type userClient struct {
  31. cc grpc.ClientConnInterface
  32. }
  33. func NewUserClient(cc grpc.ClientConnInterface) UserClient {
  34. return &userClient{cc}
  35. }
  36. func (c *userClient) DebugLogin(ctx context.Context, in *base.DebugLoginRequest, opts ...grpc.CallOption) (*base.TokenReply, error) {
  37. out := new(base.TokenReply)
  38. err := c.cc.Invoke(ctx, "/api.user.User/DebugLogin", in, out, opts...)
  39. if err != nil {
  40. return nil, err
  41. }
  42. return out, nil
  43. }
  44. func (c *userClient) Authorization(ctx context.Context, in *base.AuthorizationRequest, opts ...grpc.CallOption) (*base.TokenReply, error) {
  45. out := new(base.TokenReply)
  46. err := c.cc.Invoke(ctx, "/api.user.User/Authorization", in, out, opts...)
  47. if err != nil {
  48. return nil, err
  49. }
  50. return out, nil
  51. }
  52. func (c *userClient) UpdateUserInformation(ctx context.Context, in *UpdateUserInformationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  53. out := new(emptypb.Empty)
  54. err := c.cc.Invoke(ctx, "/api.user.User/UpdateUserInformation", in, out, opts...)
  55. if err != nil {
  56. return nil, err
  57. }
  58. return out, nil
  59. }
  60. func (c *userClient) GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error) {
  61. out := new(UserInfo)
  62. err := c.cc.Invoke(ctx, "/api.user.User/GetUserInfo", in, out, opts...)
  63. if err != nil {
  64. return nil, err
  65. }
  66. return out, nil
  67. }
  68. func (c *userClient) SendPhoneCode(ctx context.Context, in *SendPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  69. out := new(emptypb.Empty)
  70. err := c.cc.Invoke(ctx, "/api.user.User/SendPhoneCode", in, out, opts...)
  71. if err != nil {
  72. return nil, err
  73. }
  74. return out, nil
  75. }
  76. func (c *userClient) CheckPhoneCode(ctx context.Context, in *CheckPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  77. out := new(emptypb.Empty)
  78. err := c.cc.Invoke(ctx, "/api.user.User/CheckPhoneCode", in, out, opts...)
  79. if err != nil {
  80. return nil, err
  81. }
  82. return out, nil
  83. }
  84. func (c *userClient) CheckUserPartnerIsRelationship(ctx context.Context, in *CheckUserPartnerIsRelationshipRequest, opts ...grpc.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error) {
  85. out := new(chat.CheckUserPartnerIsRelationshipReply)
  86. err := c.cc.Invoke(ctx, "/api.user.User/CheckUserPartnerIsRelationship", in, out, opts...)
  87. if err != nil {
  88. return nil, err
  89. }
  90. return out, nil
  91. }
  92. func (c *userClient) GetPartnerCircleInfo(ctx context.Context, in *partner.GetPartnerCircleInfoReq, opts ...grpc.CallOption) (*partner.PartnerCircleInfo, error) {
  93. out := new(partner.PartnerCircleInfo)
  94. err := c.cc.Invoke(ctx, "/api.user.User/GetPartnerCircleInfo", in, out, opts...)
  95. if err != nil {
  96. return nil, err
  97. }
  98. return out, nil
  99. }
  100. // UserServer is the server API for User service.
  101. // All implementations must embed UnimplementedUserServer
  102. // for forward compatibility
  103. type UserServer interface {
  104. DebugLogin(context.Context, *base.DebugLoginRequest) (*base.TokenReply, error)
  105. Authorization(context.Context, *base.AuthorizationRequest) (*base.TokenReply, error)
  106. UpdateUserInformation(context.Context, *UpdateUserInformationRequest) (*emptypb.Empty, error)
  107. GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
  108. SendPhoneCode(context.Context, *SendPhoneCodeRequest) (*emptypb.Empty, error)
  109. CheckPhoneCode(context.Context, *CheckPhoneCodeRequest) (*emptypb.Empty, error)
  110. CheckUserPartnerIsRelationship(context.Context, *CheckUserPartnerIsRelationshipRequest) (*chat.CheckUserPartnerIsRelationshipReply, error)
  111. GetPartnerCircleInfo(context.Context, *partner.GetPartnerCircleInfoReq) (*partner.PartnerCircleInfo, error)
  112. mustEmbedUnimplementedUserServer()
  113. }
  114. // UnimplementedUserServer must be embedded to have forward compatible implementations.
  115. type UnimplementedUserServer struct {
  116. }
  117. func (UnimplementedUserServer) DebugLogin(context.Context, *base.DebugLoginRequest) (*base.TokenReply, error) {
  118. return nil, status.Errorf(codes.Unimplemented, "method DebugLogin not implemented")
  119. }
  120. func (UnimplementedUserServer) Authorization(context.Context, *base.AuthorizationRequest) (*base.TokenReply, error) {
  121. return nil, status.Errorf(codes.Unimplemented, "method Authorization not implemented")
  122. }
  123. func (UnimplementedUserServer) UpdateUserInformation(context.Context, *UpdateUserInformationRequest) (*emptypb.Empty, error) {
  124. return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInformation not implemented")
  125. }
  126. func (UnimplementedUserServer) GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error) {
  127. return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented")
  128. }
  129. func (UnimplementedUserServer) SendPhoneCode(context.Context, *SendPhoneCodeRequest) (*emptypb.Empty, error) {
  130. return nil, status.Errorf(codes.Unimplemented, "method SendPhoneCode not implemented")
  131. }
  132. func (UnimplementedUserServer) CheckPhoneCode(context.Context, *CheckPhoneCodeRequest) (*emptypb.Empty, error) {
  133. return nil, status.Errorf(codes.Unimplemented, "method CheckPhoneCode not implemented")
  134. }
  135. func (UnimplementedUserServer) CheckUserPartnerIsRelationship(context.Context, *CheckUserPartnerIsRelationshipRequest) (*chat.CheckUserPartnerIsRelationshipReply, error) {
  136. return nil, status.Errorf(codes.Unimplemented, "method CheckUserPartnerIsRelationship not implemented")
  137. }
  138. func (UnimplementedUserServer) GetPartnerCircleInfo(context.Context, *partner.GetPartnerCircleInfoReq) (*partner.PartnerCircleInfo, error) {
  139. return nil, status.Errorf(codes.Unimplemented, "method GetPartnerCircleInfo not implemented")
  140. }
  141. func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
  142. // UnsafeUserServer may be embedded to opt out of forward compatibility for this service.
  143. // Use of this interface is not recommended, as added methods to UserServer will
  144. // result in compilation errors.
  145. type UnsafeUserServer interface {
  146. mustEmbedUnimplementedUserServer()
  147. }
  148. func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer) {
  149. s.RegisterService(&User_ServiceDesc, srv)
  150. }
  151. func _User_DebugLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  152. in := new(base.DebugLoginRequest)
  153. if err := dec(in); err != nil {
  154. return nil, err
  155. }
  156. if interceptor == nil {
  157. return srv.(UserServer).DebugLogin(ctx, in)
  158. }
  159. info := &grpc.UnaryServerInfo{
  160. Server: srv,
  161. FullMethod: "/api.user.User/DebugLogin",
  162. }
  163. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  164. return srv.(UserServer).DebugLogin(ctx, req.(*base.DebugLoginRequest))
  165. }
  166. return interceptor(ctx, in, info, handler)
  167. }
  168. func _User_Authorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  169. in := new(base.AuthorizationRequest)
  170. if err := dec(in); err != nil {
  171. return nil, err
  172. }
  173. if interceptor == nil {
  174. return srv.(UserServer).Authorization(ctx, in)
  175. }
  176. info := &grpc.UnaryServerInfo{
  177. Server: srv,
  178. FullMethod: "/api.user.User/Authorization",
  179. }
  180. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  181. return srv.(UserServer).Authorization(ctx, req.(*base.AuthorizationRequest))
  182. }
  183. return interceptor(ctx, in, info, handler)
  184. }
  185. func _User_UpdateUserInformation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  186. in := new(UpdateUserInformationRequest)
  187. if err := dec(in); err != nil {
  188. return nil, err
  189. }
  190. if interceptor == nil {
  191. return srv.(UserServer).UpdateUserInformation(ctx, in)
  192. }
  193. info := &grpc.UnaryServerInfo{
  194. Server: srv,
  195. FullMethod: "/api.user.User/UpdateUserInformation",
  196. }
  197. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  198. return srv.(UserServer).UpdateUserInformation(ctx, req.(*UpdateUserInformationRequest))
  199. }
  200. return interceptor(ctx, in, info, handler)
  201. }
  202. func _User_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  203. in := new(emptypb.Empty)
  204. if err := dec(in); err != nil {
  205. return nil, err
  206. }
  207. if interceptor == nil {
  208. return srv.(UserServer).GetUserInfo(ctx, in)
  209. }
  210. info := &grpc.UnaryServerInfo{
  211. Server: srv,
  212. FullMethod: "/api.user.User/GetUserInfo",
  213. }
  214. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  215. return srv.(UserServer).GetUserInfo(ctx, req.(*emptypb.Empty))
  216. }
  217. return interceptor(ctx, in, info, handler)
  218. }
  219. func _User_SendPhoneCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  220. in := new(SendPhoneCodeRequest)
  221. if err := dec(in); err != nil {
  222. return nil, err
  223. }
  224. if interceptor == nil {
  225. return srv.(UserServer).SendPhoneCode(ctx, in)
  226. }
  227. info := &grpc.UnaryServerInfo{
  228. Server: srv,
  229. FullMethod: "/api.user.User/SendPhoneCode",
  230. }
  231. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  232. return srv.(UserServer).SendPhoneCode(ctx, req.(*SendPhoneCodeRequest))
  233. }
  234. return interceptor(ctx, in, info, handler)
  235. }
  236. func _User_CheckPhoneCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  237. in := new(CheckPhoneCodeRequest)
  238. if err := dec(in); err != nil {
  239. return nil, err
  240. }
  241. if interceptor == nil {
  242. return srv.(UserServer).CheckPhoneCode(ctx, in)
  243. }
  244. info := &grpc.UnaryServerInfo{
  245. Server: srv,
  246. FullMethod: "/api.user.User/CheckPhoneCode",
  247. }
  248. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  249. return srv.(UserServer).CheckPhoneCode(ctx, req.(*CheckPhoneCodeRequest))
  250. }
  251. return interceptor(ctx, in, info, handler)
  252. }
  253. func _User_CheckUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  254. in := new(CheckUserPartnerIsRelationshipRequest)
  255. if err := dec(in); err != nil {
  256. return nil, err
  257. }
  258. if interceptor == nil {
  259. return srv.(UserServer).CheckUserPartnerIsRelationship(ctx, in)
  260. }
  261. info := &grpc.UnaryServerInfo{
  262. Server: srv,
  263. FullMethod: "/api.user.User/CheckUserPartnerIsRelationship",
  264. }
  265. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  266. return srv.(UserServer).CheckUserPartnerIsRelationship(ctx, req.(*CheckUserPartnerIsRelationshipRequest))
  267. }
  268. return interceptor(ctx, in, info, handler)
  269. }
  270. func _User_GetPartnerCircleInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  271. in := new(partner.GetPartnerCircleInfoReq)
  272. if err := dec(in); err != nil {
  273. return nil, err
  274. }
  275. if interceptor == nil {
  276. return srv.(UserServer).GetPartnerCircleInfo(ctx, in)
  277. }
  278. info := &grpc.UnaryServerInfo{
  279. Server: srv,
  280. FullMethod: "/api.user.User/GetPartnerCircleInfo",
  281. }
  282. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  283. return srv.(UserServer).GetPartnerCircleInfo(ctx, req.(*partner.GetPartnerCircleInfoReq))
  284. }
  285. return interceptor(ctx, in, info, handler)
  286. }
  287. // User_ServiceDesc is the grpc.ServiceDesc for User service.
  288. // It's only intended for direct use with grpc.RegisterService,
  289. // and not to be introspected or modified (even as a copy)
  290. var User_ServiceDesc = grpc.ServiceDesc{
  291. ServiceName: "api.user.User",
  292. HandlerType: (*UserServer)(nil),
  293. Methods: []grpc.MethodDesc{
  294. {
  295. MethodName: "DebugLogin",
  296. Handler: _User_DebugLogin_Handler,
  297. },
  298. {
  299. MethodName: "Authorization",
  300. Handler: _User_Authorization_Handler,
  301. },
  302. {
  303. MethodName: "UpdateUserInformation",
  304. Handler: _User_UpdateUserInformation_Handler,
  305. },
  306. {
  307. MethodName: "GetUserInfo",
  308. Handler: _User_GetUserInfo_Handler,
  309. },
  310. {
  311. MethodName: "SendPhoneCode",
  312. Handler: _User_SendPhoneCode_Handler,
  313. },
  314. {
  315. MethodName: "CheckPhoneCode",
  316. Handler: _User_CheckPhoneCode_Handler,
  317. },
  318. {
  319. MethodName: "CheckUserPartnerIsRelationship",
  320. Handler: _User_CheckUserPartnerIsRelationship_Handler,
  321. },
  322. {
  323. MethodName: "GetPartnerCircleInfo",
  324. Handler: _User_GetPartnerCircleInfo_Handler,
  325. },
  326. },
  327. Streams: []grpc.StreamDesc{},
  328. Metadata: "user.proto",
  329. }