package dagro

Import Path
	github.com/d2lang/dagro (on go.dev)

Dependency Relation
	imports 12 packages, and imported by one package


Package-Level Type Names (total 6)
/* sort by: | */
Attrs is Dagro's equivalent of a JavaScript object used as a graph, node, or edge label by the verified Dagre profile.
Edge uniquely identifies an edge. HasName distinguishes an unnamed edge from a named edge whose name happens to be empty. HasName bool Name string V string W string func (*Graph).Edges() []Edge func (*Graph).InEdges(v string, u ...string) []Edge func (*Graph).NodeEdges(v string, w ...string) []Edge func (*Graph).OutEdges(v string, w ...string) []Edge func (*Graph).Edge(e Edge) any func (*Graph).HasEdgeObject(e Edge) bool func (*Graph).RemoveEdge(e Edge) *Graph func (*Graph).SetEdgeObject(e Edge, value ...any) *Graph
Graph implements the D2-used Graphlib 4.0.5 operations plus the operations required by Dagre's verified default layout path. (*Graph) Children(v ...string) []string (*Graph) Edge(e Edge) any (*Graph) EdgeByArgs(v, w string, name ...string) any (*Graph) EdgeCount() int (*Graph) Edges() []Edge FilterNodes returns a graph containing the nodes accepted by filter and the edges between them. A retained compound node is attached to its nearest retained ancestor when its immediate parent is filtered out. (*Graph) Graph() any (*Graph) HasEdge(v, w string, name ...string) bool (*Graph) HasEdgeObject(e Edge) bool (*Graph) HasNode(v string) bool (*Graph) InEdges(v string, u ...string) []Edge (*Graph) IsCompound() bool (*Graph) IsDirected() bool (*Graph) IsLeaf(v string) bool (*Graph) IsMultigraph() bool (*Graph) Neighbors(v string) []string (*Graph) Node(v string) any (*Graph) NodeCount() int (*Graph) NodeEdges(v string, w ...string) []Edge (*Graph) Nodes() []string (*Graph) OutEdges(v string, w ...string) []Edge (*Graph) Parent(v string) (string, bool) (*Graph) Predecessors(v string) []string (*Graph) RemoveEdge(e Edge) *Graph (*Graph) RemoveEdgeByArgs(v, w string, name ...string) *Graph (*Graph) RemoveNode(v string) *Graph (*Graph) SetDefaultEdgeLabel(value any) *Graph (*Graph) SetDefaultNodeLabel(value any) *Graph (*Graph) SetEdge(v, w string, args ...any) *Graph SetEdgeObject is the edge-object form of graphlib's setEdge. (*Graph) SetGraph(label any) *Graph (*Graph) SetNode(v string, value ...any) *Graph (*Graph) SetNodes(vs []string, value ...any) *Graph (*Graph) SetParent(v string, parent ...string) error (*Graph) SetPath(vs []string, value ...any) *Graph (*Graph) Sinks() []string (*Graph) Sources() []string (*Graph) Successors(v string) []string func DebugOrdering(g *Graph) *Graph func NewGraph(opts ...GraphOptions) *Graph func (*Graph).FilterNodes(filter func(string) bool) *Graph func (*Graph).RemoveEdge(e Edge) *Graph func (*Graph).RemoveEdgeByArgs(v, w string, name ...string) *Graph func (*Graph).RemoveNode(v string) *Graph func (*Graph).SetDefaultEdgeLabel(value any) *Graph func (*Graph).SetDefaultNodeLabel(value any) *Graph func (*Graph).SetEdge(v, w string, args ...any) *Graph func (*Graph).SetEdgeObject(e Edge, value ...any) *Graph func (*Graph).SetGraph(label any) *Graph func (*Graph).SetNode(v string, value ...any) *Graph func (*Graph).SetNodes(vs []string, value ...any) *Graph func (*Graph).SetPath(vs []string, value ...any) *Graph func DebugOrdering(g *Graph) *Graph func Layout(g *Graph, options ...LayoutOptions) error
GraphOptions is the D2-used subset of Graphlib 4.0.5's Graph options. Compound bool Directed bool Multigraph bool Undirected bool func NewGraph(opts ...GraphOptions) *Graph
LayoutOptions controls optional diagnostic behavior. DebugTiming bool func Layout(g *Graph, options ...LayoutOptions) error
Point is a point in the coordinate system produced by Layout. X float64 Y float64
Package-Level Functions (total 5)
DebugOrdering returns the ordering graph produced by Dagre's debug helper.
Layout runs the verified Dagre 3.1.1 default-path profile and writes coordinates and routes back to g. The input graph's topology is not modified.
NewGraph constructs a graph. Graphs are directed by default, matching graphlib; set Undirected for an undirected graph.
NoTime evaluates fn without timing or logging, matching Dagre's util.notime.
Time evaluates fn and logs its elapsed wall time, matching Dagre's public util.time helper. The deferred log preserves the upstream finally behavior.
Package-Level Constants (total 2)
GraphlibVersion identifies the Graphlib behavioral source used by the port.
Version identifies the Dagre behavioral source targeted by the D2 profile.