Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
PkgPath string
Package *packages.Package
Type *types.Named
Annotations []string
Struct *types.Struct
Methods []Method
Children []*BuilderRef
MethodNames map[string]*Method
File *ast.File
FilePath string
Rendered bool
GeneratedMethods []Method
Depth int
}
Builder represents a struct type that is considered to be a builder. Builder has at least one method that returns altered Builder copy (chaining method). Every non-chaining method is considered as finalizer
func (*Builder) ReceiverName ¶
func (*Builder) ReceiverType ¶ added in v0.1.4
func (*Builder) Ref ¶
func (b *Builder) Ref(builder *Builder) *BuilderRef
func (*Builder) RenderChainMethod ¶
func (*Builder) RenderFinalizer ¶
type BuilderRef ¶
type BuilderSpec ¶ added in v0.1.10
type Chaingen ¶
type Chaingen struct {
// contains filtered or unexported fields
}
func (Chaingen) NewBuilder ¶
type File ¶
type Method ¶
type Method struct {
Name string
Alias string
Scope *types.Scope
Pos token.Pos
Variadic bool
Exported bool
Builder *Builder
Recv MethodParam
Params []MethodParam
Results []MethodParam
Prefixes []string
Postfixes []string
WrapperName string
Pointer bool
}
func (Method) Doc ¶
func (m Method) Doc() *ast.CommentGroup
func (Method) IsChaining ¶
func (Method) IsFinalizer ¶
Click to show internal directories.
Click to hide internal directories.