mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 14:56:29 +00:00
Add global interface Repository
This commit is contained in:
parent
3fa7304e94
commit
3b57075109
19
src/restic/repository.go
Normal file
19
src/restic/repository.go
Normal file
@ -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)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user