gogen

package
v0.0.0-...-6f11ea9 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VALIDATOR_PKG = "github.com/HannesKimara/cddlc/runtime/validators"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator contains the internal representation of the generation step

func NewGenerator

func NewGenerator(pkgName string) *Generator

NewGenerator returns a new Generator given the golang package name

func (*Generator) Package

func (g *Generator) Package() string

Package returns the name of the generated golang package

func (*Generator) String

func (g *Generator) String(output io.Writer) (err error)

String flushes the generated tree to an output

func (*Generator) Visit

func (g *Generator) Visit(node ast.Node) *Generator

type Options

type Options struct {
	EmitIdent        bool   `json:"emit-ident-info" yaml:"emit-ident-info"`
	CaseConversion   string `json:"case-conversion" yaml:"case-conversion"`
	GeneratePlugStub bool   `json:"generate-plug-stub" yaml:"generate-plug-stub"`
}

func (Options) Valid

func (o Options) Valid() error

Jump to

Keyboard shortcuts

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