Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IsGraphvizAvailable = func() bool { cmd := execCommand("which", "dot") if err := cmd.Run(); err != nil { return false } return true }
IsGraphvizAvailable checks if the user has graphviz (dot) installed Using a variable to enable mocking in tests
Functions ¶
func GenerateERDiagram ¶
func GenerateERDiagram(def *parser.SORDefinition, outputPath string) error
GenerateERDiagram creates an ER diagram from the SOR definition If Graphviz is available, it generates an SVG file directly Otherwise, it generates just a DOT file
Types ¶
type ERDiagramGenerator ¶
type ERDiagramGenerator struct {
Definition *parser.SORDefinition
Entities map[string]Entity
Relationships []Relationship
}
ERDiagramGenerator handles the generation of ER diagrams
func NewERDiagramGenerator ¶
func NewERDiagramGenerator(definition *parser.SORDefinition) *ERDiagramGenerator
NewERDiagramGenerator creates a new ERDiagramGenerator instance
func (*ERDiagramGenerator) Generate ¶
func (g *ERDiagramGenerator) Generate(outputPath string) error
Generate creates the ER diagram as a DOT file
Click to show internal directories.
Click to hide internal directories.