github.com/xraypb/xray-core@v1.6.6/app/proxyman/command/command_grpc.pb.go (about)

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