user_grpc.pb.go 12 KB

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