websocket_grpc.pb.go 16 KB

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