component

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	From string
	To   string
	//The file in which the connection is made. The from side.
	File  string
	Begin *file.Position
	End   *file.Position
}

Connection is a connection between two components.

func GetConnections

func GetConnections(snippetsByType file.SnippetGroup, snippetsByComponent file.SnippetGroup) []*Connection

type Graph

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

func CreateGraph

func CreateGraph(connections []*Connection) *Graph

func (*Graph) ComponentToId

func (c *Graph) ComponentToId(name string) int64

func (*Graph) ComponentToNode

func (c *Graph) ComponentToNode(name string) graph.Node

func (*Graph) Edge

func (c *Graph) Edge(xid, yid int64) graph.Edge

func (*Graph) From

func (c *Graph) From(id int64) graph.Nodes

func (*Graph) HasEdgeBetween

func (c *Graph) HasEdgeBetween(xid, yid int64) bool

func (*Graph) HasEdgeFromTo

func (c *Graph) HasEdgeFromTo(xid, yid int64) bool

func (*Graph) IdToComponent

func (c *Graph) IdToComponent(id int64) string

func (*Graph) Node

func (c *Graph) Node(id int64) graph.Node

func (*Graph) Nodes

func (c *Graph) Nodes() graph.Nodes

func (*Graph) To

func (c *Graph) To(id int64) graph.Nodes

Jump to

Keyboard shortcuts

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