generated

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	strings.Builder
}

func (*Builder) Printf

func (b *Builder) Printf(format string, args ...interface{})

func (*Builder) Printlnf

func (b *Builder) Printlnf(format string, args ...interface{})

type FunctionPogo

type FunctionPogo struct {
	Name         string
	FuncParams   map[string]string
	ReturnValues []string
	FuncBody     string
}

func (FunctionPogo) String

func (p FunctionPogo) String() string

type ImportPogo

type ImportPogo struct {
	Alias       string
	PackageName string
}

type SourceRecipe

type SourceRecipe struct {
	PackageName  string
	Imports      []ImportPogo
	Structs      []StructPogo
	Constructors []string
	MockTargets  []string
	TestTargets  []string
}

SourceRecipe is source code recipe for generated.go in typical package

func (*SourceRecipe) AddConstructorPogos

func (r *SourceRecipe) AddConstructorPogos(pogos ...FunctionPogo)

AddConstructorPogos to add FunctionPogo to constructor

func (*SourceRecipe) AddConstructors

func (r *SourceRecipe) AddConstructors(constructors ...string)

AddConstructors to add constructors

func (*SourceRecipe) AddImportPogo

func (r *SourceRecipe) AddImportPogo(pogos ...ImportPogo)

AddImportPogo to add import POGO

func (*SourceRecipe) AddMockTargets

func (r *SourceRecipe) AddMockTargets(mockTargets ...string)

AddMockTargets to add constructors

func (*SourceRecipe) AddTestTargets

func (r *SourceRecipe) AddTestTargets(testTargets ...string)

AddTestTargets to add constructors

func (SourceRecipe) String

func (r SourceRecipe) String() string

type StructPogo

type StructPogo struct {
	Name   string
	Fields []reflect.StructField
}

StructPogo is plain old go object for struct

func (StructPogo) String

func (s StructPogo) String() string

Jump to

Keyboard shortcuts

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