2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-18 11:05:18 +00:00
restic/backend/interface.go
2014-11-23 22:26:01 +01:00

36 lines
541 B
Go

package backend
import "errors"
type Type string
const (
Data Type = "data"
Key = "key"
Lock = "lock"
Snapshot = "snapshot"
Tree = "tree"
Map = "map"
)
const (
BackendVersion = 1
)
var (
ErrAlreadyPresent = errors.New("blob is already present in backend")
)
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
Close() error
Location() string
}