user_grpc.pb.go 15 KB

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