Documentation
¶
Index ¶
- type Builder
- type FunctionPogo
- type ImportPogo
- type SourceRecipe
- func (r *SourceRecipe) AddConstructorPogos(pogos ...FunctionPogo)
- func (r *SourceRecipe) AddConstructors(constructors ...string)
- func (r *SourceRecipe) AddImportPogo(pogos ...ImportPogo)
- func (r *SourceRecipe) AddMockTargets(mockTargets ...string)
- func (r *SourceRecipe) AddTestTargets(testTargets ...string)
- func (r SourceRecipe) String() string
- type StructPogo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 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
Click to show internal directories.
Click to hide internal directories.