generator

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sanitize

func Sanitize(s string) string

Sanitize cleans up a string to make a suitable package name.

Types

type Generator

type Generator struct {
	Destination string // may be empty

	CopyrightHeader string
	// contains filtered or unexported fields
}

func (*Generator) Generate

func (g *Generator) Generate(pkg *model.Package, outputPkgName string, outputPkgPath string) error

func (*Generator) GenerateActorMethods added in v0.1.8

func (g *Generator) GenerateActorMethods(actorType string, intf *model.Interface, outputPkgPath string)

func (*Generator) GenerateActorStruct

func (g *Generator) GenerateActorStruct(actorName, originalName string)

func (*Generator) GenerateHeader

func (g *Generator) GenerateHeader()

func (*Generator) GenerateImport

func (g *Generator) GenerateImport(pkg *model.Package, outputPkgName string, outputPackagePath string) error

func (*Generator) GenerateMethod

func (g *Generator) GenerateMethod(actorType string, m *model.Method, outputPkgPath string)

func (*Generator) GenerateNameMethod added in v0.1.8

func (g *Generator) GenerateNameMethod(actorType string)

func (*Generator) GenerateNewFunction

func (g *Generator) GenerateNewFunction(actorName, originalName string)

func (*Generator) GenerateOriginalInterface

func (g *Generator) GenerateOriginalInterface(intf *model.Interface, outputPkgPath string)

func (*Generator) Output

func (g *Generator) Output() []byte

Output returns the generator's output, formatted in the standard Go style.

Jump to

Keyboard shortcuts

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