mirror of
https://github.com/restic/restic.git
synced 2026-06-06 17:09:44 +00:00
e247118f49
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.
19 lines
441 B
Go
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
|
|
}
|