generator

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 11 Imported by: 1

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

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

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

func NewGenerator

func NewGenerator(pkg *packagesx.Package) *Generator

func (*Generator) Output

func (g *Generator) Output(cwd string)

func (*Generator) Scan

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

Jump to

Keyboard shortcuts

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