generator

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 7 Imported by: 0

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
	Type   string
	Attr   string
	GoType string
}

AttributeData represents a single attribute for template rendering

type AttributesGenerator

type AttributesGenerator struct{}

AttributesGenerator generates centralized 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 attributes file

type AttributesTemplateData

type AttributesTemplateData struct {
	Attributes []AttributeData
}

AttributesTemplateData holds data for template rendering

type GlobalGenerator

type GlobalGenerator struct{}

GlobalGenerator handles generation of the core_global.go file

func NewGlobalGenerator

func NewGlobalGenerator() *GlobalGenerator

NewGlobalGenerator creates a new global generator

func (*GlobalGenerator) GenerateSource

func (g *GlobalGenerator) GenerateSource(globalAttrs []spec.Attribute) string

GenerateSource creates the source code for core_global.go

type NodeGenerator

type NodeGenerator struct{}

NodeGenerator generates core_node.go file

func NewNodeGenerator

func NewNodeGenerator() *NodeGenerator

NewNodeGenerator creates a new node generator

func (*NodeGenerator) GenerateCompleteFile

func (g *NodeGenerator) GenerateCompleteFile(specs []spec.TagSpec) string

GenerateCompleteFile creates complete core_node.go file content

type NodeTemplateData

type NodeTemplateData struct {
	TagNames []string
}

NodeTemplateData holds data for node template rendering

type TagAttributeData

type TagAttributeData struct {
	Field  string
	Type   string
	Attr   string
	GoType string
}

TagAttributeData represents attribute data for tag templates

type TagGenerator

type TagGenerator struct{}

TagGenerator generates individual tag files

func NewTagGenerator

func NewTagGenerator() *TagGenerator

NewTagGenerator creates a new tag generator

func (*TagGenerator) GenerateSource

func (g *TagGenerator) GenerateSource(tagSpec spec.TagSpec) string

type TagTemplateData

type TagTemplateData struct {
	Name         string
	Title        string
	StructName   string
	ArgInterface string
	Void         bool
	Attributes   []TagAttributeData
}

TagTemplateData holds data for tag template rendering

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL