Documentation ¶
Index ¶
- func Create(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, newKey string, err error)
- func Delete(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, err error)
- func DeleteIDDeltas(g *d2graph.Graph, boardPath []string, key string) (deltas map[string]string, err error)
- func GetBoardGraph(g *d2graph.Graph, boardPath []string) *d2graph.Graph
- func GetChildrenIDs(g *d2graph.Graph, boardPath []string, absID string) (ids []string, _ error)
- func GetEdge(g *d2graph.Graph, boardPath []string, absID string) *d2graph.Edge
- func GetID(key string) string
- func GetObj(g *d2graph.Graph, boardPath []string, absID string) *d2graph.Object
- func GetObjOrder(g *d2graph.Graph, boardPath []string) ([]string, error)
- func GetParentID(g *d2graph.Graph, boardPath []string, absID string) (string, error)
- func GetWriteableEdgeRefs(edge *d2graph.Edge, writeableAST *d2ast.Map) (out []d2graph.EdgeReference)
- func GetWriteableRefs(obj *d2graph.Object, writeableAST *d2ast.Map) (out []d2graph.Reference)
- func IsImportedEdge(ast *d2ast.Map, edge *d2graph.Edge) bool
- func IsImportedObj(ast *d2ast.Map, obj *d2graph.Object) bool
- func IsLabelKeyID(key, label string) bool
- func Move(g *d2graph.Graph, boardPath []string, key, newKey string, ...) (_ *d2graph.Graph, err error)
- func MoveIDDeltas(g *d2graph.Graph, key, newKey string, includeDescendants bool) (deltas map[string]string, err error)
- func ReconnectEdge(g *d2graph.Graph, boardPath []string, edgeKey string, srcKey, dstKey *string) (_ *d2graph.Graph, err error)
- func ReconnectEdgeIDDeltas(g *d2graph.Graph, boardPath []string, edgeKey string, srcKey, dstKey *string) (deltas map[string]string, err error)
- func Rename(g *d2graph.Graph, boardPath []string, key, newName string) (_ *d2graph.Graph, newKey string, err error)
- func RenameIDDeltas(g *d2graph.Graph, boardPath []string, key, newName string) (deltas map[string]string, err error)
- func ReparentIDDelta(g *d2graph.Graph, boardPath []string, key, parentKey string) (string, error)
- func ReplaceBoardNode(ast, ast2 *d2ast.Map, boardPath []string) bool
- func Set(g *d2graph.Graph, boardPath []string, key string, tag, value *string) (_ *d2graph.Graph, err error)
- type OutsideScopeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteIDDeltas ¶
func GetBoardGraph ¶ added in v0.6.0
func GetChildrenIDs ¶ added in v0.5.0
func GetObjOrder ¶ added in v0.5.0
func GetParentID ¶
func GetWriteableEdgeRefs ¶ added in v0.6.4
func GetWriteableRefs ¶ added in v0.6.4
func IsImportedEdge ¶ added in v0.6.4
Glob creations count as imported for now TODO Probably rename later
func IsLabelKeyID ¶
func Move ¶
func Move(g *d2graph.Graph, boardPath []string, key, newKey string, includeDescendants bool) (_ *d2graph.Graph, err error)
Does not handle edge keys, on account of edge keys can only be reserved, e.g. (a->b).style.color: red
func MoveIDDeltas ¶
func ReconnectEdge ¶ added in v0.5.0
func ReconnectEdgeIDDeltas ¶ added in v0.5.0
func RenameIDDeltas ¶
func ReparentIDDelta ¶
func ReplaceBoardNode ¶ added in v0.6.0
Types ¶
type OutsideScopeError ¶ added in v0.6.0
type OutsideScopeError struct{}
func (OutsideScopeError) Error ¶ added in v0.6.0
func (e OutsideScopeError) Error() string
Click to show internal directories.
Click to hide internal directories.