mirror of
https://github.com/octoleo/restic.git
synced 2024-06-01 08:30:49 +00:00
22 lines
509 B
Go
22 lines
509 B
Go
package types
|
|
|
|
import (
|
|
"restic"
|
|
"restic/backend"
|
|
"restic/pack"
|
|
)
|
|
|
|
// Repository manages encrypted and packed data stored in a backend.
|
|
type Repository interface {
|
|
LoadJSONUnpacked(restic.FileType, backend.ID, interface{}) error
|
|
SaveJSONUnpacked(restic.FileType, interface{}) (backend.ID, error)
|
|
|
|
Lister
|
|
}
|
|
|
|
// Lister combines lists packs in a repo and blobs in a pack.
|
|
type Lister interface {
|
|
List(restic.FileType, <-chan struct{}) <-chan backend.ID
|
|
ListPack(backend.ID) ([]pack.Blob, int64, error)
|
|
}
|