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:
Michael Eischer committed 2026-06-13 18:58:37 +02:00
1 parent 35af104749
commit c062a78dcd
27 files changed
+373 -345

No files matched your search

+4 -3
View File
@@ -1,14 +1,15 @@
package repository
import (
"github.com/restic/restic/internal/repository/pack"
"github.com/restic/restic/internal/restic"
)
// BlobsInPack returns index entries for blobs stored in packID, sorted by offset.
func BlobsInPack(repo *Repository, packID restic.ID) restic.Blobs {
var blobs restic.Blobs
func BlobsInPack(repo *Repository, packID restic.ID) pack.Blobs {
var blobs pack.Blobs
for pb := range repo.idx.Values() {
if pb.PackID.Equal(packID) {
if pb.PackID().Equal(packID) {
blobs = append(blobs, pb.Blob)
}
}