// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.6 // protoc v4.25.3 // source: snapshot.proto package grpc import ( _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" 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 FileInfo struct { state protoimpl.MessageState `protogen:"open.v1"` Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // Относительный путь файла внутри снапшота SizeBytes int64 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` // Размер файла в байтах Sha256Hash string `protobuf:"bytes,3,opt,name=sha256_hash,json=sha256Hash,proto3" json:"sha256_hash,omitempty"` // Хеш-сумма файла (SHA256) IsDir bool `protobuf:"varint,4,opt,name=is_dir,json=isDir,proto3" json:"is_dir,omitempty"` // Является ли запись директорией unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *FileInfo) Reset() { *x = FileInfo{} mi := &file_snapshot_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *FileInfo) String() string { return protoimpl.X.MessageStringOf(x) } func (*FileInfo) ProtoMessage() {} func (x *FileInfo) ProtoReflect() protoreflect.Message { mi := &file_snapshot_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 FileInfo.ProtoReflect.Descriptor instead. func (*FileInfo) Descriptor() ([]byte, []int) { return file_snapshot_proto_rawDescGZIP(), []int{0} } func (x *FileInfo) GetPath() string { if x != nil { return x.Path } return "" } func (x *FileInfo) GetSizeBytes() int64 { if x != nil { return x.SizeBytes } return 0 } func (x *FileInfo) GetSha256Hash() string { if x != nil { return x.Sha256Hash } return "" } func (x *FileInfo) GetIsDir() bool { if x != nil { return x.IsDir } return false } // Краткая информация о снапшоте type SnapshotInfo struct { state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Уникальный ID снапшота (UUID) Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Имя снапшота ParentId string `protobuf:"bytes,3,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"` // ID родительского снапшота (может быть пустым) CreationTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` // Время создания unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SnapshotInfo) Reset() { *x = SnapshotInfo{} mi := &file_snapshot_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *SnapshotInfo) String() string { return protoimpl.X.MessageStringOf(x) } func (*SnapshotInfo) ProtoMessage() {} func (x *SnapshotInfo) ProtoReflect() protoreflect.Message { mi := &file_snapshot_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 SnapshotInfo.ProtoReflect.Descriptor instead. func (*SnapshotInfo) Descriptor() ([]byte, []int) { return file_snapshot_proto_rawDescGZIP(), []int{1} } func (x *SnapshotInfo) GetId() string { if x != nil { return x.Id } return "" } func (x *SnapshotInfo) GetName() string { if x != nil { return x.Name } return "" } func (x *SnapshotInfo) GetParentId() string { if x != nil { return x.ParentId } return "" } func (x *SnapshotInfo) GetCreationTime() *timestamppb.Timestamp { if x != nil { return x.CreationTime } return nil } // Детальная информация о снапшоте type SnapshotDetails struct { state protoimpl.MessageState `protogen:"open.v1"` Info *SnapshotInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // Краткая информация Files []*FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"` // Список файлов в снапшоте unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SnapshotDetails) Reset() { *x = SnapshotDetails{} mi := &file_snapshot_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *SnapshotDetails) String() string { return protoimpl.X.MessageStringOf(x) } func (*SnapshotDetails) ProtoMessage() {} func (x *SnapshotDetails) ProtoReflect() protoreflect.Message { mi := &file_snapshot_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 SnapshotDetails.ProtoReflect.Descriptor instead. func (*SnapshotDetails) Descriptor() ([]byte, []int) { return file_snapshot_proto_rawDescGZIP(), []int{2} } func (x *SnapshotDetails) GetInfo() *SnapshotInfo { if x != nil { return x.Info } return nil } func (x *SnapshotDetails) GetFiles() []*FileInfo { if x != nil { return x.Files } return nil } // Запрос на получение списка снапшотов (можно добавить фильтры/пагинацию) type ListSnapshotsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ListSnapshotsRequest) Reset() { *x = ListSnapshotsRequest{} mi := &file_snapshot_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ListSnapshotsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListSnapshotsRequest) ProtoMessage() {} func (x *ListSnapshotsRequest) ProtoReflect() protoreflect.Message { mi := &file_snapshot_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 ListSnapshotsRequest.ProtoReflect.Descriptor instead. func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { return file_snapshot_proto_rawDescGZIP(), []int{3} } // Ответ со списком снапшотов type ListSnapshotsResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Snapshots []*SnapshotInfo `protobuf:"bytes,1,rep,name=snapshots,proto3" json:"snapshots,omitempty"` // string next_page_token = 2; unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ListSnapshotsResponse) Reset() { *x = ListSnapshotsResponse{} mi := &file_snapshot_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ListSnapshotsResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListSnapshotsResponse) ProtoMessage() {} func (x *ListSnapshotsResponse) ProtoReflect() protoreflect.Message { mi := &file_snapshot_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 ListSnapshotsResponse.ProtoReflect.Descriptor instead. func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) { return file_snapshot_proto_rawDescGZIP(), []int{4} } func (x *ListSnapshotsResponse) GetSnapshots() []*SnapshotInfo { if x != nil { return x.Snapshots } return nil } // Запрос на получение деталей снапшота type GetSnapshotDetailsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` SnapshotId string `protobuf:"bytes,1,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` // ID нужного снапшота unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GetSnapshotDetailsRequest) Reset() { *x = GetSnapshotDetailsRequest{} mi := &file_snapshot_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *GetSnapshotDetailsRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*GetSnapshotDetailsRequest) ProtoMessage() {} func (x *GetSnapshotDetailsRequest) ProtoReflect() protoreflect.Message { mi := &file_snapshot_proto_msgTypes[5] 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 GetSnapshotDetailsRequest.ProtoReflect.Descriptor instead. func (*GetSnapshotDetailsRequest) Descriptor() ([]byte, []int) { return file_snapshot_proto_rawDescGZIP(), []int{5} } func (x *GetSnapshotDetailsRequest) GetSnapshotId() string { if x != nil { return x.SnapshotId } return "" } // Запрос на скачивание файла type DownloadFileRequest struct { state protoimpl.MessageState `protogen:"open.v1"` SnapshotId string `protobuf:"bytes,1,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` // ID снапшота FilePath string `protobuf:"bytes,2,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` // Путь к файлу внутри снапшота unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *DownloadFileRequest) Reset() { *x = DownloadFileRequest{} mi := &file_snapshot_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *DownloadFileRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DownloadFileRequest) ProtoMessage() {} func (x *DownloadFileRequest) ProtoReflect() protoreflect.Message { mi := &file_snapshot_proto_msgTypes[6] 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 DownloadFileRequest.ProtoReflect.Descriptor instead. func (*DownloadFileRequest) Descriptor() ([]byte, []int) { return file_snapshot_proto_rawDescGZIP(), []int{6} } func (x *DownloadFileRequest) GetSnapshotId() string { if x != nil { return x.SnapshotId } return "" } func (x *DownloadFileRequest) GetFilePath() string { if x != nil { return x.FilePath } return "" } // Ответ (часть файла) при скачивании type DownloadFileResponse struct { state protoimpl.MessageState `protogen:"open.v1"` ChunkData []byte `protobuf:"bytes,1,opt,name=chunk_data,json=chunkData,proto3" json:"chunk_data,omitempty"` // Кусочек данных файла unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *DownloadFileResponse) Reset() { *x = DownloadFileResponse{} mi := &file_snapshot_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *DownloadFileResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DownloadFileResponse) ProtoMessage() {} func (x *DownloadFileResponse) ProtoReflect() protoreflect.Message { mi := &file_snapshot_proto_msgTypes[7] 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 DownloadFileResponse.ProtoReflect.Descriptor instead. func (*DownloadFileResponse) Descriptor() ([]byte, []int) { return file_snapshot_proto_rawDescGZIP(), []int{7} } func (x *DownloadFileResponse) GetChunkData() []byte { if x != nil { return x.ChunkData } return nil } var File_snapshot_proto protoreflect.FileDescriptor const file_snapshot_proto_rawDesc = "" + "\n" + "\x0esnapshot.proto\x12\n" + "agate.grpc\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto\"u\n" + "\bFileInfo\x12\x12\n" + "\x04path\x18\x01 \x01(\tR\x04path\x12\x1d\n" + "\n" + "size_bytes\x18\x02 \x01(\x03R\tsizeBytes\x12\x1f\n" + "\vsha256_hash\x18\x03 \x01(\tR\n" + "sha256Hash\x12\x15\n" + "\x06is_dir\x18\x04 \x01(\bR\x05isDir\"\x90\x01\n" + "\fSnapshotInfo\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + "\x04name\x18\x02 \x01(\tR\x04name\x12\x1b\n" + "\tparent_id\x18\x03 \x01(\tR\bparentId\x12?\n" + "\rcreation_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\fcreationTime\"k\n" + "\x0fSnapshotDetails\x12,\n" + "\x04info\x18\x01 \x01(\v2\x18.agate.grpc.SnapshotInfoR\x04info\x12*\n" + "\x05files\x18\x02 \x03(\v2\x14.agate.grpc.FileInfoR\x05files\"\x16\n" + "\x14ListSnapshotsRequest\"O\n" + "\x15ListSnapshotsResponse\x126\n" + "\tsnapshots\x18\x01 \x03(\v2\x18.agate.grpc.SnapshotInfoR\tsnapshots\"<\n" + "\x19GetSnapshotDetailsRequest\x12\x1f\n" + "\vsnapshot_id\x18\x01 \x01(\tR\n" + "snapshotId\"S\n" + "\x13DownloadFileRequest\x12\x1f\n" + "\vsnapshot_id\x18\x01 \x01(\tR\n" + "snapshotId\x12\x1b\n" + "\tfile_path\x18\x02 \x01(\tR\bfilePath\"5\n" + "\x14DownloadFileResponse\x12\x1d\n" + "\n" + "chunk_data\x18\x01 \x01(\fR\tchunkData2\x8a\x03\n" + "\x0fSnapshotService\x12k\n" + "\rListSnapshots\x12 .agate.grpc.ListSnapshotsRequest\x1a!.agate.grpc.ListSnapshotsResponse\"\x15\x82\xd3\xe4\x93\x02\x0f\x12\r/v1/snapshots\x12}\n" + "\x12GetSnapshotDetails\x12%.agate.grpc.GetSnapshotDetailsRequest\x1a\x1b.agate.grpc.SnapshotDetails\"#\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/snapshots/{snapshot_id}\x12\x8a\x01\n" + "\fDownloadFile\x12\x1f.agate.grpc.DownloadFileRequest\x1a .agate.grpc.DownloadFileResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1/snapshots/{snapshot_id}/files/{file_path}0\x01B\x1cZ\x1aunprism.ru/KRBL/agate/grpcb\x06proto3" var ( file_snapshot_proto_rawDescOnce sync.Once file_snapshot_proto_rawDescData []byte ) func file_snapshot_proto_rawDescGZIP() []byte { file_snapshot_proto_rawDescOnce.Do(func() { file_snapshot_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_snapshot_proto_rawDesc), len(file_snapshot_proto_rawDesc))) }) return file_snapshot_proto_rawDescData } var file_snapshot_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_snapshot_proto_goTypes = []any{ (*FileInfo)(nil), // 0: agate.grpc.FileInfo (*SnapshotInfo)(nil), // 1: agate.grpc.SnapshotInfo (*SnapshotDetails)(nil), // 2: agate.grpc.SnapshotDetails (*ListSnapshotsRequest)(nil), // 3: agate.grpc.ListSnapshotsRequest (*ListSnapshotsResponse)(nil), // 4: agate.grpc.ListSnapshotsResponse (*GetSnapshotDetailsRequest)(nil), // 5: agate.grpc.GetSnapshotDetailsRequest (*DownloadFileRequest)(nil), // 6: agate.grpc.DownloadFileRequest (*DownloadFileResponse)(nil), // 7: agate.grpc.DownloadFileResponse (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp } var file_snapshot_proto_depIdxs = []int32{ 8, // 0: agate.grpc.SnapshotInfo.creation_time:type_name -> google.protobuf.Timestamp 1, // 1: agate.grpc.SnapshotDetails.info:type_name -> agate.grpc.SnapshotInfo 0, // 2: agate.grpc.SnapshotDetails.files:type_name -> agate.grpc.FileInfo 1, // 3: agate.grpc.ListSnapshotsResponse.snapshots:type_name -> agate.grpc.SnapshotInfo 3, // 4: agate.grpc.SnapshotService.ListSnapshots:input_type -> agate.grpc.ListSnapshotsRequest 5, // 5: agate.grpc.SnapshotService.GetSnapshotDetails:input_type -> agate.grpc.GetSnapshotDetailsRequest 6, // 6: agate.grpc.SnapshotService.DownloadFile:input_type -> agate.grpc.DownloadFileRequest 4, // 7: agate.grpc.SnapshotService.ListSnapshots:output_type -> agate.grpc.ListSnapshotsResponse 2, // 8: agate.grpc.SnapshotService.GetSnapshotDetails:output_type -> agate.grpc.SnapshotDetails 7, // 9: agate.grpc.SnapshotService.DownloadFile:output_type -> agate.grpc.DownloadFileResponse 7, // [7:10] is the sub-list for method output_type 4, // [4:7] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_snapshot_proto_init() } func file_snapshot_proto_init() { if File_snapshot_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_snapshot_proto_rawDesc), len(file_snapshot_proto_rawDesc)), NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 1, }, GoTypes: file_snapshot_proto_goTypes, DependencyIndexes: file_snapshot_proto_depIdxs, MessageInfos: file_snapshot_proto_msgTypes, }.Build() File_snapshot_proto = out.File file_snapshot_proto_goTypes = nil file_snapshot_proto_depIdxs = nil }