websocket_grpc.pb.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package websocket
  3. import (
  4. context "context"
  5. grpc "google.golang.org/grpc"
  6. codes "google.golang.org/grpc/codes"
  7. status "google.golang.org/grpc/status"
  8. emptypb "google.golang.org/protobuf/types/known/emptypb"
  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. // WebsocketClient is the client API for Websocket 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 WebsocketClient interface {
  18. // 查询在线人数
  19. FindOnlinePerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlinePersonReply, error)
  20. // 查询在线人数
  21. FindOnlinePersonAll(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlinePersonReply, error)
  22. // 查询在线人数
  23. FindOnlineCanMatchingPerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlineCanMatchingPersonReply, error)
  24. // 发送消息
  25. SendMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc.CallOption) (*SendMsgReply, error)
  26. // 更新工作状态
  27. UpdateWorkingStatus(ctx context.Context, in *UpdateWorkingStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  28. // 更新权重
  29. UpdateWeight(ctx context.Context, in *UpdateWeightRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  30. // 更新每日被匹配数
  31. UpdateTodayMatchedNum(ctx context.Context, in *UpdateTodayMatchedNumRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
  32. // 检查是否在线
  33. CheckIsOnline(ctx context.Context, in *CheckIsOnlineRequest, opts ...grpc.CallOption) (*CheckIsOnlineReply, error)
  34. // 检查是否在线
  35. CheckIsOnlineByIDs(ctx context.Context, in *CheckIsOnlineByIDsParam, opts ...grpc.CallOption) (*CheckIsOnlineByIDsParam, error)
  36. // 查询在线多少人
  37. FindOnlinePersonNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OnlinePersonReply, error)
  38. }
  39. type websocketClient struct {
  40. cc grpc.ClientConnInterface
  41. }
  42. func NewWebsocketClient(cc grpc.ClientConnInterface) WebsocketClient {
  43. return &websocketClient{cc}
  44. }
  45. func (c *websocketClient) FindOnlinePerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlinePersonReply, error) {
  46. out := new(FindOnlinePersonReply)
  47. err := c.cc.Invoke(ctx, "/api.websocket.Websocket/FindOnlinePerson", in, out, opts...)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return out, nil
  52. }
  53. func (c *websocketClient) FindOnlinePersonAll(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlinePersonReply, error) {
  54. out := new(FindOnlinePersonReply)
  55. err := c.cc.Invoke(ctx, "/api.websocket.Websocket/FindOnlinePersonAll", in, out, opts...)
  56. if err != nil {
  57. return nil, err
  58. }
  59. return out, nil
  60. }
  61. func (c *websocketClient) FindOnlineCanMatchingPerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlineCanMatchingPersonReply, error) {
  62. out := new(FindOnlineCanMatchingPersonReply)
  63. err := c.cc.Invoke(ctx, "/api.websocket.Websocket/FindOnlineCanMatchingPerson", in, out, opts...)
  64. if err != nil {
  65. return nil, err
  66. }
  67. return out, nil
  68. }
  69. func (c *websocketClient) SendMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc.CallOption) (*SendMsgReply, error) {
  70. out := new(SendMsgReply)
  71. err := c.cc.Invoke(ctx, "/api.websocket.Websocket/SendMsg", in, out, opts...)
  72. if err != nil {
  73. return nil, err
  74. }
  75. return out, nil
  76. }
  77. func (c *websocketClient) UpdateWorkingStatus(ctx context.Context, in *UpdateWorkingStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  78. out := new(emptypb.Empty)
  79. err := c.cc.Invoke(ctx, "/api.websocket.Websocket/UpdateWorkingStatus", in, out, opts...)
  80. if err != nil {
  81. return nil, err
  82. }
  83. return out, nil
  84. }
  85. func (c *websocketClient) UpdateWeight(ctx context.Context, in *UpdateWeightRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  86. out := new(emptypb.Empty)
  87. err := c.cc.Invoke(ctx, "/api.websocket.Websocket/UpdateWeight", in, out, opts...)
  88. if err != nil {
  89. return nil, err
  90. }
  91. return out, nil
  92. }
  93. func (c *websocketClient) UpdateTodayMatchedNum(ctx context.Context, in *UpdateTodayMatchedNumRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
  94. out := new(emptypb.Empty)
  95. err := c.cc.Invoke(ctx, "/api.websocket.Websocket/UpdateTodayMatchedNum", in, out, opts...)
  96. if err != nil {
  97. return nil, err
  98. }
  99. return out, nil
  100. }
  101. func (c *websocketClient) CheckIsOnline(ctx context.Context, in *CheckIsOnlineRequest, opts ...grpc.CallOption) (*CheckIsOnlineReply, error) {
  102. out := new(CheckIsOnlineReply)
  103. err := c.cc.Invoke(ctx, "/api.websocket.Websocket/CheckIsOnline", in, out, opts...)
  104. if err != nil {
  105. return nil, err
  106. }
  107. return out, nil
  108. }
  109. func (c *websocketClient) CheckIsOnlineByIDs(ctx context.Context, in *CheckIsOnlineByIDsParam, opts ...grpc.CallOption) (*CheckIsOnlineByIDsParam, error) {
  110. out := new(CheckIsOnlineByIDsParam)
  111. err := c.cc.Invoke(ctx, "/api.websocket.Websocket/CheckIsOnlineByIDs", in, out, opts...)
  112. if err != nil {
  113. return nil, err
  114. }
  115. return out, nil
  116. }
  117. func (c *websocketClient) FindOnlinePersonNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OnlinePersonReply, error) {
  118. out := new(OnlinePersonReply)
  119. err := c.cc.Invoke(ctx, "/api.websocket.Websocket/FindOnlinePersonNum", in, out, opts...)
  120. if err != nil {
  121. return nil, err
  122. }
  123. return out, nil
  124. }
  125. // WebsocketServer is the server API for Websocket service.
  126. // All implementations must embed UnimplementedWebsocketServer
  127. // for forward compatibility
  128. type WebsocketServer interface {
  129. // 查询在线人数
  130. FindOnlinePerson(context.Context, *emptypb.Empty) (*FindOnlinePersonReply, error)
  131. // 查询在线人数
  132. FindOnlinePersonAll(context.Context, *emptypb.Empty) (*FindOnlinePersonReply, error)
  133. // 查询在线人数
  134. FindOnlineCanMatchingPerson(context.Context, *emptypb.Empty) (*FindOnlineCanMatchingPersonReply, error)
  135. // 发送消息
  136. SendMsg(context.Context, *SendMsgRequest) (*SendMsgReply, error)
  137. // 更新工作状态
  138. UpdateWorkingStatus(context.Context, *UpdateWorkingStatusRequest) (*emptypb.Empty, error)
  139. // 更新权重
  140. UpdateWeight(context.Context, *UpdateWeightRequest) (*emptypb.Empty, error)
  141. // 更新每日被匹配数
  142. UpdateTodayMatchedNum(context.Context, *UpdateTodayMatchedNumRequest) (*emptypb.Empty, error)
  143. // 检查是否在线
  144. CheckIsOnline(context.Context, *CheckIsOnlineRequest) (*CheckIsOnlineReply, error)
  145. // 检查是否在线
  146. CheckIsOnlineByIDs(context.Context, *CheckIsOnlineByIDsParam) (*CheckIsOnlineByIDsParam, error)
  147. // 查询在线多少人
  148. FindOnlinePersonNum(context.Context, *emptypb.Empty) (*OnlinePersonReply, error)
  149. mustEmbedUnimplementedWebsocketServer()
  150. }
  151. // UnimplementedWebsocketServer must be embedded to have forward compatible implementations.
  152. type UnimplementedWebsocketServer struct {
  153. }
  154. func (UnimplementedWebsocketServer) FindOnlinePerson(context.Context, *emptypb.Empty) (*FindOnlinePersonReply, error) {
  155. return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePerson not implemented")
  156. }
  157. func (UnimplementedWebsocketServer) FindOnlinePersonAll(context.Context, *emptypb.Empty) (*FindOnlinePersonReply, error) {
  158. return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePersonAll not implemented")
  159. }
  160. func (UnimplementedWebsocketServer) FindOnlineCanMatchingPerson(context.Context, *emptypb.Empty) (*FindOnlineCanMatchingPersonReply, error) {
  161. return nil, status.Errorf(codes.Unimplemented, "method FindOnlineCanMatchingPerson not implemented")
  162. }
  163. func (UnimplementedWebsocketServer) SendMsg(context.Context, *SendMsgRequest) (*SendMsgReply, error) {
  164. return nil, status.Errorf(codes.Unimplemented, "method SendMsg not implemented")
  165. }
  166. func (UnimplementedWebsocketServer) UpdateWorkingStatus(context.Context, *UpdateWorkingStatusRequest) (*emptypb.Empty, error) {
  167. return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkingStatus not implemented")
  168. }
  169. func (UnimplementedWebsocketServer) UpdateWeight(context.Context, *UpdateWeightRequest) (*emptypb.Empty, error) {
  170. return nil, status.Errorf(codes.Unimplemented, "method UpdateWeight not implemented")
  171. }
  172. func (UnimplementedWebsocketServer) UpdateTodayMatchedNum(context.Context, *UpdateTodayMatchedNumRequest) (*emptypb.Empty, error) {
  173. return nil, status.Errorf(codes.Unimplemented, "method UpdateTodayMatchedNum not implemented")
  174. }
  175. func (UnimplementedWebsocketServer) CheckIsOnline(context.Context, *CheckIsOnlineRequest) (*CheckIsOnlineReply, error) {
  176. return nil, status.Errorf(codes.Unimplemented, "method CheckIsOnline not implemented")
  177. }
  178. func (UnimplementedWebsocketServer) CheckIsOnlineByIDs(context.Context, *CheckIsOnlineByIDsParam) (*CheckIsOnlineByIDsParam, error) {
  179. return nil, status.Errorf(codes.Unimplemented, "method CheckIsOnlineByIDs not implemented")
  180. }
  181. func (UnimplementedWebsocketServer) FindOnlinePersonNum(context.Context, *emptypb.Empty) (*OnlinePersonReply, error) {
  182. return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePersonNum not implemented")
  183. }
  184. func (UnimplementedWebsocketServer) mustEmbedUnimplementedWebsocketServer() {}
  185. // UnsafeWebsocketServer may be embedded to opt out of forward compatibility for this service.
  186. // Use of this interface is not recommended, as added methods to WebsocketServer will
  187. // result in compilation errors.
  188. type UnsafeWebsocketServer interface {
  189. mustEmbedUnimplementedWebsocketServer()
  190. }
  191. func RegisterWebsocketServer(s grpc.ServiceRegistrar, srv WebsocketServer) {
  192. s.RegisterService(&Websocket_ServiceDesc, srv)
  193. }
  194. func _Websocket_FindOnlinePerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  195. in := new(emptypb.Empty)
  196. if err := dec(in); err != nil {
  197. return nil, err
  198. }
  199. if interceptor == nil {
  200. return srv.(WebsocketServer).FindOnlinePerson(ctx, in)
  201. }
  202. info := &grpc.UnaryServerInfo{
  203. Server: srv,
  204. FullMethod: "/api.websocket.Websocket/FindOnlinePerson",
  205. }
  206. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  207. return srv.(WebsocketServer).FindOnlinePerson(ctx, req.(*emptypb.Empty))
  208. }
  209. return interceptor(ctx, in, info, handler)
  210. }
  211. func _Websocket_FindOnlinePersonAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  212. in := new(emptypb.Empty)
  213. if err := dec(in); err != nil {
  214. return nil, err
  215. }
  216. if interceptor == nil {
  217. return srv.(WebsocketServer).FindOnlinePersonAll(ctx, in)
  218. }
  219. info := &grpc.UnaryServerInfo{
  220. Server: srv,
  221. FullMethod: "/api.websocket.Websocket/FindOnlinePersonAll",
  222. }
  223. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  224. return srv.(WebsocketServer).FindOnlinePersonAll(ctx, req.(*emptypb.Empty))
  225. }
  226. return interceptor(ctx, in, info, handler)
  227. }
  228. func _Websocket_FindOnlineCanMatchingPerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  229. in := new(emptypb.Empty)
  230. if err := dec(in); err != nil {
  231. return nil, err
  232. }
  233. if interceptor == nil {
  234. return srv.(WebsocketServer).FindOnlineCanMatchingPerson(ctx, in)
  235. }
  236. info := &grpc.UnaryServerInfo{
  237. Server: srv,
  238. FullMethod: "/api.websocket.Websocket/FindOnlineCanMatchingPerson",
  239. }
  240. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  241. return srv.(WebsocketServer).FindOnlineCanMatchingPerson(ctx, req.(*emptypb.Empty))
  242. }
  243. return interceptor(ctx, in, info, handler)
  244. }
  245. func _Websocket_SendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  246. in := new(SendMsgRequest)
  247. if err := dec(in); err != nil {
  248. return nil, err
  249. }
  250. if interceptor == nil {
  251. return srv.(WebsocketServer).SendMsg(ctx, in)
  252. }
  253. info := &grpc.UnaryServerInfo{
  254. Server: srv,
  255. FullMethod: "/api.websocket.Websocket/SendMsg",
  256. }
  257. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  258. return srv.(WebsocketServer).SendMsg(ctx, req.(*SendMsgRequest))
  259. }
  260. return interceptor(ctx, in, info, handler)
  261. }
  262. func _Websocket_UpdateWorkingStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  263. in := new(UpdateWorkingStatusRequest)
  264. if err := dec(in); err != nil {
  265. return nil, err
  266. }
  267. if interceptor == nil {
  268. return srv.(WebsocketServer).UpdateWorkingStatus(ctx, in)
  269. }
  270. info := &grpc.UnaryServerInfo{
  271. Server: srv,
  272. FullMethod: "/api.websocket.Websocket/UpdateWorkingStatus",
  273. }
  274. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  275. return srv.(WebsocketServer).UpdateWorkingStatus(ctx, req.(*UpdateWorkingStatusRequest))
  276. }
  277. return interceptor(ctx, in, info, handler)
  278. }
  279. func _Websocket_UpdateWeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  280. in := new(UpdateWeightRequest)
  281. if err := dec(in); err != nil {
  282. return nil, err
  283. }
  284. if interceptor == nil {
  285. return srv.(WebsocketServer).UpdateWeight(ctx, in)
  286. }
  287. info := &grpc.UnaryServerInfo{
  288. Server: srv,
  289. FullMethod: "/api.websocket.Websocket/UpdateWeight",
  290. }
  291. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  292. return srv.(WebsocketServer).UpdateWeight(ctx, req.(*UpdateWeightRequest))
  293. }
  294. return interceptor(ctx, in, info, handler)
  295. }
  296. func _Websocket_UpdateTodayMatchedNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  297. in := new(UpdateTodayMatchedNumRequest)
  298. if err := dec(in); err != nil {
  299. return nil, err
  300. }
  301. if interceptor == nil {
  302. return srv.(WebsocketServer).UpdateTodayMatchedNum(ctx, in)
  303. }
  304. info := &grpc.UnaryServerInfo{
  305. Server: srv,
  306. FullMethod: "/api.websocket.Websocket/UpdateTodayMatchedNum",
  307. }
  308. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  309. return srv.(WebsocketServer).UpdateTodayMatchedNum(ctx, req.(*UpdateTodayMatchedNumRequest))
  310. }
  311. return interceptor(ctx, in, info, handler)
  312. }
  313. func _Websocket_CheckIsOnline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  314. in := new(CheckIsOnlineRequest)
  315. if err := dec(in); err != nil {
  316. return nil, err
  317. }
  318. if interceptor == nil {
  319. return srv.(WebsocketServer).CheckIsOnline(ctx, in)
  320. }
  321. info := &grpc.UnaryServerInfo{
  322. Server: srv,
  323. FullMethod: "/api.websocket.Websocket/CheckIsOnline",
  324. }
  325. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  326. return srv.(WebsocketServer).CheckIsOnline(ctx, req.(*CheckIsOnlineRequest))
  327. }
  328. return interceptor(ctx, in, info, handler)
  329. }
  330. func _Websocket_CheckIsOnlineByIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  331. in := new(CheckIsOnlineByIDsParam)
  332. if err := dec(in); err != nil {
  333. return nil, err
  334. }
  335. if interceptor == nil {
  336. return srv.(WebsocketServer).CheckIsOnlineByIDs(ctx, in)
  337. }
  338. info := &grpc.UnaryServerInfo{
  339. Server: srv,
  340. FullMethod: "/api.websocket.Websocket/CheckIsOnlineByIDs",
  341. }
  342. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  343. return srv.(WebsocketServer).CheckIsOnlineByIDs(ctx, req.(*CheckIsOnlineByIDsParam))
  344. }
  345. return interceptor(ctx, in, info, handler)
  346. }
  347. func _Websocket_FindOnlinePersonNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  348. in := new(emptypb.Empty)
  349. if err := dec(in); err != nil {
  350. return nil, err
  351. }
  352. if interceptor == nil {
  353. return srv.(WebsocketServer).FindOnlinePersonNum(ctx, in)
  354. }
  355. info := &grpc.UnaryServerInfo{
  356. Server: srv,
  357. FullMethod: "/api.websocket.Websocket/FindOnlinePersonNum",
  358. }
  359. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  360. return srv.(WebsocketServer).FindOnlinePersonNum(ctx, req.(*emptypb.Empty))
  361. }
  362. return interceptor(ctx, in, info, handler)
  363. }
  364. // Websocket_ServiceDesc is the grpc.ServiceDesc for Websocket service.
  365. // It's only intended for direct use with grpc.RegisterService,
  366. // and not to be introspected or modified (even as a copy)
  367. var Websocket_ServiceDesc = grpc.ServiceDesc{
  368. ServiceName: "api.websocket.Websocket",
  369. HandlerType: (*WebsocketServer)(nil),
  370. Methods: []grpc.MethodDesc{
  371. {
  372. MethodName: "FindOnlinePerson",
  373. Handler: _Websocket_FindOnlinePerson_Handler,
  374. },
  375. {
  376. MethodName: "FindOnlinePersonAll",
  377. Handler: _Websocket_FindOnlinePersonAll_Handler,
  378. },
  379. {
  380. MethodName: "FindOnlineCanMatchingPerson",
  381. Handler: _Websocket_FindOnlineCanMatchingPerson_Handler,
  382. },
  383. {
  384. MethodName: "SendMsg",
  385. Handler: _Websocket_SendMsg_Handler,
  386. },
  387. {
  388. MethodName: "UpdateWorkingStatus",
  389. Handler: _Websocket_UpdateWorkingStatus_Handler,
  390. },
  391. {
  392. MethodName: "UpdateWeight",
  393. Handler: _Websocket_UpdateWeight_Handler,
  394. },
  395. {
  396. MethodName: "UpdateTodayMatchedNum",
  397. Handler: _Websocket_UpdateTodayMatchedNum_Handler,
  398. },
  399. {
  400. MethodName: "CheckIsOnline",
  401. Handler: _Websocket_CheckIsOnline_Handler,
  402. },
  403. {
  404. MethodName: "CheckIsOnlineByIDs",
  405. Handler: _Websocket_CheckIsOnlineByIDs_Handler,
  406. },
  407. {
  408. MethodName: "FindOnlinePersonNum",
  409. Handler: _Websocket_FindOnlinePersonNum_Handler,
  410. },
  411. },
  412. Streams: []grpc.StreamDesc{},
  413. Metadata: "websocket.proto",
  414. }