Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct { StructureName string `annotation:"name=name,default={{.TypeName}}Builder"` ConstructorName string `annotation:"name=constructor,default=New{{.TypeName}}Builder"` BuildPattern string `annotation:"name=build,default={{.FieldName}}"` BuilderName string `annotation:"name=terminator,default=Build"` Type string `annotation:"name=type,default=struct,oneOf=struct;pointer"` Exported bool `annotation:"name=exported,default=true"` }
func (Builder) BuildBuildName ¶
func (Builder) BuildConstructorName ¶
func (Builder) BuildStructureName ¶
type Constructor ¶
type Constructor struct { Name string `annotation:"name=name,default=New{{.TypeName}}"` Type string `annotation:"name=type,default=struct,oneOf=struct;pointer"` Exported bool `annotation:"name=exported,default=true"` }
func (Constructor) BuildName ¶
func (c Constructor) BuildName(typeName string) string
type Init ¶
type Init struct { Len int `annotation:"name=len,default=-1"` Cap int `annotation:"name=cap,default=-1"` }
Init is used for fields initialisation such as slice, map, chan If Init.Len and Init.Cap then the values are set by default (chan is non-buffered)
type Optional ¶
type Optional struct { Name string `annotation:"name=name,default={{.TypeName}}Option"` ConstructorName string `annotation:"name=constructor,default=New{{.TypeName}}"` WithPattern string `annotation:"name=with,default=With{{.FieldName}}"` Type string `annotation:"name=type,default=struct,oneOf=struct;pointer"` Exported bool `annotation:"name=exported,default=true"` }
func (Optional) BuildConstructorName ¶
func (Optional) BuildWithName ¶
type PostConstruct ¶
type PostConstruct struct {
Priority int `annotation:"name=priority,default=1"`
}
Click to show internal directories.
Click to hide internal directories.