github.com/Uhtred009/v2ray-core-1@v4.31.2+incompatible/app/stats/command/command_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  
     3  package command
     4  
     5  import (
     6  	context "context"
     7  	grpc "google.golang.org/grpc"
     8  	codes "google.golang.org/grpc/codes"
     9  	status "google.golang.org/grpc/status"
    10  )
    11  
    12  // This is a compile-time assertion to ensure that this generated file
    13  // is compatible with the grpc package it is being compiled against.
    14  const _ = grpc.SupportPackageIsVersion7
    15  
    16  // StatsServiceClient is the client API for StatsService service.
    17  //
    18  // 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.
    19  type StatsServiceClient interface {
    20  	GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
    21  	QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error)
    22  	GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error)
    23  	GetUserIPStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetUserIPStatsResponse, error)
    24  }
    25  
    26  type statsServiceClient struct {
    27  	cc grpc.ClientConnInterface
    28  }
    29  
    30  func NewStatsServiceClient(cc grpc.ClientConnInterface) StatsServiceClient {
    31  	return &statsServiceClient{cc}
    32  }
    33  
    34  func (c *statsServiceClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) {
    35  	out := new(GetStatsResponse)
    36  	err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/GetStats", in, out, opts...)
    37  	if err != nil {
    38  		return nil, err
    39  	}
    40  	return out, nil
    41  }
    42  
    43  func (c *statsServiceClient) QueryStats(ctx context.Context, in *QueryStatsRequest, opts ...grpc.CallOption) (*QueryStatsResponse, error) {
    44  	out := new(QueryStatsResponse)
    45  	err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/QueryStats", in, out, opts...)
    46  	if err != nil {
    47  		return nil, err
    48  	}
    49  	return out, nil
    50  }
    51  
    52  func (c *statsServiceClient) GetSysStats(ctx context.Context, in *SysStatsRequest, opts ...grpc.CallOption) (*SysStatsResponse, error) {
    53  	out := new(SysStatsResponse)
    54  	err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/GetSysStats", in, out, opts...)
    55  	if err != nil {
    56  		return nil, err
    57  	}
    58  	return out, nil
    59  }
    60  
    61  func (c *statsServiceClient) GetUserIPStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetUserIPStatsResponse, error) {
    62  	out := new(GetUserIPStatsResponse)
    63  	err := c.cc.Invoke(ctx, "/v2ray.core.app.stats.command.StatsService/GetUserIPStats", in, out, opts...)
    64  	if err != nil {
    65  		return nil, err
    66  	}
    67  	return out, nil
    68  }
    69  
    70  // StatsServiceServer is the server API for StatsService service.
    71  // All implementations must embed UnimplementedStatsServiceServer
    72  // for forward compatibility
    73  type StatsServiceServer interface {
    74  	GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
    75  	QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error)
    76  	GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error)
    77  	GetUserIPStats(context.Context, *GetStatsRequest) (*GetUserIPStatsResponse, error)
    78  	mustEmbedUnimplementedStatsServiceServer()
    79  }
    80  
    81  // UnimplementedStatsServiceServer must be embedded to have forward compatible implementations.
    82  type UnimplementedStatsServiceServer struct {
    83  }
    84  
    85  func (UnimplementedStatsServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) {
    86  	return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
    87  }
    88  func (UnimplementedStatsServiceServer) QueryStats(context.Context, *QueryStatsRequest) (*QueryStatsResponse, error) {
    89  	return nil, status.Errorf(codes.Unimplemented, "method QueryStats not implemented")
    90  }
    91  func (UnimplementedStatsServiceServer) GetSysStats(context.Context, *SysStatsRequest) (*SysStatsResponse, error) {
    92  	return nil, status.Errorf(codes.Unimplemented, "method GetSysStats not implemented")
    93  }
    94  func (UnimplementedStatsServiceServer) GetUserIPStats(context.Context, *GetStatsRequest) (*GetUserIPStatsResponse, error) {
    95  	return nil, status.Errorf(codes.Unimplemented, "method GetUserIPStats not implemented")
    96  }
    97  func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer() {}
    98  
    99  // UnsafeStatsServiceServer may be embedded to opt out of forward compatibility for this service.
   100  // Use of this interface is not recommended, as added methods to StatsServiceServer will
   101  // result in compilation errors.
   102  type UnsafeStatsServiceServer interface {
   103  	mustEmbedUnimplementedStatsServiceServer()
   104  }
   105  
   106  func RegisterStatsServiceServer(s *grpc.Server, srv StatsServiceServer) {
   107  	s.RegisterService(&_StatsService_serviceDesc, srv)
   108  }
   109  
   110  func _StatsService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   111  	in := new(GetStatsRequest)
   112  	if err := dec(in); err != nil {
   113  		return nil, err
   114  	}
   115  	if interceptor == nil {
   116  		return srv.(StatsServiceServer).GetStats(ctx, in)
   117  	}
   118  	info := &grpc.UnaryServerInfo{
   119  		Server:     srv,
   120  		FullMethod: "/v2ray.core.app.stats.command.StatsService/GetStats",
   121  	}
   122  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   123  		return srv.(StatsServiceServer).GetStats(ctx, req.(*GetStatsRequest))
   124  	}
   125  	return interceptor(ctx, in, info, handler)
   126  }
   127  
   128  func _StatsService_QueryStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   129  	in := new(QueryStatsRequest)
   130  	if err := dec(in); err != nil {
   131  		return nil, err
   132  	}
   133  	if interceptor == nil {
   134  		return srv.(StatsServiceServer).QueryStats(ctx, in)
   135  	}
   136  	info := &grpc.UnaryServerInfo{
   137  		Server:     srv,
   138  		FullMethod: "/v2ray.core.app.stats.command.StatsService/QueryStats",
   139  	}
   140  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   141  		return srv.(StatsServiceServer).QueryStats(ctx, req.(*QueryStatsRequest))
   142  	}
   143  	return interceptor(ctx, in, info, handler)
   144  }
   145  
   146  func _StatsService_GetSysStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   147  	in := new(SysStatsRequest)
   148  	if err := dec(in); err != nil {
   149  		return nil, err
   150  	}
   151  	if interceptor == nil {
   152  		return srv.(StatsServiceServer).GetSysStats(ctx, in)
   153  	}
   154  	info := &grpc.UnaryServerInfo{
   155  		Server:     srv,
   156  		FullMethod: "/v2ray.core.app.stats.command.StatsService/GetSysStats",
   157  	}
   158  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   159  		return srv.(StatsServiceServer).GetSysStats(ctx, req.(*SysStatsRequest))
   160  	}
   161  	return interceptor(ctx, in, info, handler)
   162  }
   163  
   164  func _StatsService_GetUserIPStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   165  	in := new(GetStatsRequest)
   166  	if err := dec(in); err != nil {
   167  		return nil, err
   168  	}
   169  	if interceptor == nil {
   170  		return srv.(StatsServiceServer).GetUserIPStats(ctx, in)
   171  	}
   172  	info := &grpc.UnaryServerInfo{
   173  		Server:     srv,
   174  		FullMethod: "/v2ray.core.app.stats.command.StatsService/GetUserIPStats",
   175  	}
   176  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   177  		return srv.(StatsServiceServer).GetUserIPStats(ctx, req.(*GetStatsRequest))
   178  	}
   179  	return interceptor(ctx, in, info, handler)
   180  }
   181  
   182  var _StatsService_serviceDesc = grpc.ServiceDesc{
   183  	ServiceName: "v2ray.core.app.stats.command.StatsService",
   184  	HandlerType: (*StatsServiceServer)(nil),
   185  	Methods: []grpc.MethodDesc{
   186  		{
   187  			MethodName: "GetStats",
   188  			Handler:    _StatsService_GetStats_Handler,
   189  		},
   190  		{
   191  			MethodName: "QueryStats",
   192  			Handler:    _StatsService_QueryStats_Handler,
   193  		},
   194  		{
   195  			MethodName: "GetSysStats",
   196  			Handler:    _StatsService_GetSysStats_Handler,
   197  		},
   198  		{
   199  			MethodName: "GetUserIPStats",
   200  			Handler:    _StatsService_GetUserIPStats_Handler,
   201  		},
   202  	},
   203  	Streams:  []grpc.StreamDesc{},
   204  	Metadata: "command.proto",
   205  }