blob: 82b5d46c8174432da132259a49235f65894f3ba9 [file] [log] [blame]
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.11.4
// source: file_transfer.proto
package protocol
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PullDirectoryRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// path is a directory path on the DUT.
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
}
func (x *PullDirectoryRequest) Reset() {
*x = PullDirectoryRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_file_transfer_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PullDirectoryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PullDirectoryRequest) ProtoMessage() {}
func (x *PullDirectoryRequest) ProtoReflect() protoreflect.Message {
mi := &file_file_transfer_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PullDirectoryRequest.ProtoReflect.Descriptor instead.
func (*PullDirectoryRequest) Descriptor() ([]byte, []int) {
return file_file_transfer_proto_rawDescGZIP(), []int{0}
}
func (x *PullDirectoryRequest) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
type PullDirectoryResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// data is gzip'ed tar archive data.
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *PullDirectoryResponse) Reset() {
*x = PullDirectoryResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_file_transfer_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PullDirectoryResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PullDirectoryResponse) ProtoMessage() {}
func (x *PullDirectoryResponse) ProtoReflect() protoreflect.Message {
mi := &file_file_transfer_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PullDirectoryResponse.ProtoReflect.Descriptor instead.
func (*PullDirectoryResponse) Descriptor() ([]byte, []int) {
return file_file_transfer_proto_rawDescGZIP(), []int{1}
}
func (x *PullDirectoryResponse) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
var File_file_transfer_proto protoreflect.FileDescriptor
var file_file_transfer_proto_rawDesc = []byte{
0x0a, 0x13, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x74, 0x61, 0x73, 0x74, 0x2e, 0x63, 0x6f, 0x72, 0x65,
0x22, 0x2a, 0x0a, 0x14, 0x50, 0x75, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72,
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2b, 0x0a, 0x15,
0x50, 0x75, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0x66, 0x0a, 0x0c, 0x46, 0x69, 0x6c,
0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x56, 0x0a, 0x0d, 0x50, 0x75, 0x6c,
0x6c, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x74, 0x61, 0x73,
0x74, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x65, 0x63,
0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x74, 0x61,
0x73, 0x74, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x65,
0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30,
0x01, 0x42, 0x23, 0x5a, 0x21, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73, 0x2f,
0x74, 0x61, 0x73, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_file_transfer_proto_rawDescOnce sync.Once
file_file_transfer_proto_rawDescData = file_file_transfer_proto_rawDesc
)
func file_file_transfer_proto_rawDescGZIP() []byte {
file_file_transfer_proto_rawDescOnce.Do(func() {
file_file_transfer_proto_rawDescData = protoimpl.X.CompressGZIP(file_file_transfer_proto_rawDescData)
})
return file_file_transfer_proto_rawDescData
}
var file_file_transfer_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_file_transfer_proto_goTypes = []interface{}{
(*PullDirectoryRequest)(nil), // 0: tast.core.PullDirectoryRequest
(*PullDirectoryResponse)(nil), // 1: tast.core.PullDirectoryResponse
}
var file_file_transfer_proto_depIdxs = []int32{
0, // 0: tast.core.FileTransfer.PullDirectory:input_type -> tast.core.PullDirectoryRequest
1, // 1: tast.core.FileTransfer.PullDirectory:output_type -> tast.core.PullDirectoryResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_file_transfer_proto_init() }
func file_file_transfer_proto_init() {
if File_file_transfer_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_file_transfer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PullDirectoryRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_file_transfer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PullDirectoryResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_file_transfer_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_file_transfer_proto_goTypes,
DependencyIndexes: file_file_transfer_proto_depIdxs,
MessageInfos: file_file_transfer_proto_msgTypes,
}.Build()
File_file_transfer_proto = out.File
file_file_transfer_proto_rawDesc = nil
file_file_transfer_proto_goTypes = nil
file_file_transfer_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// FileTransferClient is the client API for FileTransfer service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type FileTransferClient interface {
// PullDirectory transfers a directory on the DUT as a tar archive.
// The directory is removed after transfer.
PullDirectory(ctx context.Context, in *PullDirectoryRequest, opts ...grpc.CallOption) (FileTransfer_PullDirectoryClient, error)
}
type fileTransferClient struct {
cc grpc.ClientConnInterface
}
func NewFileTransferClient(cc grpc.ClientConnInterface) FileTransferClient {
return &fileTransferClient{cc}
}
func (c *fileTransferClient) PullDirectory(ctx context.Context, in *PullDirectoryRequest, opts ...grpc.CallOption) (FileTransfer_PullDirectoryClient, error) {
stream, err := c.cc.NewStream(ctx, &_FileTransfer_serviceDesc.Streams[0], "/tast.core.FileTransfer/PullDirectory", opts...)
if err != nil {
return nil, err
}
x := &fileTransferPullDirectoryClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type FileTransfer_PullDirectoryClient interface {
Recv() (*PullDirectoryResponse, error)
grpc.ClientStream
}
type fileTransferPullDirectoryClient struct {
grpc.ClientStream
}
func (x *fileTransferPullDirectoryClient) Recv() (*PullDirectoryResponse, error) {
m := new(PullDirectoryResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// FileTransferServer is the server API for FileTransfer service.
type FileTransferServer interface {
// PullDirectory transfers a directory on the DUT as a tar archive.
// The directory is removed after transfer.
PullDirectory(*PullDirectoryRequest, FileTransfer_PullDirectoryServer) error
}
// UnimplementedFileTransferServer can be embedded to have forward compatible implementations.
type UnimplementedFileTransferServer struct {
}
func (*UnimplementedFileTransferServer) PullDirectory(*PullDirectoryRequest, FileTransfer_PullDirectoryServer) error {
return status.Errorf(codes.Unimplemented, "method PullDirectory not implemented")
}
func RegisterFileTransferServer(s *grpc.Server, srv FileTransferServer) {
s.RegisterService(&_FileTransfer_serviceDesc, srv)
}
func _FileTransfer_PullDirectory_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(PullDirectoryRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(FileTransferServer).PullDirectory(m, &fileTransferPullDirectoryServer{stream})
}
type FileTransfer_PullDirectoryServer interface {
Send(*PullDirectoryResponse) error
grpc.ServerStream
}
type fileTransferPullDirectoryServer struct {
grpc.ServerStream
}
func (x *fileTransferPullDirectoryServer) Send(m *PullDirectoryResponse) error {
return x.ServerStream.SendMsg(m)
}
var _FileTransfer_serviceDesc = grpc.ServiceDesc{
ServiceName: "tast.core.FileTransfer",
HandlerType: (*FileTransferServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "PullDirectory",
Handler: _FileTransfer_PullDirectory_Handler,
ServerStreams: true,
},
},
Metadata: "file_transfer.proto",
}