Change interfaces for import tree
This commit is contained in:
parent
4e76451bf8
commit
5a6af6dd2c
@ -6,6 +6,13 @@ import (
|
||||
"github.com/anytypeio/any-sync/commonspace/object/tree/treestorage"
|
||||
)
|
||||
|
||||
func ViewObjectTree(listStorage liststorage.ListStorage, treeStorage treestorage.TreeStorage) (objecttree.ReadableObjectTree, error) {
|
||||
type TreeImportParams struct {
|
||||
ListStorage liststorage.ListStorage
|
||||
TreeStorage treestorage.TreeStorage
|
||||
BeforeId string
|
||||
IncludeBeforeId bool
|
||||
}
|
||||
|
||||
func ImportHistoryTree(params TreeImportParams) (objecttree.ReadableObjectTree, error) {
|
||||
return nil, nil
|
||||
}
|
||||
@ -91,13 +91,13 @@ func BuildObjectTree(treeStorage treestorage.TreeStorage, aclList list.AclList)
|
||||
return buildObjectTree(deps)
|
||||
}
|
||||
|
||||
func BuildNonVerifiableTree(treeStorage treestorage.TreeStorage, aclList list.AclList) (ObjectTree, error) {
|
||||
rootChange, err := treeStorage.Root()
|
||||
func BuildNonVerifiableHistoryTree(params HistoryTreeParams) (HistoryTree, error) {
|
||||
rootChange, err := params.TreeStorage.Root()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
deps := nonVerifiableTreeDeps(rootChange, treeStorage, aclList)
|
||||
return buildObjectTree(deps)
|
||||
deps := nonVerifiableTreeDeps(rootChange, params.TreeStorage, params.AclList)
|
||||
return buildHistoryTree(deps, params)
|
||||
}
|
||||
|
||||
func BuildHistoryTree(params HistoryTreeParams) (HistoryTree, error) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user