Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeData ¶
type AttributeData struct {
Field string // Go field name (e.g., "D", "Fill")
Type string // Attribute type ("string" or "bool")
Attr string // HTML attribute name (e.g., "d", "fill")
GoType string // Go type ("string" or "bool")
}
AttributeData represents a single attribute for template rendering
type AttributesGenerator ¶
type AttributesGenerator struct{}
AttributesGenerator generates centralized SVG attributes file
func NewAttributesGenerator ¶
func NewAttributesGenerator() *AttributesGenerator
NewAttributesGenerator creates a new attributes generator
func (*AttributesGenerator) GenerateSource ¶
func (g *AttributesGenerator) GenerateSource(attributes map[string]spec.Attribute) string
GenerateSource creates the source code for centralized SVG attributes file
type AttributesTemplateData ¶
type AttributesTemplateData struct {
Attributes []AttributeData
}
AttributesTemplateData holds data for template rendering
type GlobalAttributeData ¶
type GlobalAttributeData struct {
Field string // Go field name (e.g., "Class")
Type string // Attribute type ("string" or "bool")
Attr string // HTML attribute name (e.g., "class")
GoType string // Go type ("string" or "bool")
}
GlobalAttributeData represents a global attribute for template rendering
type GlobalGenerator ¶
type GlobalGenerator struct{}
GlobalGenerator generates SVG global attributes file
func NewGlobalGenerator ¶
func NewGlobalGenerator() *GlobalGenerator
NewGlobalGenerator creates a new global generator
func (*GlobalGenerator) GenerateSource ¶
func (g *GlobalGenerator) GenerateSource(attributes []spec.Attribute) string
GenerateSource generates the Go source code for SVG global attributes
type GlobalTemplateData ¶
type GlobalTemplateData struct {
Attributes []GlobalAttributeData
}
GlobalTemplateData holds data for global template rendering
type TagAttributeData ¶
type TagAttributeData struct {
Field string // Go field name (e.g., "Width")
Type string // Attribute type ("string" or "bool")
Attr string // HTML attribute name (e.g., "width")
GoType string // Go type ("string" or "bool")
}
TagAttributeData represents attribute data for tag templates
type TagGenerator ¶
type TagGenerator struct{}
TagGenerator generates individual SVG tag files
func NewTagGenerator ¶
func NewTagGenerator() *TagGenerator
NewTagGenerator creates a new tag generator
func (*TagGenerator) GenerateSource ¶
func (g *TagGenerator) GenerateSource(tagSpec spec.TagSpec) string
GenerateSource generates the Go source code for a single SVG tag
type TagTemplateData ¶
type TagTemplateData struct {
Name string // SVG element name (e.g., "rect", "circle")
Title string // CamelCase version for function name (e.g., "Rect", "Circle")
StructName string // Struct name (e.g., "RectAttrs")
ArgInterface string // Arg interface name (e.g., "RectArg")
Void bool // Whether the element is self-closing
Attributes []TagAttributeData // Element-specific attributes
}
TagTemplateData holds data for tag template rendering