Documentation ¶
Index ¶
- func Main(fsys domain.FileSystem, importer domain.Importer, cfgReader domain.CfgReader, ...) error
- func NewImportSpecs() domain.ImportSpecs
- type Idents
- type ImportSpecs
- type Method
- func (method Method) Declaration() string
- func (method Method) Definition() string
- func (method Method) Imports() map[string]domain.ImportSpec
- func (method Method) IsEllipsis() bool
- func (method Method) Name() string
- func (method Method) Params() []domain.Var
- func (method Method) ParamsStr() string
- func (method Method) ResultValuesStr() string
- func (method Method) Results() []domain.Var
- func (method Method) SetReturnDefinition() string
- func (method Method) SetReturnInternalDefinition() string
- type MockTemplateArg
- type Var
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Main ¶
func Main( fsys domain.FileSystem, importer domain.Importer, cfgReader domain.CfgReader, cfgPath string, ) error
Main is usecase layer's entrypoint of gen command.
func NewImportSpecs ¶
func NewImportSpecs() domain.ImportSpecs
NewImportSpecs is a constructor of ImportSpecs .
Types ¶
type ImportSpecs ¶
type ImportSpecs struct {
// contains filtered or unexported fields
}
ImportSpecs implements domain.ImportSpecs .
func (*ImportSpecs) Add ¶
func (specs *ImportSpecs) Add(spec domain.ImportSpec) (domain.ImportSpec, error)
Add implements domain.ImportSpecs#Add .
func (ImportSpecs) Names ¶
func (specs ImportSpecs) Names() map[string]domain.ImportSpec
Names implements domain.ImportSpecs#Names .
func (ImportSpecs) Paths ¶
func (specs ImportSpecs) Paths() map[string]domain.ImportSpec
Paths implements domain.ImportSpecs#Paths .
type Method ¶
type Method struct { Field *ast.Field FuncType *ast.FuncType Decl string // contains filtered or unexported fields }
Method implements domain.Method .
func (Method) Declaration ¶
Declaration implements domain.Method#Declaration .
func (Method) Definition ¶
Definition implements domain.Method#Definition .
func (Method) Imports ¶
func (method Method) Imports() map[string]domain.ImportSpec
Imports implements domain.Method#Imports .
func (Method) IsEllipsis ¶
IsEllipsis implements domain.Method#IsEllipsis .
func (Method) ResultValuesStr ¶
ResultValuesStr implements domain.Method#ResultValuesStr .
func (Method) SetReturnDefinition ¶ added in v0.5.0
SetReturnDefinition implements domain.Method#SetReturnDefinition .
func (Method) SetReturnInternalDefinition ¶ added in v0.5.0
SetReturnInternalDefinition implements domain.Method#SetReturnInternalDefinition .
type MockTemplateArg ¶
type MockTemplateArg struct { Intf *ast.InterfaceType Item domain.Item // contains filtered or unexported fields }
MockTemplateArg implements domain.MockTemplateArg .
func (MockTemplateArg) Imports ¶
func (mock MockTemplateArg) Imports() [][]string
Imports implements domain.MockTemplateArg#Imports .
func (MockTemplateArg) Methods ¶
func (mock MockTemplateArg) Methods() []domain.Method
Methods implements domain.MockTemplateArg#Methods .
func (MockTemplateArg) MockName ¶
func (mock MockTemplateArg) MockName() string
MockName implements domain.MockTemplateArg#MockName .
func (MockTemplateArg) PackageName ¶
func (mock MockTemplateArg) PackageName() string
PackageName implements domain.MockTemplateArg#PackageName .
func (MockTemplateArg) URL ¶
func (mock MockTemplateArg) URL() string
URL implements domain.MockTemplateArg#URL .
func (MockTemplateArg) Version ¶
func (mock MockTemplateArg) Version() string
Version implements domain.MockTemplateArg#Version .