Versions in this module Expand all Collapse all v0 v0.2.1 Oct 26, 2018 v0.2.0 Oct 23, 2018 Changes in this version + const InfiniteDepth + const TraverseChildren + const TraverseParents + var ErrRelationshipWalkHalted = errors.New("relationship walk has reached a termination point") + var ErrTraversalPathEnded = errors.New("traversal path has hit the final element") + var ErrWalkDirectionUndefined = errors.New("a walk direction of an unknown type has been given") + func AssociateChildren(subject Relationship, children ...Relationship) + func AssociateParents(subject Relationship, parents ...Relationship) + func HasChild(host Relationship, question Relationship) bool + func HasIndirectChild(host Relationship, question Relationship) bool + func HasIndirectParent(host Relationship, question Relationship) bool + func HasParent(host Relationship, question Relationship) bool + func WalkRelationship(base Relationship, maxdepth int, offset int, direction WalkDirection, ...) error + type DotNode interface + GetGCost func() int64 + GetGID func() int + Label func() string + type DotWriter struct + MaxDepth int + Reversed bool + func NewDotWriter(output io.Writer, maxdepth int, reversed bool) *DotWriter + func (dw *DotWriter) PlotGraph(root Relationship) + type Hasher interface + Hash func() uint64 + type ItemGraph struct + func (g *ItemGraph) AddEdge(n1, n2 *Node) + func (g *ItemGraph) AddNode(n *Node) + func (g *ItemGraph) String() + func (g *ItemGraph) Traverse(f func(*Node)) + type Node struct + func ToNode(rel Relationship) *Node + func (n *Node) String() string + type NodeQueue struct + func (s *NodeQueue) Dequeue() *Node + func (s *NodeQueue) Enqueue(t Node) + func (s *NodeQueue) Front() *Node + func (s *NodeQueue) IsEmpty() bool + func (s *NodeQueue) New() *NodeQueue + func (s *NodeQueue) Size() int + type Relationship interface + AddChild func(r ...Relationship) + AddParent func(r ...Relationship) + Children func() []Relationship + ChildrenIDs func() []string + GetID func() string + ParentIDs func() []string + Parents func() []Relationship + type RelationshipWalkFunc func(rel Relationship, distance int) error + type WalkDirection int