Versions in this module Expand all Collapse all v0 v0.1.0 Jan 6, 2024 Changes in this version + type Node interface + AddAnnotation func(key, value string) + AddChild func(child Node) bool + AddData func(key string, value []byte) + Annotations func() map[string]string + Children func() map[string]Node + Data func() map[string][]byte + DeleteChild func(childID uid.UID) bool + HasChild func(childID uid.UID) bool + ID func() uid.UID + IsLeaf func() bool + IsRoot func() bool + Parent func() Node + SetAnnotations func(anno map[string]string) + SetData func(data map[string][]byte) + SetParent func(parent Node) + func NewNode(id uid.UID) Node + type NodeDump struct + Annotations map[string]string + Children []NodeDump + Data map[string][]byte + ID string + type Tree interface + AddBranch func(name string, nodeID uid.UID) error + AddNode func(parentID uid.UID, node Node) error + AddTag func(name string, nodeID uid.UID) error + Branches func() map[string]Node + DeleteTag func(name string) bool + Get func(id uid.UID) (Node, bool) + GetByBranch func(name string) (Node, bool) + GetByTag func(name string) (Node, bool) + Root func() Node + Search func(key string) (Node, bool) + Tags func() map[string]Node + UpdateBranch func(name string, nodeID uid.UID, force bool) error + func Load(dump TreeDump) (Tree, error) + func NewTree() Tree + type TreeDump struct + Branches map[string]string + Nodes *NodeDump + Tags map[string]string + func Dump(tree Tree) TreeDump