generator

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGenerator

func RegisterGenerator(language string, g Generator)

RegisterGenerator registers a new generator for the given language.

Types

type Config

type Config struct {
	IDLSrcDir    string // Directory containing source IDL files
	OutputDir    string // Directory where generated code will be written
	EnableServer bool   // Whether to generate server code
	EnableClient bool   // Whether to generate client code
	GoPackage    string // Go package name for generated code
	ToolVersion  string // Version of the code generation tool
}

Config holds the configuration options for the code generator.

type Generator

type Generator interface {
	Gen(config *Config, files map[string]tidl.Document, meta *tidl.MetaInfo) error
}

Generator defines the interface that any language-specific generator must implement. The Gen method generates code based on the given configuration, documents, and metadata.

func GetGenerator

func GetGenerator(language string) (Generator, bool)

GetGenerator retrieves a registered generator for a given language.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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