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