Documentation ¶
Overview ¶
Package graph has all the Graph logic that we need to interact with Graph, Node and Edge.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edge ¶
type Edge struct { ID string Canonicals []string Source string Target string // contains filtered or unexported fields }
Edge defines the standard format of an Edge
func (*Edge) AddCanonicals ¶
AddCanonicals adds the cans to the internal list, if one is repeated it'll be ignored
type Graph ¶
Graph defines the standard format of a Graph
func (*Graph) GetEdgesForNode ¶
GetEdgesForNode returns all the edges that have relation to this nID
func (*Graph) GetNodeByID ¶
GetNodeByID returns the requested Node with the nID
func (*Graph) InvertEdge ¶
InvertEdge inverts the Source and Target of the eID
type Node ¶
type Node struct { // ID it'a a random UUID ID string // Canonical it's 'aws_lb.front' format Canonical string // Position holds the position of the node if any Position []int // x, y // TFID it's the internal ID it has on TF TFID string // Resource it's the information of the resource // it holds Resource resource.Resource // Weight is the addition of the Directions // of the Node Weight int }
Node defines the standard format of an Edge
Click to show internal directories.
Click to hide internal directories.