mirror of
https://github.com/restic/restic.git
synced 2026-11-10 08:41:00 +00:00
repository: move Blob, Blobs and PackedBlob to pack package
This removes them from the public interface. The latter now only provides the PackBlob interface, without being bound to the type used internally by the pack package.
This commit is contained in:
1 parent
35af104749
commit
c062a78dcd
27 files changed
+373
-345
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package pack
|
||||
|
||||
import "github.com/restic/restic/internal/restic"
|
||||
|
||||
// PackedBlob is one index entry for a blob in a pack (may be duplicate across indexes).
|
||||
type PackedBlob struct {
|
||||
Pack restic.ID
|
||||
Blob Blob
|
||||
}
|
||||
|
||||
func (pb *PackedBlob) PackID() restic.ID { return pb.Pack }
|
||||
|
||||
func (pb *PackedBlob) Handle() restic.BlobHandle { return pb.Blob.BlobHandle }
|
||||
|
||||
func (pb *PackedBlob) CiphertextLength() uint { return pb.Blob.Length }
|
||||
|
||||
func (pb *PackedBlob) PlaintextLength() uint { return pb.Blob.DataLength() }
|
||||
|
||||
func (pb *PackedBlob) IsCompressed() bool { return pb.Blob.IsCompressed() }
|
||||
Reference in new issue
Block a user