Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
Connection represents a connection between shapes.
type Diagram ¶
type Diagram struct {
ID string
Content string
Format ExportFormat
Theme *Theme
}
Diagram represents a D2 diagram entity.
type DiagramGraph ¶ added in v0.2.0
type DiagramGraph struct {
ID string
Content string
Objects map[string]*GraphObject
Edges map[string]*GraphEdge
}
DiagramGraph represents the internal graph structure
type ExportFormat ¶
type ExportFormat string
ExportFormat represents the output format for diagram export.
const ( // FormatSVG represents SVG export format. FormatSVG ExportFormat = "svg" // FormatPNG represents PNG export format. FormatPNG ExportFormat = "png" // FormatPDF represents PDF export format. FormatPDF ExportFormat = "pdf" )
type GraphEdge ¶ added in v0.2.0
type GraphEdge struct {
ID string
From string
To string
Label string
Attributes map[string]interface{}
}
GraphEdge represents a connection in the diagram
type GraphObject ¶ added in v0.2.0
type GraphObject struct {
ID string
Label string
Shape string
Parent string
Attributes map[string]interface{}
}
GraphObject represents a shape in the diagram
type OracleOperation ¶ added in v0.2.0
type OracleOperation struct {
Type OracleOperationType
DiagramID string
BoardPath []string // For multi-board support
Key string
Value *string
Tag *string
NewKey *string
IncludeDescendants bool
}
OracleOperation represents a diagram manipulation operation
type OracleOperationType ¶ added in v0.2.0
type OracleOperationType string
OracleOperationType defines the type of oracle operation
const ( OracleCreate OracleOperationType = "create" OracleSet OracleOperationType = "set" OracleDelete OracleOperationType = "delete" OracleMove OracleOperationType = "move" OracleRename OracleOperationType = "rename" )
type OracleResult ¶ added in v0.2.0
type OracleResult struct {
Success bool
NewKey string
IDDeltas map[string]string // Maps old IDs to new IDs
Graph *DiagramGraph // The resulting graph state
}
OracleResult represents the result of an oracle operation
Click to show internal directories.
Click to hide internal directories.