github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/app/proxyman/command/command_grpc.pb.go (about)

     1  package command
     2  
     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  )
     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  
    15  const (
    16  	HandlerService_AddInbound_FullMethodName     = "/v2ray.core.app.proxyman.command.HandlerService/AddInbound"
    17  	HandlerService_RemoveInbound_FullMethodName  = "/v2ray.core.app.proxyman.command.HandlerService/RemoveInbound"
    18  	HandlerService_AlterInbound_FullMethodName   = "/v2ray.core.app.proxyman.command.HandlerService/AlterInbound"
    19  	HandlerService_AddOutbound_FullMethodName    = "/v2ray.core.app.proxyman.command.HandlerService/AddOutbound"
    20  	HandlerService_RemoveOutbound_FullMethodName = "/v2ray.core.app.proxyman.command.HandlerService/RemoveOutbound"
    21  	HandlerService_AlterOutbound_FullMethodName  = "/v2ray.core.app.proxyman.command.HandlerService/AlterOutbound"
    22  )
    23  
    24  // HandlerServiceClient is the client API for HandlerService service.
    25  //
    26  // 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.
    27  type HandlerServiceClient interface {
    28  	AddInbound(ctx context.Context, in *AddInboundRequest, opts ...grpc.CallOption) (*AddInboundResponse, error)
    29  	RemoveInbound(ctx context.Context, in *RemoveInboundRequest, opts ...grpc.CallOption) (*RemoveInboundResponse, error)
    30  	AlterInbound(ctx context.Context, in *AlterInboundRequest, opts ...grpc.CallOption) (*AlterInboundResponse, error)
    31  	AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error)
    32  	RemoveOutbound(ctx context.Context, in *RemoveOutboundRequest, opts ...grpc.CallOption) (*RemoveOutboundResponse, error)
    33  	AlterOutbound(ctx context.Context, in *AlterOutboundRequest, opts ...grpc.CallOption) (*AlterOutboundResponse, error)
    34  }
    35  
    36  type handlerServiceClient struct {
    37  	cc grpc.ClientConnInterface
    38  }
    39  
    40  func NewHandlerServiceClient(cc grpc.ClientConnInterface) HandlerServiceClient {
    41  	return &handlerServiceClient{cc}
    42  }
    43  
    44  func (c *handlerServiceClient) AddInbound(ctx context.Context, in *AddInboundRequest, opts ...grpc.CallOption) (*AddInboundResponse, error) {
    45  	out := new(AddInboundResponse)
    46  	err := c.cc.Invoke(ctx, HandlerService_AddInbound_FullMethodName, in, out, opts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return out, nil
    51  }
    52  
    53  func (c *handlerServiceClient) RemoveInbound(ctx context.Context, in *RemoveInboundRequest, opts ...grpc.CallOption) (*RemoveInboundResponse, error) {
    54  	out := new(RemoveInboundResponse)
    55  	err := c.cc.Invoke(ctx, HandlerService_RemoveInbound_FullMethodName, in, out, opts...)
    56  	if err != nil {
    57  		return nil, err
    58  	}
    59  	return out, nil
    60  }
    61  
    62  func (c *handlerServiceClient) AlterInbound(ctx context.Context, in *AlterInboundRequest, opts ...grpc.CallOption) (*AlterInboundResponse, error) {
    63  	out := new(AlterInboundResponse)
    64  	err := c.cc.Invoke(ctx, HandlerService_AlterInbound_FullMethodName, in, out, opts...)
    65  	if err != nil {
    66  		return nil, err
    67  	}
    68  	return out, nil
    69  }
    70  
    71  func (c *handlerServiceClient) AddOutbound(ctx context.Context, in *AddOutboundRequest, opts ...grpc.CallOption) (*AddOutboundResponse, error) {
    72  	out := new(AddOutboundResponse)
    73  	err := c.cc.Invoke(ctx, HandlerService_AddOutbound_FullMethodName, in, out, opts...)
    74  	if err != nil {
    75  		return nil, err
    76  	}
    77  	return out, nil
    78  }
    79  
    80  func (c *handlerServiceClient) RemoveOutbound(ctx context.Context, in *RemoveOutboundRequest, opts ...grpc.CallOption) (*RemoveOutboundResponse, error) {
    81  	out := new(RemoveOutboundResponse)
    82  	err := c.cc.Invoke(ctx, HandlerService_RemoveOutbound_FullMethodName, in, out, opts...)
    83  	if err != nil {
    84  		return nil, err
    85  	}
    86  	return out, nil
    87  }
    88  
    89  func (c *handlerServiceClient) AlterOutbound(ctx context.Context, in *AlterOutboundRequest, opts ...grpc.CallOption) (*AlterOutboundResponse, error) {
    90  	out := new(AlterOutboundResponse)
    91  	err := c.cc.Invoke(ctx, HandlerService_AlterOutbound_FullMethodName, in, out, opts...)
    92  	if err != nil {
    93  		return nil, err
    94  	}
    95  	return out, nil
    96  }
    97  
    98  // HandlerServiceServer is the server API for HandlerService service.
    99  // All implementations must embed UnimplementedHandlerServiceServer
   100  // for forward compatibility
   101  type HandlerServiceServer interface {
   102  	AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error)
   103  	RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error)
   104  	AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error)
   105  	AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error)
   106  	RemoveOutbound(context.Context, *RemoveOutboundRequest) (*RemoveOutboundResponse, error)
   107  	AlterOutbound(context.Context, *AlterOutboundRequest) (*AlterOutboundResponse, error)
   108  	mustEmbedUnimplementedHandlerServiceServer()
   109  }
   110  
   111  // UnimplementedHandlerServiceServer must be embedded to have forward compatible implementations.
   112  type UnimplementedHandlerServiceServer struct {
   113  }
   114  
   115  func (UnimplementedHandlerServiceServer) AddInbound(context.Context, *AddInboundRequest) (*AddInboundResponse, error) {
   116  	return nil, status.Errorf(codes.Unimplemented, "method AddInbound not implemented")
   117  }
   118  func (UnimplementedHandlerServiceServer) RemoveInbound(context.Context, *RemoveInboundRequest) (*RemoveInboundResponse, error) {
   119  	return nil, status.Errorf(codes.Unimplemented, "method RemoveInbound not implemented")
   120  }
   121  func (UnimplementedHandlerServiceServer) AlterInbound(context.Context, *AlterInboundRequest) (*AlterInboundResponse, error) {
   122  	return nil, status.Errorf(codes.Unimplemented, "method AlterInbound not implemented")
   123  }
   124  func (UnimplementedHandlerServiceServer) AddOutbound(context.Context, *AddOutboundRequest) (*AddOutboundResponse, error) {
   125  	return nil, status.Errorf(codes.Unimplemented, "method AddOutbound not implemented")
   126  }
   127  func (UnimplementedHandlerServiceServer) RemoveOutbound(context.Context, *RemoveOutboundRequest) (*RemoveOutboundResponse, error) {
   128  	return nil, status.Errorf(codes.Unimplemented, "method RemoveOutbound not implemented")
   129  }
   130  func (UnimplementedHandlerServiceServer) AlterOutbound(context.Context, *AlterOutboundRequest) (*AlterOutboundResponse, error) {
   131  	return nil, status.Errorf(codes.Unimplemented, "method AlterOutbound not implemented")
   132  }
   133  func (UnimplementedHandlerServiceServer) mustEmbedUnimplementedHandlerServiceServer() {}
   134  
   135  // UnsafeHandlerServiceServer may be embedded to opt out of forward compatibility for this service.
   136  // Use of this interface is not recommended, as added methods to HandlerServiceServer will
   137  // result in compilation errors.
   138  type UnsafeHandlerServiceServer interface {
   139  	mustEmbedUnimplementedHandlerServiceServer()
   140  }
   141  
   142  func RegisterHandlerServiceServer(s grpc.ServiceRegistrar, srv HandlerServiceServer) {
   143  	s.RegisterService(&HandlerService_ServiceDesc, srv)
   144  }
   145  
   146  func _HandlerService_AddInbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   147  	in := new(AddInboundRequest)
   148  	if err := dec(in); err != nil {
   149  		return nil, err
   150  	}
   151  	if interceptor == nil {
   152  		return srv.(HandlerServiceServer).AddInbound(ctx, in)
   153  	}
   154  	info := &grpc.UnaryServerInfo{
   155  		Server:     srv,
   156  		FullMethod: HandlerService_AddInbound_FullMethodName,
   157  	}
   158  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   159  		return srv.(HandlerServiceServer).AddInbound(ctx, req.(*AddInboundRequest))
   160  	}
   161  	return interceptor(ctx, in, info, handler)
   162  }
   163  
   164  func _HandlerService_RemoveInbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   165  	in := new(RemoveInboundRequest)
   166  	if err := dec(in); err != nil {
   167  		return nil, err
   168  	}
   169  	if interceptor == nil {
   170  		return srv.(HandlerServiceServer).RemoveInbound(ctx, in)
   171  	}
   172  	info := &grpc.UnaryServerInfo{
   173  		Server:     srv,
   174  		FullMethod: HandlerService_RemoveInbound_FullMethodName,
   175  	}
   176  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   177  		return srv.(HandlerServiceServer).RemoveInbound(ctx, req.(*RemoveInboundRequest))
   178  	}
   179  	return interceptor(ctx, in, info, handler)
   180  }
   181  
   182  func _HandlerService_AlterInbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   183  	in := new(AlterInboundRequest)
   184  	if err := dec(in); err != nil {
   185  		return nil, err
   186  	}
   187  	if interceptor == nil {
   188  		return srv.(HandlerServiceServer).AlterInbound(ctx, in)
   189  	}
   190  	info := &grpc.UnaryServerInfo{
   191  		Server:     srv,
   192  		FullMethod: HandlerService_AlterInbound_FullMethodName,
   193  	}
   194  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   195  		return srv.(HandlerServiceServer).AlterInbound(ctx, req.(*AlterInboundRequest))
   196  	}
   197  	return interceptor(ctx, in, info, handler)
   198  }
   199  
   200  func _HandlerService_AddOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   201  	in := new(AddOutboundRequest)
   202  	if err := dec(in); err != nil {
   203  		return nil, err
   204  	}
   205  	if interceptor == nil {
   206  		return srv.(HandlerServiceServer).AddOutbound(ctx, in)
   207  	}
   208  	info := &grpc.UnaryServerInfo{
   209  		Server:     srv,
   210  		FullMethod: HandlerService_AddOutbound_FullMethodName,
   211  	}
   212  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   213  		return srv.(HandlerServiceServer).AddOutbound(ctx, req.(*AddOutboundRequest))
   214  	}
   215  	return interceptor(ctx, in, info, handler)
   216  }
   217  
   218  func _HandlerService_RemoveOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   219  	in := new(RemoveOutboundRequest)
   220  	if err := dec(in); err != nil {
   221  		return nil, err
   222  	}
   223  	if interceptor == nil {
   224  		return srv.(HandlerServiceServer).RemoveOutbound(ctx, in)
   225  	}
   226  	info := &grpc.UnaryServerInfo{
   227  		Server:     srv,
   228  		FullMethod: HandlerService_RemoveOutbound_FullMethodName,
   229  	}
   230  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   231  		return srv.(HandlerServiceServer).RemoveOutbound(ctx, req.(*RemoveOutboundRequest))
   232  	}
   233  	return interceptor(ctx, in, info, handler)
   234  }
   235  
   236  func _HandlerService_AlterOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   237  	in := new(AlterOutboundRequest)
   238  	if err := dec(in); err != nil {
   239  		return nil, err
   240  	}
   241  	if interceptor == nil {
   242  		return srv.(HandlerServiceServer).AlterOutbound(ctx, in)
   243  	}
   244  	info := &grpc.UnaryServerInfo{
   245  		Server:     srv,
   246  		FullMethod: HandlerService_AlterOutbound_FullMethodName,
   247  	}
   248  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   249  		return srv.(HandlerServiceServer).AlterOutbound(ctx, req.(*AlterOutboundRequest))
   250  	}
   251  	return interceptor(ctx, in, info, handler)
   252  }
   253  
   254  // HandlerService_ServiceDesc is the grpc.ServiceDesc for HandlerService service.
   255  // It's only intended for direct use with grpc.RegisterService,
   256  // and not to be introspected or modified (even as a copy)
   257  var HandlerService_ServiceDesc = grpc.ServiceDesc{
   258  	ServiceName: "v2ray.core.app.proxyman.command.HandlerService",
   259  	HandlerType: (*HandlerServiceServer)(nil),
   260  	Methods: []grpc.MethodDesc{
   261  		{
   262  			MethodName: "AddInbound",
   263  			Handler:    _HandlerService_AddInbound_Handler,
   264  		},
   265  		{
   266  			MethodName: "RemoveInbound",
   267  			Handler:    _HandlerService_RemoveInbound_Handler,
   268  		},
   269  		{
   270  			MethodName: "AlterInbound",
   271  			Handler:    _HandlerService_AlterInbound_Handler,
   272  		},
   273  		{
   274  			MethodName: "AddOutbound",
   275  			Handler:    _HandlerService_AddOutbound_Handler,
   276  		},
   277  		{
   278  			MethodName: "RemoveOutbound",
   279  			Handler:    _HandlerService_RemoveOutbound_Handler,
   280  		},
   281  		{
   282  			MethodName: "AlterOutbound",
   283  			Handler:    _HandlerService_AlterOutbound_Handler,
   284  		},
   285  	},
   286  	Streams:  []grpc.StreamDesc{},
   287  	Metadata: "app/proxyman/command/command.proto",
   288  }