generator

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: BSD-3-Clause Imports: 7 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 {
	GeneratorOptions
	// contains filtered or unexported fields
}

func New

func New(doc *parser.AST, options *GeneratorOptions) (g *Generator, err error)

func (*Generator) Generate

func (g *Generator) Generate() (err error)

Generate will create:

  1. Type definitions
  2. Validations
  3. Transforms
  4. Unmarshallers; and
  5. Marshallers

For each type defined in an AST

type GeneratorOptions

type GeneratorOptions struct {
	PackageName             string
	MakeDirectory           bool
	Directory               string
	CustomFunctionSkeletons bool
	Clobber                 bool
}

Jump to

Keyboard shortcuts

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