generator

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enum

type Enum struct {
	PkgPath string
	Name    string
	Options scanner.Options
}

func NewEnum

func NewEnum(pkgTypeOrName string, options scanner.Options) *Enum

func (*Enum) ConstName added in v1.3.0

func (e *Enum) ConstName(value string) codegen.Snippet

func (*Enum) ConstUnknown

func (e *Enum) ConstUnknown() codegen.Snippet

func (*Enum) TextMarshalerAndTextUnmarshaler

func (e *Enum) TextMarshalerAndTextUnmarshaler(file *codegen.File)

func (*Enum) TextScanAndValuer

func (e *Enum) TextScanAndValuer(file *codegen.File)

func (*Enum) VarInvalidError

func (e *Enum) VarInvalidError() codegen.Snippet

func (*Enum) WriteErrors

func (e *Enum) WriteErrors(file *codegen.File)

func (*Enum) WriteInt

func (e *Enum) WriteInt(file *codegen.File)

func (*Enum) WriteLabelStringParser

func (e *Enum) WriteLabelStringParser(file *codegen.File)

func (*Enum) WriteLabeler

func (e *Enum) WriteLabeler(file *codegen.File)

func (*Enum) WriteStringParser

func (e *Enum) WriteStringParser(file *codegen.File)

func (*Enum) WriteStringer

func (e *Enum) WriteStringer(file *codegen.File)

func (*Enum) WriteToFile

func (e *Enum) WriteToFile(file *codegen.File)

func (*Enum) WriteTypeNameAndConstValues

func (e *Enum) WriteTypeNameAndConstValues(file *codegen.File)

type Generator added in v1.3.0

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

func NewGenerator added in v1.3.0

func NewGenerator(pkg *packagesx.Package) *Generator

func (*Generator) Output added in v1.3.0

func (g *Generator) Output(cwd string)

func (*Generator) Scan added in v1.3.0

func (g *Generator) Scan(names ...string)

Jump to

Keyboard shortcuts

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