// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 // - protoc v3.21.12 // source: proto/exfil.proto package proto import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( ExfilService_UploadChunk_FullMethodName = "/contraband.ExfilService/UploadChunk" ExfilService_UploadStream_FullMethodName = "/contraband.ExfilService/UploadStream" ) // ExfilServiceClient is the client API for ExfilService service. // // 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. type ExfilServiceClient interface { UploadChunk(ctx context.Context, in *ChunkRequest, opts ...grpc.CallOption) (*ChunkResponse, error) UploadStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ChunkRequest, ChunkResponse], error) } type exfilServiceClient struct { cc grpc.ClientConnInterface } func NewExfilServiceClient(cc grpc.ClientConnInterface) ExfilServiceClient { return &exfilServiceClient{cc} } func (c *exfilServiceClient) UploadChunk(ctx context.Context, in *ChunkRequest, opts ...grpc.CallOption) (*ChunkResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ChunkResponse) err := c.cc.Invoke(ctx, ExfilService_UploadChunk_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *exfilServiceClient) UploadStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ChunkRequest, ChunkResponse], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &ExfilService_ServiceDesc.Streams[0], ExfilService_UploadStream_FullMethodName, cOpts...) if err != nil { return nil, err } x := &grpc.GenericClientStream[ChunkRequest, ChunkResponse]{ClientStream: stream} return x, nil } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type ExfilService_UploadStreamClient = grpc.ClientStreamingClient[ChunkRequest, ChunkResponse] // ExfilServiceServer is the server API for ExfilService service. // All implementations must embed UnimplementedExfilServiceServer // for forward compatibility. type ExfilServiceServer interface { UploadChunk(context.Context, *ChunkRequest) (*ChunkResponse, error) UploadStream(grpc.ClientStreamingServer[ChunkRequest, ChunkResponse]) error mustEmbedUnimplementedExfilServiceServer() } // UnimplementedExfilServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedExfilServiceServer struct{} func (UnimplementedExfilServiceServer) UploadChunk(context.Context, *ChunkRequest) (*ChunkResponse, error) { return nil, status.Error(codes.Unimplemented, "method UploadChunk not implemented") } func (UnimplementedExfilServiceServer) UploadStream(grpc.ClientStreamingServer[ChunkRequest, ChunkResponse]) error { return status.Error(codes.Unimplemented, "method UploadStream not implemented") } func (UnimplementedExfilServiceServer) mustEmbedUnimplementedExfilServiceServer() {} func (UnimplementedExfilServiceServer) testEmbeddedByValue() {} // UnsafeExfilServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ExfilServiceServer will // result in compilation errors. type UnsafeExfilServiceServer interface { mustEmbedUnimplementedExfilServiceServer() } func RegisterExfilServiceServer(s grpc.ServiceRegistrar, srv ExfilServiceServer) { // If the following call panics, it indicates UnimplementedExfilServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&ExfilService_ServiceDesc, srv) } func _ExfilService_UploadChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ChunkRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ExfilServiceServer).UploadChunk(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ExfilService_UploadChunk_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ExfilServiceServer).UploadChunk(ctx, req.(*ChunkRequest)) } return interceptor(ctx, in, info, handler) } func _ExfilService_UploadStream_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(ExfilServiceServer).UploadStream(&grpc.GenericServerStream[ChunkRequest, ChunkResponse]{ServerStream: stream}) } // This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. type ExfilService_UploadStreamServer = grpc.ClientStreamingServer[ChunkRequest, ChunkResponse] // ExfilService_ServiceDesc is the grpc.ServiceDesc for ExfilService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ExfilService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "contraband.ExfilService", HandlerType: (*ExfilServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UploadChunk", Handler: _ExfilService_UploadChunk_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "UploadStream", Handler: _ExfilService_UploadStream_Handler, ClientStreams: true, }, }, Metadata: "proto/exfil.proto", }