Documentation
¶
Index ¶
- func RenderD2(w io.Writer, doc *capstack.CapabilityStack, opts D2Options) error
- func RenderD2String(doc *capstack.CapabilityStack, opts D2Options) (string, error)
- func RenderHTML(w io.Writer, doc *capstack.CapabilityStack, opts HTMLOptions) error
- func RenderHTMLString(doc *capstack.CapabilityStack, opts HTMLOptions) (string, error)
- type D2Options
- type D2Style
- type HTMLOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderD2String ¶
func RenderD2String(doc *capstack.CapabilityStack, opts D2Options) (string, error)
RenderD2String is a convenience function that returns the D2 diagram as a string.
func RenderHTML ¶
func RenderHTML(w io.Writer, doc *capstack.CapabilityStack, opts HTMLOptions) error
RenderHTML generates static HTML from a CapabilityStack.
func RenderHTMLString ¶
func RenderHTMLString(doc *capstack.CapabilityStack, opts HTMLOptions) (string, error)
RenderHTMLString is a convenience function that returns HTML as a string.
Types ¶
type D2Options ¶
type D2Options struct {
// Title shown at the top of the diagram.
Title string
// Style controls the overall rendering approach.
Style D2Style
// ShowDependencies renders dependency arrows between capabilities.
// Ignored when Style is D2StyleGrid.
ShowDependencies bool
// ShowFoundational includes foundational capabilities in a separate section.
ShowFoundational bool
// ShowLegend displays the status color legend.
ShowLegend bool
// ColorByStatus uses status-based colors instead of category colors.
ColorByStatus bool
// Direction sets the layout direction ("down" or "right").
Direction string
// GridColumns sets the number of columns per layer row (0 = auto).
// Only used when Style is D2StyleGrid.
GridColumns int
}
D2Options configures D2 diagram generation.
func DefaultD2Options ¶
func DefaultD2Options() D2Options
DefaultD2Options returns sensible defaults for D2 rendering.
func GridD2Options ¶
func GridD2Options() D2Options
GridD2Options returns options optimized for executive grid view.
type HTMLOptions ¶
type HTMLOptions struct {
// Title overrides the document title.
Title string
// ShowLegend displays the status color legend.
ShowLegend bool
// ShowFoundational includes foundational capabilities.
ShowFoundational bool
// Standalone generates a complete HTML document (vs. embeddable fragment).
Standalone bool
// DarkTheme uses dark color scheme.
DarkTheme bool
}
HTMLOptions configures static HTML rendering.
func DefaultHTMLOptions ¶
func DefaultHTMLOptions() HTMLOptions
DefaultHTMLOptions returns sensible defaults for HTML rendering.
Click to show internal directories.
Click to hide internal directories.