Versions in this module Expand all Collapse all v1 v1.3.0 Feb 2, 2022 Changes in this version + type DeclarationBuilder interface + Build func() ast.Decl + type File struct + func NewFile(packageName string) *File + func (f *File) AddImport(packageName, location string) (importAlias string) + func (f *File) AppendDeclaration(d DeclarationBuilder) + func (f *File) Build() *ast.File + type Generator struct + Locator *resolution.Locator + Model ModelBuilder + Resolver *resolution.Resolver + func (g *Generator) ProcessInterface(d resolution.TypeDiscovery) error + type Method struct + func NewMethod(name, receiverName, receiverType string) *Method + func (m *Method) AddStatement(stmt ast.Stmt) + func (m *Method) AddStatements(stmts []ast.Stmt) + func (m *Method) Build() ast.Decl + func (m *Method) SetType(funcType *ast.FuncType) + type MethodConfig struct + MethodName string + MethodParams []*ast.Field + MethodResults []*ast.Field + func (s *MethodConfig) HasParams() bool + func (s *MethodConfig) HasResults() bool + type ModelBuilder interface + AddMethod func(*MethodConfig) error + type Struct struct + func NewStruct(name string) *Struct + func (s *Struct) AddField(name, typePackage, typeName string) + func (s *Struct) AddFieldWithType(name string, typ ast.Expr) + func (s *Struct) Build() ast.Decl v1.2.0 Dec 7, 2021