// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.22.3 // source: websocket.proto package websocket import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( Websocket_FindOnlinePerson_FullMethodName = "/api.websocket.Websocket/FindOnlinePerson" Websocket_FindOnlinePersonAll_FullMethodName = "/api.websocket.Websocket/FindOnlinePersonAll" Websocket_FindOnlineCanMatchingPerson_FullMethodName = "/api.websocket.Websocket/FindOnlineCanMatchingPerson" Websocket_SendMsg_FullMethodName = "/api.websocket.Websocket/SendMsg" Websocket_UpdateWorkingStatus_FullMethodName = "/api.websocket.Websocket/UpdateWorkingStatus" Websocket_UpdateWeight_FullMethodName = "/api.websocket.Websocket/UpdateWeight" Websocket_UpdateTodayMatchedNum_FullMethodName = "/api.websocket.Websocket/UpdateTodayMatchedNum" Websocket_CheckIsOnline_FullMethodName = "/api.websocket.Websocket/CheckIsOnline" Websocket_CheckIsOnlineByIDs_FullMethodName = "/api.websocket.Websocket/CheckIsOnlineByIDs" Websocket_FindOnlinePersonNum_FullMethodName = "/api.websocket.Websocket/FindOnlinePersonNum" Websocket_CronCheckConnectTime_FullMethodName = "/api.websocket.Websocket/CronCheckConnectTime" ) // WebsocketClient is the client API for Websocket service. // // 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. type WebsocketClient interface { // 查询在线人数 FindOnlinePerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlinePersonReply, error) // 查询在线人数 FindOnlinePersonAll(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlinePersonReply, error) // 查询在线人数 FindOnlineCanMatchingPerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlineCanMatchingPersonReply, error) // 发送消息 SendMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc.CallOption) (*SendMsgReply, error) // 更新工作状态 UpdateWorkingStatus(ctx context.Context, in *UpdateWorkingStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // 更新权重 UpdateWeight(ctx context.Context, in *UpdateWeightRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // 更新每日被匹配数 UpdateTodayMatchedNum(ctx context.Context, in *UpdateTodayMatchedNumRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // 检查是否在线 CheckIsOnline(ctx context.Context, in *CheckIsOnlineRequest, opts ...grpc.CallOption) (*CheckIsOnlineReply, error) // 检查是否在线 CheckIsOnlineByIDs(ctx context.Context, in *CheckIsOnlineByIDsParam, opts ...grpc.CallOption) (*CheckIsOnlineByIDsParam, error) // 查询在线多少人 FindOnlinePersonNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OnlinePersonReply, error) // 定时检查在线超过一小时的用户并将其下线 CronCheckConnectTime(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) } type websocketClient struct { cc grpc.ClientConnInterface } func NewWebsocketClient(cc grpc.ClientConnInterface) WebsocketClient { return &websocketClient{cc} } func (c *websocketClient) FindOnlinePerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlinePersonReply, error) { out := new(FindOnlinePersonReply) err := c.cc.Invoke(ctx, Websocket_FindOnlinePerson_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *websocketClient) FindOnlinePersonAll(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlinePersonReply, error) { out := new(FindOnlinePersonReply) err := c.cc.Invoke(ctx, Websocket_FindOnlinePersonAll_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *websocketClient) FindOnlineCanMatchingPerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*FindOnlineCanMatchingPersonReply, error) { out := new(FindOnlineCanMatchingPersonReply) err := c.cc.Invoke(ctx, Websocket_FindOnlineCanMatchingPerson_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *websocketClient) SendMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc.CallOption) (*SendMsgReply, error) { out := new(SendMsgReply) err := c.cc.Invoke(ctx, Websocket_SendMsg_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *websocketClient) UpdateWorkingStatus(ctx context.Context, in *UpdateWorkingStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, Websocket_UpdateWorkingStatus_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *websocketClient) UpdateWeight(ctx context.Context, in *UpdateWeightRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, Websocket_UpdateWeight_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *websocketClient) UpdateTodayMatchedNum(ctx context.Context, in *UpdateTodayMatchedNumRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, Websocket_UpdateTodayMatchedNum_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *websocketClient) CheckIsOnline(ctx context.Context, in *CheckIsOnlineRequest, opts ...grpc.CallOption) (*CheckIsOnlineReply, error) { out := new(CheckIsOnlineReply) err := c.cc.Invoke(ctx, Websocket_CheckIsOnline_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *websocketClient) CheckIsOnlineByIDs(ctx context.Context, in *CheckIsOnlineByIDsParam, opts ...grpc.CallOption) (*CheckIsOnlineByIDsParam, error) { out := new(CheckIsOnlineByIDsParam) err := c.cc.Invoke(ctx, Websocket_CheckIsOnlineByIDs_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *websocketClient) FindOnlinePersonNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OnlinePersonReply, error) { out := new(OnlinePersonReply) err := c.cc.Invoke(ctx, Websocket_FindOnlinePersonNum_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *websocketClient) CronCheckConnectTime(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, Websocket_CronCheckConnectTime_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // WebsocketServer is the server API for Websocket service. // All implementations must embed UnimplementedWebsocketServer // for forward compatibility type WebsocketServer interface { // 查询在线人数 FindOnlinePerson(context.Context, *emptypb.Empty) (*FindOnlinePersonReply, error) // 查询在线人数 FindOnlinePersonAll(context.Context, *emptypb.Empty) (*FindOnlinePersonReply, error) // 查询在线人数 FindOnlineCanMatchingPerson(context.Context, *emptypb.Empty) (*FindOnlineCanMatchingPersonReply, error) // 发送消息 SendMsg(context.Context, *SendMsgRequest) (*SendMsgReply, error) // 更新工作状态 UpdateWorkingStatus(context.Context, *UpdateWorkingStatusRequest) (*emptypb.Empty, error) // 更新权重 UpdateWeight(context.Context, *UpdateWeightRequest) (*emptypb.Empty, error) // 更新每日被匹配数 UpdateTodayMatchedNum(context.Context, *UpdateTodayMatchedNumRequest) (*emptypb.Empty, error) // 检查是否在线 CheckIsOnline(context.Context, *CheckIsOnlineRequest) (*CheckIsOnlineReply, error) // 检查是否在线 CheckIsOnlineByIDs(context.Context, *CheckIsOnlineByIDsParam) (*CheckIsOnlineByIDsParam, error) // 查询在线多少人 FindOnlinePersonNum(context.Context, *emptypb.Empty) (*OnlinePersonReply, error) // 定时检查在线超过一小时的用户并将其下线 CronCheckConnectTime(context.Context, *emptypb.Empty) (*emptypb.Empty, error) mustEmbedUnimplementedWebsocketServer() } // UnimplementedWebsocketServer must be embedded to have forward compatible implementations. type UnimplementedWebsocketServer struct { } func (UnimplementedWebsocketServer) FindOnlinePerson(context.Context, *emptypb.Empty) (*FindOnlinePersonReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePerson not implemented") } func (UnimplementedWebsocketServer) FindOnlinePersonAll(context.Context, *emptypb.Empty) (*FindOnlinePersonReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePersonAll not implemented") } func (UnimplementedWebsocketServer) FindOnlineCanMatchingPerson(context.Context, *emptypb.Empty) (*FindOnlineCanMatchingPersonReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindOnlineCanMatchingPerson not implemented") } func (UnimplementedWebsocketServer) SendMsg(context.Context, *SendMsgRequest) (*SendMsgReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SendMsg not implemented") } func (UnimplementedWebsocketServer) UpdateWorkingStatus(context.Context, *UpdateWorkingStatusRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkingStatus not implemented") } func (UnimplementedWebsocketServer) UpdateWeight(context.Context, *UpdateWeightRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateWeight not implemented") } func (UnimplementedWebsocketServer) UpdateTodayMatchedNum(context.Context, *UpdateTodayMatchedNumRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateTodayMatchedNum not implemented") } func (UnimplementedWebsocketServer) CheckIsOnline(context.Context, *CheckIsOnlineRequest) (*CheckIsOnlineReply, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckIsOnline not implemented") } func (UnimplementedWebsocketServer) CheckIsOnlineByIDs(context.Context, *CheckIsOnlineByIDsParam) (*CheckIsOnlineByIDsParam, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckIsOnlineByIDs not implemented") } func (UnimplementedWebsocketServer) FindOnlinePersonNum(context.Context, *emptypb.Empty) (*OnlinePersonReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePersonNum not implemented") } func (UnimplementedWebsocketServer) CronCheckConnectTime(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method CronCheckConnectTime not implemented") } func (UnimplementedWebsocketServer) mustEmbedUnimplementedWebsocketServer() {} // UnsafeWebsocketServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to WebsocketServer will // result in compilation errors. type UnsafeWebsocketServer interface { mustEmbedUnimplementedWebsocketServer() } func RegisterWebsocketServer(s grpc.ServiceRegistrar, srv WebsocketServer) { s.RegisterService(&Websocket_ServiceDesc, srv) } func _Websocket_FindOnlinePerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).FindOnlinePerson(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_FindOnlinePerson_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).FindOnlinePerson(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } func _Websocket_FindOnlinePersonAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).FindOnlinePersonAll(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_FindOnlinePersonAll_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).FindOnlinePersonAll(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } func _Websocket_FindOnlineCanMatchingPerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).FindOnlineCanMatchingPerson(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_FindOnlineCanMatchingPerson_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).FindOnlineCanMatchingPerson(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } func _Websocket_SendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SendMsgRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).SendMsg(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_SendMsg_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).SendMsg(ctx, req.(*SendMsgRequest)) } return interceptor(ctx, in, info, handler) } func _Websocket_UpdateWorkingStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateWorkingStatusRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).UpdateWorkingStatus(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_UpdateWorkingStatus_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).UpdateWorkingStatus(ctx, req.(*UpdateWorkingStatusRequest)) } return interceptor(ctx, in, info, handler) } func _Websocket_UpdateWeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateWeightRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).UpdateWeight(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_UpdateWeight_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).UpdateWeight(ctx, req.(*UpdateWeightRequest)) } return interceptor(ctx, in, info, handler) } func _Websocket_UpdateTodayMatchedNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateTodayMatchedNumRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).UpdateTodayMatchedNum(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_UpdateTodayMatchedNum_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).UpdateTodayMatchedNum(ctx, req.(*UpdateTodayMatchedNumRequest)) } return interceptor(ctx, in, info, handler) } func _Websocket_CheckIsOnline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CheckIsOnlineRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).CheckIsOnline(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_CheckIsOnline_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).CheckIsOnline(ctx, req.(*CheckIsOnlineRequest)) } return interceptor(ctx, in, info, handler) } func _Websocket_CheckIsOnlineByIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CheckIsOnlineByIDsParam) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).CheckIsOnlineByIDs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_CheckIsOnlineByIDs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).CheckIsOnlineByIDs(ctx, req.(*CheckIsOnlineByIDsParam)) } return interceptor(ctx, in, info, handler) } func _Websocket_FindOnlinePersonNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).FindOnlinePersonNum(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_FindOnlinePersonNum_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).FindOnlinePersonNum(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } func _Websocket_CronCheckConnectTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(WebsocketServer).CronCheckConnectTime(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Websocket_CronCheckConnectTime_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WebsocketServer).CronCheckConnectTime(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } // Websocket_ServiceDesc is the grpc.ServiceDesc for Websocket service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Websocket_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.websocket.Websocket", HandlerType: (*WebsocketServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FindOnlinePerson", Handler: _Websocket_FindOnlinePerson_Handler, }, { MethodName: "FindOnlinePersonAll", Handler: _Websocket_FindOnlinePersonAll_Handler, }, { MethodName: "FindOnlineCanMatchingPerson", Handler: _Websocket_FindOnlineCanMatchingPerson_Handler, }, { MethodName: "SendMsg", Handler: _Websocket_SendMsg_Handler, }, { MethodName: "UpdateWorkingStatus", Handler: _Websocket_UpdateWorkingStatus_Handler, }, { MethodName: "UpdateWeight", Handler: _Websocket_UpdateWeight_Handler, }, { MethodName: "UpdateTodayMatchedNum", Handler: _Websocket_UpdateTodayMatchedNum_Handler, }, { MethodName: "CheckIsOnline", Handler: _Websocket_CheckIsOnline_Handler, }, { MethodName: "CheckIsOnlineByIDs", Handler: _Websocket_CheckIsOnlineByIDs_Handler, }, { MethodName: "FindOnlinePersonNum", Handler: _Websocket_FindOnlinePersonNum_Handler, }, { MethodName: "CronCheckConnectTime", Handler: _Websocket_CronCheckConnectTime_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "websocket.proto", }