chat_grpc.pb.go 11 KB

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