Files
restic/internal/repository/index_testutil_test.go
T
Michael Eischer e247118f49 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.
2026-06-05 12:25:03 +02:00

19 lines
441 B
Go

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) pack.Blobs {
var blobs pack.Blobs
for pb := range repo.idx.Values() {
if pb.PackID().Equal(packID) {
blobs = append(blobs, pb.Blob)
}
}
blobs.Sort()
return blobs
}