restic/backend/interface.go
2014-10-04 16:49:39 +02:00

26 lines
406 B
Go

package backend
type Type string
const (
Blob Type = "blob"
Key = "key"
Lock = "lock"
Snapshot = "snapshot"
Tree = "tree"
)
const (
BackendVersion = 1
)
type Server interface {
Create(Type, []byte) (ID, error)
Get(Type, ID) ([]byte, error)
List(Type) (IDs, error)
Test(Type, ID) (bool, error)
Remove(Type, ID) error
Version() uint
Location() string
}