1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00
any-sync/common/pkg/acl/storage/provider.go
Sergey Cherepanov daa9bb1df0
move pkgs
2022-10-17 14:11:55 +03:00

22 lines
642 B
Go

package storage
import (
"errors"
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/pkg/acl/treechangeproto"
)
var ErrUnknownTreeId = errors.New("tree does not exist")
var ErrTreeExists = errors.New("tree already exists")
var ErrUnkownChange = errors.New("change doesn't exist")
type TreeStorageCreatePayload struct {
TreeId string
RootRawChange *treechangeproto.RawTreeChangeWithId
Changes []*treechangeproto.RawTreeChangeWithId
Heads []string
}
type Provider interface {
TreeStorage(id string) (TreeStorage, error)
CreateTreeStorage(payload TreeStorageCreatePayload) (TreeStorage, error)
}