chat_grpc.pb.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package chat
  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. 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. // ChatClient is the client API for Chat 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 ChatClient interface {
  19. // 检查用户是否与接待员聊天
  20. CheckUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerIdentifyIdParam, opts ...grpc.CallOption) (*CheckUserPartnerIsRelationshipReply, error)
  21. // 创建聊天房间
  22. CreateChatRoom(ctx context.Context, in *CreateChatRoomParam, opts ...grpc.CallOption) (*RoomReply, error)
  23. // 查询在线人的列表
  24. FindOnlinePersonList(ctx context.Context, in *common.ListPageAndPersonRequest, opts ...grpc.CallOption) (*common.OnlinePersonListReply, error)
  25. // 接待员查询房间列表
  26. PartnerFindRoomList(ctx context.Context, in *PartnerFindRoomListRequest, opts ...grpc.CallOption) (*PartnerFindRoomListReply, error)
  27. // 用户查询房间列表
  28. UserFindRoomList(ctx context.Context, in *UserFindRoomListRequest, opts ...grpc.CallOption) (*UserFindRoomListReply, error)
  29. Receive(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (*ReceiveReply, error)
  30. // 查询聊天记录
  31. FindChatRecordList(ctx context.Context, in *FindChatRecordListRequest, opts ...grpc.CallOption) (*common.ChatRecordListReply, error)
  32. // 房间信息
  33. FindChatRoomMsg(ctx context.Context, in *FindChatRoomMsgRequest, opts ...grpc.CallOption) (*common.ChatRoomMsg, error)
  34. // 拉黑
  35. SetBlackChat(ctx context.Context, in *SetBlackChatParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
  36. // 拉黑
  37. Report(ctx context.Context, in *common.ReportRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  38. }
  39. type chatClient struct {
  40. cc grpc.ClientConnInterface
  41. }
  42. func NewChatClient(cc grpc.ClientConnInterface) ChatClient {
  43. return &chatClient{cc}
  44. }
  45. func (c *chatClient) CheckUserPartnerIsRelationship(ctx context.Context, in *common.UserAndPartnerIdentifyIdParam, opts ...grpc.CallOption) (*CheckUserPartnerIsRelationshipReply, error) {
  46. out := new(CheckUserPartnerIsRelationshipReply)
  47. err := c.cc.Invoke(ctx, "/api.chat.Chat/CheckUserPartnerIsRelationship", in, out, opts...)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return out, nil
  52. }
  53. func (c *chatClient) CreateChatRoom(ctx context.Context, in *CreateChatRoomParam, opts ...grpc.CallOption) (*RoomReply, error) {
  54. out := new(RoomReply)
  55. err := c.cc.Invoke(ctx, "/api.chat.Chat/CreateChatRoom", in, out, opts...)
  56. if err != nil {
  57. return nil, err
  58. }
  59. return out, nil
  60. }
  61. func (c *chatClient) FindOnlinePersonList(ctx context.Context, in *common.ListPageAndPersonRequest, opts ...grpc.CallOption) (*common.OnlinePersonListReply, error) {
  62. out := new(common.OnlinePersonListReply)
  63. err := c.cc.Invoke(ctx, "/api.chat.Chat/FindOnlinePersonList", in, out, opts...)
  64. if err != nil {
  65. return nil, err
  66. }
  67. return out, nil
  68. }
  69. func (c *chatClient) PartnerFindRoomList(ctx context.Context, in *PartnerFindRoomListRequest, opts ...grpc.CallOption) (*PartnerFindRoomListReply, error) {
  70. out := new(PartnerFindRoomListReply)
  71. err := c.cc.Invoke(ctx, "/api.chat.Chat/PartnerFindRoomList", in, out, opts...)
  72. if err != nil {
  73. return nil, err
  74. }
  75. return out, nil
  76. }
  77. func (c *chatClient) UserFindRoomList(ctx context.Context, in *UserFindRoomListRequest, opts ...grpc.CallOption) (*UserFindRoomListReply, error) {
  78. out := new(UserFindRoomListReply)
  79. err := c.cc.Invoke(ctx, "/api.chat.Chat/UserFindRoomList", in, out, opts...)
  80. if err != nil {
  81. return nil, err
  82. }
  83. return out, nil
  84. }
  85. func (c *chatClient) Receive(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (*ReceiveReply, error) {
  86. out := new(ReceiveReply)
  87. err := c.cc.Invoke(ctx, "/api.chat.Chat/Receive", in, out, opts...)
  88. if err != nil {
  89. return nil, err
  90. }
  91. return out, nil
  92. }
  93. func (c *chatClient) FindChatRecordList(ctx context.Context, in *FindChatRecordListRequest, opts ...grpc.CallOption) (*common.ChatRecordListReply, error) {
  94. out := new(common.ChatRecordListReply)
  95. err := c.cc.Invoke(ctx, "/api.chat.Chat/FindChatRecordList", in, out, opts...)
  96. if err != nil {
  97. return nil, err
  98. }
  99. return out, nil
  100. }
  101. func (c *chatClient) FindChatRoomMsg(ctx context.Context, in *FindChatRoomMsgRequest, opts ...grpc.CallOption) (*common.ChatRoomMsg, error) {
  102. out := new(common.ChatRoomMsg)
  103. err := c.cc.Invoke(ctx, "/api.chat.Chat/FindChatRoomMsg", in, out, opts...)
  104. if err != nil {
  105. return nil, err
  106. }
  107. return out, nil
  108. }
  109. func (c *chatClient) SetBlackChat(ctx context.Context, in *SetBlackChatParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  110. out := new(emptypb.Empty)
  111. err := c.cc.Invoke(ctx, "/api.chat.Chat/SetBlackChat", in, out, opts...)
  112. if err != nil {
  113. return nil, err
  114. }
  115. return out, nil
  116. }
  117. func (c *chatClient) Report(ctx context.Context, in *common.ReportRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  118. out := new(emptypb.Empty)
  119. err := c.cc.Invoke(ctx, "/api.chat.Chat/Report", in, out, opts...)
  120. if err != nil {
  121. return nil, err
  122. }
  123. return out, nil
  124. }
  125. // ChatServer is the server API for Chat service.
  126. // All implementations must embed UnimplementedChatServer
  127. // for forward compatibility
  128. type ChatServer interface {
  129. // 检查用户是否与接待员聊天
  130. CheckUserPartnerIsRelationship(context.Context, *common.UserAndPartnerIdentifyIdParam) (*CheckUserPartnerIsRelationshipReply, error)
  131. // 创建聊天房间
  132. CreateChatRoom(context.Context, *CreateChatRoomParam) (*RoomReply, error)
  133. // 查询在线人的列表
  134. FindOnlinePersonList(context.Context, *common.ListPageAndPersonRequest) (*common.OnlinePersonListReply, error)
  135. // 接待员查询房间列表
  136. PartnerFindRoomList(context.Context, *PartnerFindRoomListRequest) (*PartnerFindRoomListReply, error)
  137. // 用户查询房间列表
  138. UserFindRoomList(context.Context, *UserFindRoomListRequest) (*UserFindRoomListReply, error)
  139. Receive(context.Context, *ReceiveRequest) (*ReceiveReply, error)
  140. // 查询聊天记录
  141. FindChatRecordList(context.Context, *FindChatRecordListRequest) (*common.ChatRecordListReply, error)
  142. // 房间信息
  143. FindChatRoomMsg(context.Context, *FindChatRoomMsgRequest) (*common.ChatRoomMsg, error)
  144. // 拉黑
  145. SetBlackChat(context.Context, *SetBlackChatParam) (*emptypb.Empty, error)
  146. // 拉黑
  147. Report(context.Context, *common.ReportRequest) (*emptypb.Empty, error)
  148. mustEmbedUnimplementedChatServer()
  149. }
  150. // UnimplementedChatServer must be embedded to have forward compatible implementations.
  151. type UnimplementedChatServer struct {
  152. }
  153. func (UnimplementedChatServer) CheckUserPartnerIsRelationship(context.Context, *common.UserAndPartnerIdentifyIdParam) (*CheckUserPartnerIsRelationshipReply, error) {
  154. return nil, status.Errorf(codes.Unimplemented, "method CheckUserPartnerIsRelationship not implemented")
  155. }
  156. func (UnimplementedChatServer) CreateChatRoom(context.Context, *CreateChatRoomParam) (*RoomReply, error) {
  157. return nil, status.Errorf(codes.Unimplemented, "method CreateChatRoom not implemented")
  158. }
  159. func (UnimplementedChatServer) FindOnlinePersonList(context.Context, *common.ListPageAndPersonRequest) (*common.OnlinePersonListReply, error) {
  160. return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePersonList not implemented")
  161. }
  162. func (UnimplementedChatServer) PartnerFindRoomList(context.Context, *PartnerFindRoomListRequest) (*PartnerFindRoomListReply, error) {
  163. return nil, status.Errorf(codes.Unimplemented, "method PartnerFindRoomList not implemented")
  164. }
  165. func (UnimplementedChatServer) UserFindRoomList(context.Context, *UserFindRoomListRequest) (*UserFindRoomListReply, error) {
  166. return nil, status.Errorf(codes.Unimplemented, "method UserFindRoomList not implemented")
  167. }
  168. func (UnimplementedChatServer) Receive(context.Context, *ReceiveRequest) (*ReceiveReply, error) {
  169. return nil, status.Errorf(codes.Unimplemented, "method Receive not implemented")
  170. }
  171. func (UnimplementedChatServer) FindChatRecordList(context.Context, *FindChatRecordListRequest) (*common.ChatRecordListReply, error) {
  172. return nil, status.Errorf(codes.Unimplemented, "method FindChatRecordList not implemented")
  173. }
  174. func (UnimplementedChatServer) FindChatRoomMsg(context.Context, *FindChatRoomMsgRequest) (*common.ChatRoomMsg, error) {
  175. return nil, status.Errorf(codes.Unimplemented, "method FindChatRoomMsg not implemented")
  176. }
  177. func (UnimplementedChatServer) SetBlackChat(context.Context, *SetBlackChatParam) (*emptypb.Empty, error) {
  178. return nil, status.Errorf(codes.Unimplemented, "method SetBlackChat not implemented")
  179. }
  180. func (UnimplementedChatServer) Report(context.Context, *common.ReportRequest) (*emptypb.Empty, error) {
  181. return nil, status.Errorf(codes.Unimplemented, "method Report not implemented")
  182. }
  183. func (UnimplementedChatServer) mustEmbedUnimplementedChatServer() {}
  184. // UnsafeChatServer may be embedded to opt out of forward compatibility for this service.
  185. // Use of this interface is not recommended, as added methods to ChatServer will
  186. // result in compilation errors.
  187. type UnsafeChatServer interface {
  188. mustEmbedUnimplementedChatServer()
  189. }
  190. func RegisterChatServer(s grpc.ServiceRegistrar, srv ChatServer) {
  191. s.RegisterService(&Chat_ServiceDesc, srv)
  192. }
  193. func _Chat_CheckUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  194. in := new(common.UserAndPartnerIdentifyIdParam)
  195. if err := dec(in); err != nil {
  196. return nil, err
  197. }
  198. if interceptor == nil {
  199. return srv.(ChatServer).CheckUserPartnerIsRelationship(ctx, in)
  200. }
  201. info := &grpc.UnaryServerInfo{
  202. Server: srv,
  203. FullMethod: "/api.chat.Chat/CheckUserPartnerIsRelationship",
  204. }
  205. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  206. return srv.(ChatServer).CheckUserPartnerIsRelationship(ctx, req.(*common.UserAndPartnerIdentifyIdParam))
  207. }
  208. return interceptor(ctx, in, info, handler)
  209. }
  210. func _Chat_CreateChatRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  211. in := new(CreateChatRoomParam)
  212. if err := dec(in); err != nil {
  213. return nil, err
  214. }
  215. if interceptor == nil {
  216. return srv.(ChatServer).CreateChatRoom(ctx, in)
  217. }
  218. info := &grpc.UnaryServerInfo{
  219. Server: srv,
  220. FullMethod: "/api.chat.Chat/CreateChatRoom",
  221. }
  222. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  223. return srv.(ChatServer).CreateChatRoom(ctx, req.(*CreateChatRoomParam))
  224. }
  225. return interceptor(ctx, in, info, handler)
  226. }
  227. func _Chat_FindOnlinePersonList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  228. in := new(common.ListPageAndPersonRequest)
  229. if err := dec(in); err != nil {
  230. return nil, err
  231. }
  232. if interceptor == nil {
  233. return srv.(ChatServer).FindOnlinePersonList(ctx, in)
  234. }
  235. info := &grpc.UnaryServerInfo{
  236. Server: srv,
  237. FullMethod: "/api.chat.Chat/FindOnlinePersonList",
  238. }
  239. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  240. return srv.(ChatServer).FindOnlinePersonList(ctx, req.(*common.ListPageAndPersonRequest))
  241. }
  242. return interceptor(ctx, in, info, handler)
  243. }
  244. func _Chat_PartnerFindRoomList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  245. in := new(PartnerFindRoomListRequest)
  246. if err := dec(in); err != nil {
  247. return nil, err
  248. }
  249. if interceptor == nil {
  250. return srv.(ChatServer).PartnerFindRoomList(ctx, in)
  251. }
  252. info := &grpc.UnaryServerInfo{
  253. Server: srv,
  254. FullMethod: "/api.chat.Chat/PartnerFindRoomList",
  255. }
  256. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  257. return srv.(ChatServer).PartnerFindRoomList(ctx, req.(*PartnerFindRoomListRequest))
  258. }
  259. return interceptor(ctx, in, info, handler)
  260. }
  261. func _Chat_UserFindRoomList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  262. in := new(UserFindRoomListRequest)
  263. if err := dec(in); err != nil {
  264. return nil, err
  265. }
  266. if interceptor == nil {
  267. return srv.(ChatServer).UserFindRoomList(ctx, in)
  268. }
  269. info := &grpc.UnaryServerInfo{
  270. Server: srv,
  271. FullMethod: "/api.chat.Chat/UserFindRoomList",
  272. }
  273. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  274. return srv.(ChatServer).UserFindRoomList(ctx, req.(*UserFindRoomListRequest))
  275. }
  276. return interceptor(ctx, in, info, handler)
  277. }
  278. func _Chat_Receive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  279. in := new(ReceiveRequest)
  280. if err := dec(in); err != nil {
  281. return nil, err
  282. }
  283. if interceptor == nil {
  284. return srv.(ChatServer).Receive(ctx, in)
  285. }
  286. info := &grpc.UnaryServerInfo{
  287. Server: srv,
  288. FullMethod: "/api.chat.Chat/Receive",
  289. }
  290. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  291. return srv.(ChatServer).Receive(ctx, req.(*ReceiveRequest))
  292. }
  293. return interceptor(ctx, in, info, handler)
  294. }
  295. func _Chat_FindChatRecordList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  296. in := new(FindChatRecordListRequest)
  297. if err := dec(in); err != nil {
  298. return nil, err
  299. }
  300. if interceptor == nil {
  301. return srv.(ChatServer).FindChatRecordList(ctx, in)
  302. }
  303. info := &grpc.UnaryServerInfo{
  304. Server: srv,
  305. FullMethod: "/api.chat.Chat/FindChatRecordList",
  306. }
  307. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  308. return srv.(ChatServer).FindChatRecordList(ctx, req.(*FindChatRecordListRequest))
  309. }
  310. return interceptor(ctx, in, info, handler)
  311. }
  312. func _Chat_FindChatRoomMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  313. in := new(FindChatRoomMsgRequest)
  314. if err := dec(in); err != nil {
  315. return nil, err
  316. }
  317. if interceptor == nil {
  318. return srv.(ChatServer).FindChatRoomMsg(ctx, in)
  319. }
  320. info := &grpc.UnaryServerInfo{
  321. Server: srv,
  322. FullMethod: "/api.chat.Chat/FindChatRoomMsg",
  323. }
  324. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  325. return srv.(ChatServer).FindChatRoomMsg(ctx, req.(*FindChatRoomMsgRequest))
  326. }
  327. return interceptor(ctx, in, info, handler)
  328. }
  329. func _Chat_SetBlackChat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  330. in := new(SetBlackChatParam)
  331. if err := dec(in); err != nil {
  332. return nil, err
  333. }
  334. if interceptor == nil {
  335. return srv.(ChatServer).SetBlackChat(ctx, in)
  336. }
  337. info := &grpc.UnaryServerInfo{
  338. Server: srv,
  339. FullMethod: "/api.chat.Chat/SetBlackChat",
  340. }
  341. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  342. return srv.(ChatServer).SetBlackChat(ctx, req.(*SetBlackChatParam))
  343. }
  344. return interceptor(ctx, in, info, handler)
  345. }
  346. func _Chat_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  347. in := new(common.ReportRequest)
  348. if err := dec(in); err != nil {
  349. return nil, err
  350. }
  351. if interceptor == nil {
  352. return srv.(ChatServer).Report(ctx, in)
  353. }
  354. info := &grpc.UnaryServerInfo{
  355. Server: srv,
  356. FullMethod: "/api.chat.Chat/Report",
  357. }
  358. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  359. return srv.(ChatServer).Report(ctx, req.(*common.ReportRequest))
  360. }
  361. return interceptor(ctx, in, info, handler)
  362. }
  363. // Chat_ServiceDesc is the grpc.ServiceDesc for Chat service.
  364. // It's only intended for direct use with grpc.RegisterService,
  365. // and not to be introspected or modified (even as a copy)
  366. var Chat_ServiceDesc = grpc.ServiceDesc{
  367. ServiceName: "api.chat.Chat",
  368. HandlerType: (*ChatServer)(nil),
  369. Methods: []grpc.MethodDesc{
  370. {
  371. MethodName: "CheckUserPartnerIsRelationship",
  372. Handler: _Chat_CheckUserPartnerIsRelationship_Handler,
  373. },
  374. {
  375. MethodName: "CreateChatRoom",
  376. Handler: _Chat_CreateChatRoom_Handler,
  377. },
  378. {
  379. MethodName: "FindOnlinePersonList",
  380. Handler: _Chat_FindOnlinePersonList_Handler,
  381. },
  382. {
  383. MethodName: "PartnerFindRoomList",
  384. Handler: _Chat_PartnerFindRoomList_Handler,
  385. },
  386. {
  387. MethodName: "UserFindRoomList",
  388. Handler: _Chat_UserFindRoomList_Handler,
  389. },
  390. {
  391. MethodName: "Receive",
  392. Handler: _Chat_Receive_Handler,
  393. },
  394. {
  395. MethodName: "FindChatRecordList",
  396. Handler: _Chat_FindChatRecordList_Handler,
  397. },
  398. {
  399. MethodName: "FindChatRoomMsg",
  400. Handler: _Chat_FindChatRoomMsg_Handler,
  401. },
  402. {
  403. MethodName: "SetBlackChat",
  404. Handler: _Chat_SetBlackChat_Handler,
  405. },
  406. {
  407. MethodName: "Report",
  408. Handler: _Chat_Report_Handler,
  409. },
  410. },
  411. Streams: []grpc.StreamDesc{},
  412. Metadata: "chat.proto",
  413. }