generator

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAllElements

func GenerateAllElements(ctx context.Context, args *GenerateElementArgs) (err error)

Types

type Attribute

type Attribute struct {
	Name            string
	Key             string
	Description     string
	ValidValueTypes []string
	Mode            AttributeMode
}

type AttributeMode

type AttributeMode string
const (
	AttributeModeString         AttributeMode = "string"
	AttributeModeKV             AttributeMode = "kv"
	AttributeModeBool           AttributeMode = "bool"
	AttributeModeSpaceDelimited AttributeMode = "space-delimited"
)

type CustomAttribute

type CustomAttribute struct {
	Name        string
	AllowedTags []string
	Valuer      fmt.Stringer
}

type Element

type Element struct {
	Tag                       string
	Description               string
	Interface                 string
	Categories                []string
	ChildElementsOrCategories []string
	Attributes                []*Attribute
	EventHandlers             []*EventHandler
	IsVoidElement             bool
}

type Event

type Event struct {
	Name        string
	Description string
	Interface   string
	Attributes  []EventAttribute
}

type EventAttribute

type EventAttribute struct {
	Name     string
	Type     string
	Optional bool
	Comment  string
}

type EventHandler

type EventHandler struct {
	Name        string
	Description string
	Event       *Event
}

type GenerateElementArgs

type GenerateElementArgs struct {
	TempDir                  string
	OutputPath               string
	KvAttributes             []string
	SpaceDelimitedAttributes []string
}

func NewGenerateElementArgs

func NewGenerateElementArgs() *GenerateElementArgs

func (*GenerateElementArgs) WithKvAttributes

func (gea *GenerateElementArgs) WithKvAttributes(kvAttributes ...string) *GenerateElementArgs

func (*GenerateElementArgs) WithOutputPath

func (gea *GenerateElementArgs) WithOutputPath(outputPath string) *GenerateElementArgs

func (*GenerateElementArgs) WithTempDir

func (gea *GenerateElementArgs) WithTempDir(tmpDir string) *GenerateElementArgs

Jump to

Keyboard shortcuts

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