Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChild ¶
Inserts child node into parent node. Parent will point to child and child will point to parent EXCEPT when parent is a TAG node. If parent is a Tag node, child should not point back to parent as URL nodes should always point to folder parent nodes only.
func FindNodeByName ¶
func MapNodeFunc ¶
Maps a func(*Node) to any node in the tree starting from node that matches the type nType
func WalkBuildIndex ¶
Rebuilds the memory url index after parsing all bookmarks. Keeps memory index in sync with last known state of browser bookmarks
Types ¶
type Node ¶
type Node struct { Title string Type NodeType // folder, tag, url URL string Tags []string Desc string Module string HasChanged bool NameHash uint64 // hash of the metadata Parent *Node Children []*Node }
A tree node
func FindParents ¶
Recursively traverse the tree from a root and find all occurences of [url] whose parent is a folder without using url.Parent as a reference Returns a list of nodes that match the criteria
func (*Node) DirectChildOf ¶
func (*Node) GetBookmark ¶
func (*Node) GetFolderParents ¶
Get all parents for node by traversing from leaf to root