generator

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmbeddedField = errors.New("Generation failed because the `%v` template struct contains an anonymous embedded field.")
)

Functions

func Generate

func Generate(templateParser *Parser, savePath, packageName string) ([]byte, error)

func GenerateProxyEvents

func GenerateProxyEvents(savePath, packageName string) ([]byte, error)

func GenerateProxyHooks

func GenerateProxyHooks(templateParser *Parser, savePath, packageName string) ([]byte, error)

func GenerateUtils

func GenerateUtils(templateParser *Parser, savePath, packageName string) ([]byte, error)

func ParseSchemaJson

func ParseSchemaJson(filepath string, includeSystem bool) ([]*core.Collection, error)

func QuerySchema

func QuerySchema(dataDir string, includeSystem bool) ([]*core.Collection, error)

func Template

func Template(collections []*core.Collection, savePath, packageName string) ([]byte, error)

Generates the template and returns the source code bytes

Types

type Field

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

type Importer

type Importer struct{}

func (*Importer) Import

func (i *Importer) Import(path string) (*types.Package, error)

type Parser

type Parser struct {
	Fset *token.FileSet
	// contains filtered or unexported fields
}

func NewTemplateParser

func NewTemplateParser(sourceCode []byte) (*Parser, error)

type RelationType

type RelationType int

type SchemaTranslator

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

Jump to

Keyboard shortcuts

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