| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- package online
- 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
- // OnlineClient is the client API for Online 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 OnlineClient interface {
- // 用户上线
- UserOnline(ctx context.Context, in *UserOnlineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
- // 发送消息
- SendMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc.CallOption) (*SendMsgReply, error)
- // 检查是否在线
- CheckIsOnline(ctx context.Context, in *CheckIsOnlineRequest, opts ...grpc.CallOption) (*CheckIsOnlineReply, error)
- // 检查是否在线
- CheckIsOnlineByIDs(ctx context.Context, in *CheckIsOnlineByIDsParam, opts ...grpc.CallOption) (*CheckIsOnlineByIDsParam, error)
- // 查询在线用户信息列表
- FindOnlinePerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OnlinePersonMessageReply, error)
- // 查询可以匹配的在线用户信息列表
- FindOnlineCanMatchingPerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OnlinePersonMessageReply, error)
- // 查询在线多少人
- FindOnlinePersonNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OnlinePersonReply, 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)
- }
- type onlineClient struct {
- cc grpc.ClientConnInterface
- }
- func NewOnlineClient(cc grpc.ClientConnInterface) OnlineClient {
- return &onlineClient{cc}
- }
- func (c *onlineClient) UserOnline(ctx context.Context, in *UserOnlineRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, "/api.online.Online/UserOnline", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *onlineClient) SendMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc.CallOption) (*SendMsgReply, error) {
- out := new(SendMsgReply)
- err := c.cc.Invoke(ctx, "/api.online.Online/SendMsg", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *onlineClient) CheckIsOnline(ctx context.Context, in *CheckIsOnlineRequest, opts ...grpc.CallOption) (*CheckIsOnlineReply, error) {
- out := new(CheckIsOnlineReply)
- err := c.cc.Invoke(ctx, "/api.online.Online/CheckIsOnline", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *onlineClient) CheckIsOnlineByIDs(ctx context.Context, in *CheckIsOnlineByIDsParam, opts ...grpc.CallOption) (*CheckIsOnlineByIDsParam, error) {
- out := new(CheckIsOnlineByIDsParam)
- err := c.cc.Invoke(ctx, "/api.online.Online/CheckIsOnlineByIDs", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *onlineClient) FindOnlinePerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OnlinePersonMessageReply, error) {
- out := new(OnlinePersonMessageReply)
- err := c.cc.Invoke(ctx, "/api.online.Online/FindOnlinePerson", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *onlineClient) FindOnlineCanMatchingPerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OnlinePersonMessageReply, error) {
- out := new(OnlinePersonMessageReply)
- err := c.cc.Invoke(ctx, "/api.online.Online/FindOnlineCanMatchingPerson", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *onlineClient) FindOnlinePersonNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*OnlinePersonReply, error) {
- out := new(OnlinePersonReply)
- err := c.cc.Invoke(ctx, "/api.online.Online/FindOnlinePersonNum", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *onlineClient) UpdateWorkingStatus(ctx context.Context, in *UpdateWorkingStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, "/api.online.Online/UpdateWorkingStatus", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *onlineClient) UpdateWeight(ctx context.Context, in *UpdateWeightRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, "/api.online.Online/UpdateWeight", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *onlineClient) UpdateTodayMatchedNum(ctx context.Context, in *UpdateTodayMatchedNumRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, "/api.online.Online/UpdateTodayMatchedNum", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // OnlineServer is the server API for Online service.
- // All implementations must embed UnimplementedOnlineServer
- // for forward compatibility
- type OnlineServer interface {
- // 用户上线
- UserOnline(context.Context, *UserOnlineRequest) (*emptypb.Empty, error)
- // 发送消息
- SendMsg(context.Context, *SendMsgRequest) (*SendMsgReply, error)
- // 检查是否在线
- CheckIsOnline(context.Context, *CheckIsOnlineRequest) (*CheckIsOnlineReply, error)
- // 检查是否在线
- CheckIsOnlineByIDs(context.Context, *CheckIsOnlineByIDsParam) (*CheckIsOnlineByIDsParam, error)
- // 查询在线用户信息列表
- FindOnlinePerson(context.Context, *emptypb.Empty) (*OnlinePersonMessageReply, error)
- // 查询可以匹配的在线用户信息列表
- FindOnlineCanMatchingPerson(context.Context, *emptypb.Empty) (*OnlinePersonMessageReply, error)
- // 查询在线多少人
- FindOnlinePersonNum(context.Context, *emptypb.Empty) (*OnlinePersonReply, error)
- // 更新工作状态
- UpdateWorkingStatus(context.Context, *UpdateWorkingStatusRequest) (*emptypb.Empty, error)
- // 更新权重
- UpdateWeight(context.Context, *UpdateWeightRequest) (*emptypb.Empty, error)
- // 更新每日被匹配数
- UpdateTodayMatchedNum(context.Context, *UpdateTodayMatchedNumRequest) (*emptypb.Empty, error)
- mustEmbedUnimplementedOnlineServer()
- }
- // UnimplementedOnlineServer must be embedded to have forward compatible implementations.
- type UnimplementedOnlineServer struct {
- }
- func (UnimplementedOnlineServer) UserOnline(context.Context, *UserOnlineRequest) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UserOnline not implemented")
- }
- func (UnimplementedOnlineServer) SendMsg(context.Context, *SendMsgRequest) (*SendMsgReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method SendMsg not implemented")
- }
- func (UnimplementedOnlineServer) CheckIsOnline(context.Context, *CheckIsOnlineRequest) (*CheckIsOnlineReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CheckIsOnline not implemented")
- }
- func (UnimplementedOnlineServer) CheckIsOnlineByIDs(context.Context, *CheckIsOnlineByIDsParam) (*CheckIsOnlineByIDsParam, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CheckIsOnlineByIDs not implemented")
- }
- func (UnimplementedOnlineServer) FindOnlinePerson(context.Context, *emptypb.Empty) (*OnlinePersonMessageReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePerson not implemented")
- }
- func (UnimplementedOnlineServer) FindOnlineCanMatchingPerson(context.Context, *emptypb.Empty) (*OnlinePersonMessageReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindOnlineCanMatchingPerson not implemented")
- }
- func (UnimplementedOnlineServer) FindOnlinePersonNum(context.Context, *emptypb.Empty) (*OnlinePersonReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindOnlinePersonNum not implemented")
- }
- func (UnimplementedOnlineServer) UpdateWorkingStatus(context.Context, *UpdateWorkingStatusRequest) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkingStatus not implemented")
- }
- func (UnimplementedOnlineServer) UpdateWeight(context.Context, *UpdateWeightRequest) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateWeight not implemented")
- }
- func (UnimplementedOnlineServer) UpdateTodayMatchedNum(context.Context, *UpdateTodayMatchedNumRequest) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UpdateTodayMatchedNum not implemented")
- }
- func (UnimplementedOnlineServer) mustEmbedUnimplementedOnlineServer() {}
- // UnsafeOnlineServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to OnlineServer will
- // result in compilation errors.
- type UnsafeOnlineServer interface {
- mustEmbedUnimplementedOnlineServer()
- }
- func RegisterOnlineServer(s grpc.ServiceRegistrar, srv OnlineServer) {
- s.RegisterService(&Online_ServiceDesc, srv)
- }
- func _Online_UserOnline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(UserOnlineRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(OnlineServer).UserOnline(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.online.Online/UserOnline",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnlineServer).UserOnline(ctx, req.(*UserOnlineRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Online_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.(OnlineServer).SendMsg(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.online.Online/SendMsg",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnlineServer).SendMsg(ctx, req.(*SendMsgRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Online_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.(OnlineServer).CheckIsOnline(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.online.Online/CheckIsOnline",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnlineServer).CheckIsOnline(ctx, req.(*CheckIsOnlineRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Online_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.(OnlineServer).CheckIsOnlineByIDs(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.online.Online/CheckIsOnlineByIDs",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnlineServer).CheckIsOnlineByIDs(ctx, req.(*CheckIsOnlineByIDsParam))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Online_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.(OnlineServer).FindOnlinePerson(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.online.Online/FindOnlinePerson",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnlineServer).FindOnlinePerson(ctx, req.(*emptypb.Empty))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Online_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.(OnlineServer).FindOnlineCanMatchingPerson(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.online.Online/FindOnlineCanMatchingPerson",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnlineServer).FindOnlineCanMatchingPerson(ctx, req.(*emptypb.Empty))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Online_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.(OnlineServer).FindOnlinePersonNum(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.online.Online/FindOnlinePersonNum",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnlineServer).FindOnlinePersonNum(ctx, req.(*emptypb.Empty))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Online_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.(OnlineServer).UpdateWorkingStatus(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.online.Online/UpdateWorkingStatus",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnlineServer).UpdateWorkingStatus(ctx, req.(*UpdateWorkingStatusRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Online_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.(OnlineServer).UpdateWeight(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.online.Online/UpdateWeight",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnlineServer).UpdateWeight(ctx, req.(*UpdateWeightRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Online_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.(OnlineServer).UpdateTodayMatchedNum(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.online.Online/UpdateTodayMatchedNum",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(OnlineServer).UpdateTodayMatchedNum(ctx, req.(*UpdateTodayMatchedNumRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- // Online_ServiceDesc is the grpc.ServiceDesc for Online service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var Online_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "api.online.Online",
- HandlerType: (*OnlineServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "UserOnline",
- Handler: _Online_UserOnline_Handler,
- },
- {
- MethodName: "SendMsg",
- Handler: _Online_SendMsg_Handler,
- },
- {
- MethodName: "CheckIsOnline",
- Handler: _Online_CheckIsOnline_Handler,
- },
- {
- MethodName: "CheckIsOnlineByIDs",
- Handler: _Online_CheckIsOnlineByIDs_Handler,
- },
- {
- MethodName: "FindOnlinePerson",
- Handler: _Online_FindOnlinePerson_Handler,
- },
- {
- MethodName: "FindOnlineCanMatchingPerson",
- Handler: _Online_FindOnlineCanMatchingPerson_Handler,
- },
- {
- MethodName: "FindOnlinePersonNum",
- Handler: _Online_FindOnlinePersonNum_Handler,
- },
- {
- MethodName: "UpdateWorkingStatus",
- Handler: _Online_UpdateWorkingStatus_Handler,
- },
- {
- MethodName: "UpdateWeight",
- Handler: _Online_UpdateWeight_Handler,
- },
- {
- MethodName: "UpdateTodayMatchedNum",
- Handler: _Online_UpdateTodayMatchedNum_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "online.proto",
- }
|