1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-11 10:18:08 +09:00
any-sync/pkg/acl/storage/treestorage.go
2022-09-12 21:25:20 +02:00

18 lines
498 B
Go

package storage
import (
"context"
"github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/acl/aclchanges/aclpb"
)
type TreeStorage interface {
Storage
Header() (*aclpb.TreeHeader, error)
Heads() ([]string, error)
SetHeads(heads []string) error
AddRawChange(change *aclpb.RawTreeChangeWithId) error
GetRawChange(ctx context.Context, recordID string) (*aclpb.RawTreeChangeWithId, error)
}
type TreeStorageCreatorFunc = func(payload TreeStorageCreatePayload) (TreeStorage, error)