Documentation ¶
Index ¶
- Constants
- type Composite
- func (s *Composite) Attr(label string, value interface{}) dot.Node
- func (s *Composite) Export(build func(g *dot.Graph)) *Composite
- func (s *Composite) ExportFile() error
- func (s *Composite) ExportFilename() string
- func (s *Composite) ExportName(name string)
- func (s *Composite) Input(id string, from Connectable) dot.Edge
- func (s *Composite) Output(id string, to Connectable) dot.Edge
- type Connectable
Constants ¶
const ( // SameGraph means that the composite graph will be a cluster within the graph. SameGraph compositeGraphKind = iota // ExternalGraph means the composite graph will be exported on its own, linked by the node within the graph ExternalGraph )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Composite ¶
Composite is a graph and node to create abstractions in graphs.
func NewComposite ¶
NewComposite creates a Composite abstraction that is represented as a Node (box3d shape) in the graph. The kind determines whether the graph of the composite is embedded (same graph) or external.
func (*Composite) Export ¶
Export writes the DOT file for a Composite after building the content (child) graph using the build function. Use ExportName() on the Composite to modify the filename used. If writing of the file fails then a warning is logged.
func (*Composite) ExportFile ¶
ExportFile creates a DOT file using the default name (based on name) or overridden using ExportName().
func (*Composite) ExportFilename ¶ added in v1.4.1
ExportFilename returns the name of the file used by ExportFile. Override it using ExportName.
func (*Composite) ExportName ¶
ExportName argument name will be used for the .dot export and the HREF link using svg So if name = "my example" then export will create "my_example.dot" and the link will be "my_example.svg"
func (*Composite) Input ¶
func (s *Composite) Input(id string, from Connectable) dot.Edge
Input creates an edge. If the from Connectable is part of the parent graph then the edge is added to the parent graph. If the from Connectable is part of the composite then the edge is added to the inner graph.
type Connectable ¶ added in v1.4.2
Connectable is a dot.Node or a *dotx.Composite