diff --git a/src/restic/repository.go b/src/restic/repository.go new file mode 100644 index 000000000..1fba0ded7 --- /dev/null +++ b/src/restic/repository.go @@ -0,0 +1,19 @@ +package restic + +import ( + "restic/backend" + "restic/pack" +) + +// Repository manages encrypted and packed data stored in a backend. +type Repository interface { + LoadJSONUnpacked(backend.Type, backend.ID, interface{}) error + + Lister +} + +// Lister combines lists packs in a repo and blobs in a pack. +type Lister interface { + List(backend.Type, <-chan struct{}) <-chan backend.ID + ListPack(backend.ID) ([]pack.Blob, int64, error) +}