chat_grpc.pb.go 13 KB

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