Versions in this module Expand all Collapse all v1 v1.0.1 Jan 11, 2023 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 + Comment []string + Doc []string + Name string + Params ParamsSlice + Results ParamsSlice + ReturnsError bool + func NewMethod(name string, fi *ast.Field, 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 + LocalPrefix string + OutputFile string + SourcePackage string + SourcePackageAlias string + Vars map[string]interface{} + type Param struct + Comment []string + Doc []string + Name string + Type string + Variadic bool + func NewParam(name string, fi *ast.Field, 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) Import(imports ...string) string