d2cli

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MPL-2.0 Imports: 59 Imported by: 1

Documentation

Index

Constants

View Source
const GIF exportExtension = ".gif"
View Source
const LAYERS = "layers"
View Source
const PDF exportExtension = ".pdf"
View Source
const PNG exportExtension = ".png"
View Source
const PPTX exportExtension = ".pptx"
View Source
const SCENARIOS = "scenarios"
View Source
const STEPS = "steps"
View Source
const SVG exportExtension = ".svg"
View Source
const TXT exportExtension = ".txt"

Variables

View Source
var STDOUT_FORMAT_MAP = map[string]exportExtension{
	"png":   PNG,
	"svg":   SVG,
	"ascii": TXT,
	"txt":   TXT,
	"pdf":   PDF,
	"pptx":  PPTX,
	"gif":   GIF,
}
View Source
var SUPPORTED_EXTENSIONS = []exportExtension{SVG, PNG, PDF, PPTX, GIF, TXT}
View Source
var SUPPORTED_STDOUT_FORMATS = []string{"png", "svg", "ascii", "txt", "pdf", "pptx", "gif"}

Functions

func AnimatePNGs added in v0.6.2

func AnimatePNGs(ms *xmain.State, pngs [][]byte, animIntervalMs int) ([]byte, error)

func ConvertSVG added in v0.6.2

func ConvertSVG(ms *xmain.State, page playwright.Page, svg []byte) ([]byte, error)

func LayoutResolver added in v0.6.0

func LayoutResolver(ctx context.Context, ms *xmain.State, plugins []d2plugin.Plugin) func(engine string) (d2graph.LayoutGraph, error)

func RouterResolver added in v0.6.2

func RouterResolver(ctx context.Context, ms *xmain.State, plugins []d2plugin.Plugin) func(engine string) (d2graph.RouteEdges, error)

func Run

func Run(ctx context.Context, ms *xmain.State) (err error)

func Write added in v0.6.8

func Write(ms *xmain.State, path string, out []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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