user_grpc.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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. common "git.ikuban.com/server/pw-protobuf/api/common"
  7. grpc "google.golang.org/grpc"
  8. codes "google.golang.org/grpc/codes"
  9. status "google.golang.org/grpc/status"
  10. emptypb "google.golang.org/protobuf/types/known/emptypb"
  11. )
  12. // This is a compile-time assertion to ensure that this generated file
  13. // is compatible with the grpc package it is being compiled against.
  14. // Requires gRPC-Go v1.32.0 or later.
  15. const _ = grpc.SupportPackageIsVersion7
  16. // UserClient is the client API for User service.
  17. //
  18. // 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.
  19. type UserClient interface {
  20. // 更新用户信息
  21. UpdateUserInformation(ctx context.Context, in *UpdateUserInformationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  22. // 获取用户详情
  23. GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error)
  24. // 检查用户是否与陪聊关联
  25. CheckUserPartnerIsRelationship(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error)
  26. // 创建用户与陪聊的关联
  27. CreateUserPartnerIsRelationship(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*chat.CreateUserPartnerIsRelationshipReply, error)
  28. // 获取陪聊的确认通过页面信息
  29. GetPartnerCircleInfo(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*common.AddFriendMessageInfo, error)
  30. // 用户获取主页信息
  31. UserGetHomeInfo(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*common.HomeInfo, error)
  32. // 通过用户IDs查看用户信息列表
  33. FindUserDBList(ctx context.Context, in *common.PersonIDList, opts ...grpc.CallOption) (*common.PersonDBReply, error)
  34. }
  35. type userClient struct {
  36. cc grpc.ClientConnInterface
  37. }
  38. func NewUserClient(cc grpc.ClientConnInterface) UserClient {
  39. return &userClient{cc}
  40. }
  41. func (c *userClient) UpdateUserInformation(ctx context.Context, in *UpdateUserInformationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  42. out := new(emptypb.Empty)
  43. err := c.cc.Invoke(ctx, "/api.user.User/UpdateUserInformation", in, out, opts...)
  44. if err != nil {
  45. return nil, err
  46. }
  47. return out, nil
  48. }
  49. func (c *userClient) GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error) {
  50. out := new(UserInfo)
  51. err := c.cc.Invoke(ctx, "/api.user.User/GetUserInfo", in, out, opts...)
  52. if err != nil {
  53. return nil, err
  54. }
  55. return out, nil
  56. }
  57. func (c *userClient) CheckUserPartnerIsRelationship(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error) {
  58. out := new(chat.CheckUserPartnerIsRelationshipReply)
  59. err := c.cc.Invoke(ctx, "/api.user.User/CheckUserPartnerIsRelationship", in, out, opts...)
  60. if err != nil {
  61. return nil, err
  62. }
  63. return out, nil
  64. }
  65. func (c *userClient) CreateUserPartnerIsRelationship(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*chat.CreateUserPartnerIsRelationshipReply, error) {
  66. out := new(chat.CreateUserPartnerIsRelationshipReply)
  67. err := c.cc.Invoke(ctx, "/api.user.User/CreateUserPartnerIsRelationship", in, out, opts...)
  68. if err != nil {
  69. return nil, err
  70. }
  71. return out, nil
  72. }
  73. func (c *userClient) GetPartnerCircleInfo(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*common.AddFriendMessageInfo, error) {
  74. out := new(common.AddFriendMessageInfo)
  75. err := c.cc.Invoke(ctx, "/api.user.User/GetPartnerCircleInfo", in, out, opts...)
  76. if err != nil {
  77. return nil, err
  78. }
  79. return out, nil
  80. }
  81. func (c *userClient) UserGetHomeInfo(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*common.HomeInfo, error) {
  82. out := new(common.HomeInfo)
  83. err := c.cc.Invoke(ctx, "/api.user.User/UserGetHomeInfo", in, out, opts...)
  84. if err != nil {
  85. return nil, err
  86. }
  87. return out, nil
  88. }
  89. func (c *userClient) FindUserDBList(ctx context.Context, in *common.PersonIDList, opts ...grpc.CallOption) (*common.PersonDBReply, error) {
  90. out := new(common.PersonDBReply)
  91. err := c.cc.Invoke(ctx, "/api.user.User/FindUserDBList", in, out, opts...)
  92. if err != nil {
  93. return nil, err
  94. }
  95. return out, nil
  96. }
  97. // UserServer is the server API for User service.
  98. // All implementations must embed UnimplementedUserServer
  99. // for forward compatibility
  100. type UserServer interface {
  101. // 更新用户信息
  102. UpdateUserInformation(context.Context, *UpdateUserInformationRequest) (*emptypb.Empty, error)
  103. // 获取用户详情
  104. GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
  105. // 检查用户是否与陪聊关联
  106. CheckUserPartnerIsRelationship(context.Context, *common.PartnerIDParam) (*chat.CheckUserPartnerIsRelationshipReply, error)
  107. // 创建用户与陪聊的关联
  108. CreateUserPartnerIsRelationship(context.Context, *common.PartnerIDParam) (*chat.CreateUserPartnerIsRelationshipReply, error)
  109. // 获取陪聊的确认通过页面信息
  110. GetPartnerCircleInfo(context.Context, *common.PartnerIDParam) (*common.AddFriendMessageInfo, error)
  111. // 用户获取主页信息
  112. UserGetHomeInfo(context.Context, *common.PersonParam) (*common.HomeInfo, error)
  113. // 通过用户IDs查看用户信息列表
  114. FindUserDBList(context.Context, *common.PersonIDList) (*common.PersonDBReply, error)
  115. mustEmbedUnimplementedUserServer()
  116. }
  117. // UnimplementedUserServer must be embedded to have forward compatible implementations.
  118. type UnimplementedUserServer struct {
  119. }
  120. func (UnimplementedUserServer) UpdateUserInformation(context.Context, *UpdateUserInformationRequest) (*emptypb.Empty, error) {
  121. return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInformation not implemented")
  122. }
  123. func (UnimplementedUserServer) GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error) {
  124. return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented")
  125. }
  126. func (UnimplementedUserServer) CheckUserPartnerIsRelationship(context.Context, *common.PartnerIDParam) (*chat.CheckUserPartnerIsRelationshipReply, error) {
  127. return nil, status.Errorf(codes.Unimplemented, "method CheckUserPartnerIsRelationship not implemented")
  128. }
  129. func (UnimplementedUserServer) CreateUserPartnerIsRelationship(context.Context, *common.PartnerIDParam) (*chat.CreateUserPartnerIsRelationshipReply, error) {
  130. return nil, status.Errorf(codes.Unimplemented, "method CreateUserPartnerIsRelationship not implemented")
  131. }
  132. func (UnimplementedUserServer) GetPartnerCircleInfo(context.Context, *common.PartnerIDParam) (*common.AddFriendMessageInfo, error) {
  133. return nil, status.Errorf(codes.Unimplemented, "method GetPartnerCircleInfo not implemented")
  134. }
  135. func (UnimplementedUserServer) UserGetHomeInfo(context.Context, *common.PersonParam) (*common.HomeInfo, error) {
  136. return nil, status.Errorf(codes.Unimplemented, "method UserGetHomeInfo not implemented")
  137. }
  138. func (UnimplementedUserServer) FindUserDBList(context.Context, *common.PersonIDList) (*common.PersonDBReply, error) {
  139. return nil, status.Errorf(codes.Unimplemented, "method FindUserDBList 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_UpdateUserInformation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  152. in := new(UpdateUserInformationRequest)
  153. if err := dec(in); err != nil {
  154. return nil, err
  155. }
  156. if interceptor == nil {
  157. return srv.(UserServer).UpdateUserInformation(ctx, in)
  158. }
  159. info := &grpc.UnaryServerInfo{
  160. Server: srv,
  161. FullMethod: "/api.user.User/UpdateUserInformation",
  162. }
  163. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  164. return srv.(UserServer).UpdateUserInformation(ctx, req.(*UpdateUserInformationRequest))
  165. }
  166. return interceptor(ctx, in, info, handler)
  167. }
  168. func _User_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  169. in := new(emptypb.Empty)
  170. if err := dec(in); err != nil {
  171. return nil, err
  172. }
  173. if interceptor == nil {
  174. return srv.(UserServer).GetUserInfo(ctx, in)
  175. }
  176. info := &grpc.UnaryServerInfo{
  177. Server: srv,
  178. FullMethod: "/api.user.User/GetUserInfo",
  179. }
  180. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  181. return srv.(UserServer).GetUserInfo(ctx, req.(*emptypb.Empty))
  182. }
  183. return interceptor(ctx, in, info, handler)
  184. }
  185. func _User_CheckUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  186. in := new(common.PartnerIDParam)
  187. if err := dec(in); err != nil {
  188. return nil, err
  189. }
  190. if interceptor == nil {
  191. return srv.(UserServer).CheckUserPartnerIsRelationship(ctx, in)
  192. }
  193. info := &grpc.UnaryServerInfo{
  194. Server: srv,
  195. FullMethod: "/api.user.User/CheckUserPartnerIsRelationship",
  196. }
  197. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  198. return srv.(UserServer).CheckUserPartnerIsRelationship(ctx, req.(*common.PartnerIDParam))
  199. }
  200. return interceptor(ctx, in, info, handler)
  201. }
  202. func _User_CreateUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  203. in := new(common.PartnerIDParam)
  204. if err := dec(in); err != nil {
  205. return nil, err
  206. }
  207. if interceptor == nil {
  208. return srv.(UserServer).CreateUserPartnerIsRelationship(ctx, in)
  209. }
  210. info := &grpc.UnaryServerInfo{
  211. Server: srv,
  212. FullMethod: "/api.user.User/CreateUserPartnerIsRelationship",
  213. }
  214. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  215. return srv.(UserServer).CreateUserPartnerIsRelationship(ctx, req.(*common.PartnerIDParam))
  216. }
  217. return interceptor(ctx, in, info, handler)
  218. }
  219. func _User_GetPartnerCircleInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  220. in := new(common.PartnerIDParam)
  221. if err := dec(in); err != nil {
  222. return nil, err
  223. }
  224. if interceptor == nil {
  225. return srv.(UserServer).GetPartnerCircleInfo(ctx, in)
  226. }
  227. info := &grpc.UnaryServerInfo{
  228. Server: srv,
  229. FullMethod: "/api.user.User/GetPartnerCircleInfo",
  230. }
  231. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  232. return srv.(UserServer).GetPartnerCircleInfo(ctx, req.(*common.PartnerIDParam))
  233. }
  234. return interceptor(ctx, in, info, handler)
  235. }
  236. func _User_UserGetHomeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  237. in := new(common.PersonParam)
  238. if err := dec(in); err != nil {
  239. return nil, err
  240. }
  241. if interceptor == nil {
  242. return srv.(UserServer).UserGetHomeInfo(ctx, in)
  243. }
  244. info := &grpc.UnaryServerInfo{
  245. Server: srv,
  246. FullMethod: "/api.user.User/UserGetHomeInfo",
  247. }
  248. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  249. return srv.(UserServer).UserGetHomeInfo(ctx, req.(*common.PersonParam))
  250. }
  251. return interceptor(ctx, in, info, handler)
  252. }
  253. func _User_FindUserDBList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  254. in := new(common.PersonIDList)
  255. if err := dec(in); err != nil {
  256. return nil, err
  257. }
  258. if interceptor == nil {
  259. return srv.(UserServer).FindUserDBList(ctx, in)
  260. }
  261. info := &grpc.UnaryServerInfo{
  262. Server: srv,
  263. FullMethod: "/api.user.User/FindUserDBList",
  264. }
  265. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  266. return srv.(UserServer).FindUserDBList(ctx, req.(*common.PersonIDList))
  267. }
  268. return interceptor(ctx, in, info, handler)
  269. }
  270. // User_ServiceDesc is the grpc.ServiceDesc for User service.
  271. // It's only intended for direct use with grpc.RegisterService,
  272. // and not to be introspected or modified (even as a copy)
  273. var User_ServiceDesc = grpc.ServiceDesc{
  274. ServiceName: "api.user.User",
  275. HandlerType: (*UserServer)(nil),
  276. Methods: []grpc.MethodDesc{
  277. {
  278. MethodName: "UpdateUserInformation",
  279. Handler: _User_UpdateUserInformation_Handler,
  280. },
  281. {
  282. MethodName: "GetUserInfo",
  283. Handler: _User_GetUserInfo_Handler,
  284. },
  285. {
  286. MethodName: "CheckUserPartnerIsRelationship",
  287. Handler: _User_CheckUserPartnerIsRelationship_Handler,
  288. },
  289. {
  290. MethodName: "CreateUserPartnerIsRelationship",
  291. Handler: _User_CreateUserPartnerIsRelationship_Handler,
  292. },
  293. {
  294. MethodName: "GetPartnerCircleInfo",
  295. Handler: _User_GetPartnerCircleInfo_Handler,
  296. },
  297. {
  298. MethodName: "UserGetHomeInfo",
  299. Handler: _User_UserGetHomeInfo_Handler,
  300. },
  301. {
  302. MethodName: "FindUserDBList",
  303. Handler: _User_FindUserDBList_Handler,
  304. },
  305. },
  306. Streams: []grpc.StreamDesc{},
  307. Metadata: "user.proto",
  308. }