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