d2oracle

package
v0.0.0-...-e815181 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MPL-2.0 Imports: 15 Imported by: 0

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 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

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