Versions in this module Expand all Collapse all v1 v1.1.8 Sep 28, 2020 Changes in this version + type Generator struct + func NewGenerator(options Options) (*Generator, error) + func (g Generator) Generate(w io.Writer) error + type Method struct + AcceptsContext bool + Name string + Params ParamsSlice + Results ParamsSlice + ReturnsError bool + func NewMethod(name string, f *ast.FuncType, printer typePrinter) (*Method, error) + func (m Method) Call() string + func (m Method) Declaration() string + func (m Method) HasParams() bool + func (m Method) HasResults() bool + func (m Method) ParamsMap() string + func (m Method) ParamsNames() string + func (m Method) ParamsStruct() string + func (m Method) Pass(prefix string) string + func (m Method) ResultsMap() string + func (m Method) ResultsNames() string + func (m Method) ResultsStruct() string + func (m Method) ReturnStruct(structName string) string + func (m Method) Signature() string + type Options struct + BodyTemplate string + Funcs template.FuncMap + HeaderTemplate string + HeaderVars map[string]interface{} + Imports []string + InterfaceName string + OutputFile string + SourcePackage string + SourcePackageAlias string + Vars map[string]interface{} + type Param struct + Name string + Type string + Variadic bool + func NewParam(name string, typ ast.Expr, usedNames map[string]bool, printer typePrinter) (*Param, error) + func (p Param) Pass() string + type ParamsSlice []Param + func (ps ParamsSlice) Pass() string + func (ps ParamsSlice) String() string + type TemplateInputInterface struct + Methods map[string]Method + Name string + Type string + type TemplateInputs struct + Imports []string + Interface TemplateInputInterface + Vars map[string]interface{} + func (t TemplateInputs) RenderImports(imports ...string) string