generator_go

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MulanPSL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GeneratorName = "go"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateTarget

type GenerateTarget struct {
	Filepath      string `yaml:"filepath,omitempty"`
	EntryTemplate string `yaml:"entryTemplate,omitempty"`
}

type Generator

type Generator struct {
	Config *GeneratorConfig
}

func NewGenerator

func NewGenerator() (*Generator, error)

func (*Generator) Generate

func (p *Generator) Generate(ctx *definition.Context) error

func (*Generator) Make

func (p *Generator) Make() (definition.Generator, error)

func (*Generator) Name

func (p *Generator) Name() string

type GeneratorConfig

type GeneratorConfig struct {
	NoFmt bool `yaml:"noFmt,omitempty"`

	Targets []GenerateTarget `yaml:"targets,omitempty"`
}

func (*GeneratorConfig) Name

func (*GeneratorConfig) Name() string

func (*GeneratorConfig) ToDefault

func (*GeneratorConfig) ToDefault(cfg config.IConfigDefault)

Jump to

Keyboard shortcuts

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