mirror of
https://github.com/restic/restic.git
synced 2026-10-05 02:10:29 +00:00
restic: change ListBlobs to return PackBlob
PackBlob is a limited interface that only exposes a part of the information provided by PackedBlob. Most of the changes are switches from direct value lookups to the interface methods, with a few larger changes to let the tests still work.
This commit is contained in:
@@ -30,7 +30,7 @@ type Repository interface {
|
||||
NewAssociatedBlobSet() AssociatedBlobSet
|
||||
// ListBlobs runs fn on all blobs known to the index. When the context is cancelled,
|
||||
// the index iteration returns immediately with ctx.Err(). This blocks any modification of the index.
|
||||
ListBlobs(ctx context.Context, fn func(PackedBlob)) error
|
||||
ListBlobs(ctx context.Context, fn func(PackBlob)) error
|
||||
// ListPackHandles returns the blob handles stored in the pack file header.
|
||||
ListPackHandles(ctx context.Context, id ID, packSize int64) ([]BlobHandle, error)
|
||||
|
||||
@@ -152,7 +152,7 @@ type Unpacked[FT FileTypes] interface {
|
||||
}
|
||||
|
||||
type ListBlobser interface {
|
||||
ListBlobs(ctx context.Context, fn func(PackedBlob)) error
|
||||
ListBlobs(ctx context.Context, fn func(PackBlob)) error
|
||||
}
|
||||
|
||||
type BlobLoader interface {
|
||||
|
||||
Reference in New Issue
Block a user