374 lines
10 KiB
Go
374 lines
10 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v3.21.12
|
|
// source: filetransfer.proto
|
|
|
|
package protoapi
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
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 FileChunk struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
FileName string `protobuf:"bytes,1,opt,name=FileName,proto3" json:"FileName,omitempty"`
|
|
Content []byte `protobuf:"bytes,2,opt,name=Content,proto3" json:"Content,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *FileChunk) Reset() {
|
|
*x = FileChunk{}
|
|
mi := &file_filetransfer_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *FileChunk) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileChunk) ProtoMessage() {}
|
|
|
|
func (x *FileChunk) ProtoReflect() protoreflect.Message {
|
|
mi := &file_filetransfer_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileChunk.ProtoReflect.Descriptor instead.
|
|
func (*FileChunk) Descriptor() ([]byte, []int) {
|
|
return file_filetransfer_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *FileChunk) GetFileName() string {
|
|
if x != nil {
|
|
return x.FileName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileChunk) GetContent() []byte {
|
|
if x != nil {
|
|
return x.Content
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type UploadStatus struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Success bool `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"`
|
|
Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
|
|
BytesUploaded int64 `protobuf:"varint,3,opt,name=BytesUploaded,proto3" json:"BytesUploaded,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UploadStatus) Reset() {
|
|
*x = UploadStatus{}
|
|
mi := &file_filetransfer_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UploadStatus) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UploadStatus) ProtoMessage() {}
|
|
|
|
func (x *UploadStatus) ProtoReflect() protoreflect.Message {
|
|
mi := &file_filetransfer_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UploadStatus.ProtoReflect.Descriptor instead.
|
|
func (*UploadStatus) Descriptor() ([]byte, []int) {
|
|
return file_filetransfer_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *UploadStatus) GetSuccess() bool {
|
|
if x != nil {
|
|
return x.Success
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *UploadStatus) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UploadStatus) GetBytesUploaded() int64 {
|
|
if x != nil {
|
|
return x.BytesUploaded
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type FileMetadata struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
FileName string `protobuf:"bytes,1,opt,name=FileName,proto3" json:"FileName,omitempty"`
|
|
FileSize int64 `protobuf:"varint,2,opt,name=FileSize,proto3" json:"FileSize,omitempty"`
|
|
UploadedAt int64 `protobuf:"varint,3,opt,name=UploadedAt,proto3" json:"UploadedAt,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *FileMetadata) Reset() {
|
|
*x = FileMetadata{}
|
|
mi := &file_filetransfer_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *FileMetadata) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileMetadata) ProtoMessage() {}
|
|
|
|
func (x *FileMetadata) ProtoReflect() protoreflect.Message {
|
|
mi := &file_filetransfer_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileMetadata.ProtoReflect.Descriptor instead.
|
|
func (*FileMetadata) Descriptor() ([]byte, []int) {
|
|
return file_filetransfer_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *FileMetadata) GetFileName() string {
|
|
if x != nil {
|
|
return x.FileName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *FileMetadata) GetFileSize() int64 {
|
|
if x != nil {
|
|
return x.FileSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *FileMetadata) GetUploadedAt() int64 {
|
|
if x != nil {
|
|
return x.UploadedAt
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type FileList struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Files []*FileMetadata `protobuf:"bytes,1,rep,name=Files,proto3" json:"Files,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *FileList) Reset() {
|
|
*x = FileList{}
|
|
mi := &file_filetransfer_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *FileList) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FileList) ProtoMessage() {}
|
|
|
|
func (x *FileList) ProtoReflect() protoreflect.Message {
|
|
mi := &file_filetransfer_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FileList.ProtoReflect.Descriptor instead.
|
|
func (*FileList) Descriptor() ([]byte, []int) {
|
|
return file_filetransfer_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *FileList) GetFiles() []*FileMetadata {
|
|
if x != nil {
|
|
return x.Files
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type DownloadRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
FileName string `protobuf:"bytes,1,opt,name=FileName,proto3" json:"FileName,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *DownloadRequest) Reset() {
|
|
*x = DownloadRequest{}
|
|
mi := &file_filetransfer_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *DownloadRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DownloadRequest) ProtoMessage() {}
|
|
|
|
func (x *DownloadRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_filetransfer_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use DownloadRequest.ProtoReflect.Descriptor instead.
|
|
func (*DownloadRequest) Descriptor() ([]byte, []int) {
|
|
return file_filetransfer_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *DownloadRequest) GetFileName() string {
|
|
if x != nil {
|
|
return x.FileName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_filetransfer_proto protoreflect.FileDescriptor
|
|
|
|
const file_filetransfer_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x12filetransfer.proto\x1a\fcommon.proto\"A\n" +
|
|
"\tFileChunk\x12\x1a\n" +
|
|
"\bFileName\x18\x01 \x01(\tR\bFileName\x12\x18\n" +
|
|
"\aContent\x18\x02 \x01(\fR\aContent\"h\n" +
|
|
"\fUploadStatus\x12\x18\n" +
|
|
"\aSuccess\x18\x01 \x01(\bR\aSuccess\x12\x18\n" +
|
|
"\aMessage\x18\x02 \x01(\tR\aMessage\x12$\n" +
|
|
"\rBytesUploaded\x18\x03 \x01(\x03R\rBytesUploaded\"f\n" +
|
|
"\fFileMetadata\x12\x1a\n" +
|
|
"\bFileName\x18\x01 \x01(\tR\bFileName\x12\x1a\n" +
|
|
"\bFileSize\x18\x02 \x01(\x03R\bFileSize\x12\x1e\n" +
|
|
"\n" +
|
|
"UploadedAt\x18\x03 \x01(\x03R\n" +
|
|
"UploadedAt\"/\n" +
|
|
"\bFileList\x12#\n" +
|
|
"\x05Files\x18\x01 \x03(\v2\r.FileMetadataR\x05Files\"-\n" +
|
|
"\x0fDownloadRequest\x12\x1a\n" +
|
|
"\bFileName\x18\x01 \x01(\tR\bFileName2\x97\x01\n" +
|
|
"\x13FileTransferService\x12)\n" +
|
|
"\n" +
|
|
"UploadFile\x12\n" +
|
|
".FileChunk\x1a\r.UploadStatus(\x01\x12%\n" +
|
|
"\tListFiles\x12\r.EmptyRequest\x1a\t.FileList\x12.\n" +
|
|
"\fDownloadFile\x12\x10.DownloadRequest\x1a\n" +
|
|
".FileChunk0\x01B\x16Z\x14./protoapi/;protoapib\x06proto3"
|
|
|
|
var (
|
|
file_filetransfer_proto_rawDescOnce sync.Once
|
|
file_filetransfer_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_filetransfer_proto_rawDescGZIP() []byte {
|
|
file_filetransfer_proto_rawDescOnce.Do(func() {
|
|
file_filetransfer_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_filetransfer_proto_rawDesc), len(file_filetransfer_proto_rawDesc)))
|
|
})
|
|
return file_filetransfer_proto_rawDescData
|
|
}
|
|
|
|
var file_filetransfer_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
var file_filetransfer_proto_goTypes = []any{
|
|
(*FileChunk)(nil), // 0: FileChunk
|
|
(*UploadStatus)(nil), // 1: UploadStatus
|
|
(*FileMetadata)(nil), // 2: FileMetadata
|
|
(*FileList)(nil), // 3: FileList
|
|
(*DownloadRequest)(nil), // 4: DownloadRequest
|
|
(*EmptyRequest)(nil), // 5: EmptyRequest
|
|
}
|
|
var file_filetransfer_proto_depIdxs = []int32{
|
|
2, // 0: FileList.Files:type_name -> FileMetadata
|
|
0, // 1: FileTransferService.UploadFile:input_type -> FileChunk
|
|
5, // 2: FileTransferService.ListFiles:input_type -> EmptyRequest
|
|
4, // 3: FileTransferService.DownloadFile:input_type -> DownloadRequest
|
|
1, // 4: FileTransferService.UploadFile:output_type -> UploadStatus
|
|
3, // 5: FileTransferService.ListFiles:output_type -> FileList
|
|
0, // 6: FileTransferService.DownloadFile:output_type -> FileChunk
|
|
4, // [4:7] is the sub-list for method output_type
|
|
1, // [1:4] is the sub-list for method input_type
|
|
1, // [1:1] is the sub-list for extension type_name
|
|
1, // [1:1] is the sub-list for extension extendee
|
|
0, // [0:1] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_filetransfer_proto_init() }
|
|
func file_filetransfer_proto_init() {
|
|
if File_filetransfer_proto != nil {
|
|
return
|
|
}
|
|
file_common_proto_init()
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_filetransfer_proto_rawDesc), len(file_filetransfer_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 5,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_filetransfer_proto_goTypes,
|
|
DependencyIndexes: file_filetransfer_proto_depIdxs,
|
|
MessageInfos: file_filetransfer_proto_msgTypes,
|
|
}.Build()
|
|
File_filetransfer_proto = out.File
|
|
file_filetransfer_proto_goTypes = nil
|
|
file_filetransfer_proto_depIdxs = nil
|
|
}
|