node

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node is an element Tree gets composed from (a path enriched with hierarchical and connection metadata)

func NewNode

func NewNode(name, path, parent string, children []string, levelID int, terminal bool) Node

NewNode creates a new Node instance

func (Node) HasChildren

func (n Node) HasChildren() bool

HasChildren tells us if that node has child nodes (i.e. if node is a parent itself)

func (Node) IsAChildOf

func (n Node) IsAChildOf(pn Node) bool

IsAChildOf tells us if current node is a child of another node

func (Node) IsTerminal

func (n Node) IsTerminal() bool

IsTerminal tells us if that node has can be used as a tree exit point

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL