generator

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 10 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 {
	Adapter   string
	Templates []*template.Template
	Schema    *schema.Schema
	// contains filtered or unexported fields
}

func NewGenerator added in v0.2.0

func NewGenerator(schema *schema.Schema) *Generator

func (*Generator) Clean added in v0.2.0

func (g *Generator) Clean() error

func (*Generator) CreateFile

func (g *Generator) CreateFile(f string, tpl *template.Template, data interface{}, transform func([]byte) []byte) error

func (*Generator) Generate

func (g *Generator) Generate(transform func([]byte) []byte, goModPath string) error

TODO: Generate() with extra data from different generators

func (*Generator) LoadTemplates

func (g *Generator) LoadTemplates(src embed.FS, adapter string) error

Directories

Path Synopsis
client

Jump to

Keyboard shortcuts

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