any-sync/pkg/acl/storage/provider.go

21 lines
524 B
Go

package storage
import (
"errors"
"github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/acl/treechangeproto"
)
var ErrUnknownTreeId = errors.New("tree does not 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)
}