d2oracle

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MPL-2.0 Imports: 15 Imported by: 5 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, newKey string, err error)

func Delete

func Delete(g *d2graph.Graph, boardPath []string, key string) (_ *d2graph.Graph, err error)

func DeleteIDDeltas

func DeleteIDDeltas(g *d2graph.Graph, boardPath []string, key string) (deltas map[string]string, err error)

func GetBoardGraph

func GetBoardGraph(g *d2graph.Graph, boardPath []string) *d2graph.Graph

func GetChildrenIDs

func GetChildrenIDs(g *d2graph.Graph, boardPath []string, absID string) (ids []string, _ error)

func GetEdge

func GetEdge(g *d2graph.Graph, boardPath []string, absID string) *d2graph.Edge

func GetID

func GetID(key string) string

func GetObj

func GetObj(g *d2graph.Graph, boardPath []string, absID string) *d2graph.Object

func GetObjOrder

func GetObjOrder(g *d2graph.Graph, boardPath []string) ([]string, error)

func GetParentID

func GetParentID(g *d2graph.Graph, boardPath []string, absID string) (string, error)

func GetWriteableEdgeRefs

func GetWriteableEdgeRefs(edge *d2graph.Edge, writeableAST *d2ast.Map) (out []d2graph.EdgeReference)

func GetWriteableRefs

func GetWriteableRefs(obj *d2graph.Object, writeableAST *d2ast.Map) (out []d2graph.Reference)

func IsImportedEdge

func IsImportedEdge(ast *d2ast.Map, edge *d2graph.Edge) bool

Glob creations count as imported for now TODO Probably rename later

func IsImportedObj

func IsImportedObj(ast *d2ast.Map, obj *d2graph.Object) bool

func IsLabelKeyID

func IsLabelKeyID(key, label string) bool

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 MoveIDDeltas(g *d2graph.Graph, key, newKey string, includeDescendants bool) (deltas map[string]string, err error)

func ReconnectEdge

func ReconnectEdge(g *d2graph.Graph, boardPath []string, edgeKey string, srcKey, dstKey *string) (_ *d2graph.Graph, err error)

func ReconnectEdgeIDDeltas

func ReconnectEdgeIDDeltas(g *d2graph.Graph, boardPath []string, edgeKey string, srcKey, dstKey *string) (deltas map[string]string, err error)

func Rename

func Rename(g *d2graph.Graph, boardPath []string, key, newName string) (_ *d2graph.Graph, newKey string, err error)

func RenameIDDeltas

func RenameIDDeltas(g *d2graph.Graph, boardPath []string, key, newName string) (deltas map[string]string, err error)

func ReparentIDDelta

func ReparentIDDelta(g *d2graph.Graph, boardPath []string, key, parentKey string) (string, error)

func ReplaceBoardNode

func ReplaceBoardNode(ast, ast2 *d2ast.Map, boardPath []string) bool

func Set

func Set(g *d2graph.Graph, boardPath []string, key string, tag, value *string) (_ *d2graph.Graph, err error)

TODO: update graph in place when compiler can accept single modifications TODO: go through all references to decide best spot to insert something

func UpdateImport

func UpdateImport(dsl, path string, newPath *string) (_ string, err error)

Types

type OutsideScopeError

type OutsideScopeError struct{}

func (OutsideScopeError) Error

func (e OutsideScopeError) Error() string

Jump to

Keyboard shortcuts

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