generator

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator executes project generation from parsed definitions.

func New

func New(opt Options) (*Generator, error)

New creates a new generator.

func (*Generator) GenerateIR added in v1.3.0

func (g *Generator) GenerateIR(project *ir.Project) error

GenerateIR runs generation directly from the shared IR.

type Options

type Options struct {
	TemplateFS  fs.FS
	OutputDir   string
	ImportPath  string
	ServiceName string
	Protocols   []string
	WithConfig  bool
	WithDocs    bool
	WithTests   bool
	WithModel   bool
	WithGRPC    bool
	WithDB      bool
	DBDriver    string
	WithSwag    bool
	WithSkill   bool
	IDLSrcPath  string
	RoutePrefix string
}

Options configures generation behavior.

type SvcRoute added in v1.2.0

type SvcRoute struct {
	Service    *ir.Service
	FullPrefix string
}

SvcRoute is a helper for main.tmpl.

Jump to

Keyboard shortcuts

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