chat_grpc.pb.go 14 KB

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