Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMermaid ¶
func GenerateMermaid(config *configuration.Config, setting *Mermaid) (string, error)
GenerateMermaid creates a Mermaid diagram from the config and mermaid settings. When a subgraph query is provided, nodes that have a parent will be placed inside the nearest explicit (query–matched) ancestor.
Types ¶
type LinkStyle ¶
type LinkStyle struct {
	// The query to identify links to format with the style
	Filters []query.Filter `yaml:"filters"`
	// The style to apply to the links
	Format LinkStyleFormat `yaml:"format"`
}
    type LinkStyleFormat ¶
type LinkStyleFormat struct {
	Stroke      string `yaml:"stroke,omitempty"`
	StrokeWidth string `yaml:"stroke-width,omitempty"`
}
    func (*LinkStyleFormat) Validate ¶
func (l *LinkStyleFormat) Validate() error
type Mermaid ¶
type Mermaid struct {
	// The direction of the flowchart (TB, TD, BT, RL, LR)
	Direction string `yaml:"direction"`
	// The attribute to use as the node label (if set)
	NodeLabel string `yaml:"nodeLabel"`
	// The query to identify nodes to treat as subgraphs (explicit containers)
	SubgraphNodes query.Nodes `yaml:"subgraphNodes,omitempty"`
	// The style to apply to nodes
	NodeStyle []NodeStyle `yaml:"nodeStyles,omitempty"`
	// The style to apply to links
	LinkStyle []LinkStyle `yaml:"linkStyles,omitempty"`
}
    Mermaid contains the settings for generating the diagram.
func LoadMermaid ¶
LoadMermaid loads and parses a single YAML mermaid setting file from the given path.
type NodeStyle ¶
type NodeStyle struct {
	// The query to identify nodes to format with the style
	Filters []query.Filter `yaml:"filters"`
	// The style to apply to the nodes
	Format NodeStyleFormat `yaml:"format"`
}
    type NodeStyleFormat ¶
type NodeStyleFormat struct {
	Fill        string `yaml:"fill,omitempty"`
	Color       string `yaml:"color,omitempty"`
	StrokeWidth string `yaml:"stroke-width,omitempty"`
	FontSize    string `yaml:"font-size,omitempty"`
	Padding     string `yaml:"padding,omitempty"`
	Rx          string `yaml:"rx,omitempty"`
	Ry          string `yaml:"ry,omitempty"`
}
    func (*NodeStyleFormat) Validate ¶
func (n *NodeStyleFormat) Validate() error
 Click to show internal directories. 
   Click to hide internal directories.