Documentation ¶
Index ¶
- Constants
- func Generate(input *Input) error
- func ParseDir(path string, filterFiles func(fs.FileInfo) bool) ([]*pkgTypes.GoFile, error)
- func ParseSingleFile(path string) (*pkgTypes.GoFile, error)
- func ParseSource(source string, filepath string) (*pkgTypes.GoFile, error)
- func Render(pluginPath string, outputPath string, nameFilters []string, ...) error
- type Input
- type PackImporter
- type RenderFileFunc
- type RenderFunc
- type RenderInterfaceFunc
- type RenderInterfaceMethodFunc
Constants ¶
View Source
const ( RenderFuncName = "Render" RenderFileFuncName = "RenderFile" RenderInterfaceFuncName = "RenderInterface" RenderInterfaceMethodFuncName = "RenderInterfaceMethod" )
Variables ¶
This section is empty.
Functions ¶
func ParseSingleFile ¶
ParseSingleFile parses a single file at the same time
Types ¶
type Input ¶
type Input struct { DirectoryPath string `validate:"required"` PluginPath string `validate:"required"` OutputPath string `validate:"required"` NameFilters []string }
Input is the input for the generate function
type PackImporter ¶
type RenderFileFunc ¶
Will be invoked for each file parsed
type RenderFunc ¶
Will be invoked only once per generation
type RenderInterfaceFunc ¶
type RenderInterfaceFunc func( ifc *types.GoInterface, file *jen.File, ) error
Will be invoked for each interface parsed in each file
type RenderInterfaceMethodFunc ¶
type RenderInterfaceMethodFunc func( ifc *types.GoInterface, method *types.GoMethod, file *jen.File, ) error
Will be invoked for each method parsed in each interface in each file
Click to show internal directories.
Click to hide internal directories.