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