Documentation ¶
Index ¶
- func BuildFailureReturnStmt(output *ast.FieldList, vars map[string]*ast.Ident, defaultErrMsg string, ...) (*ast.ReturnStmt, bool)
- func BuildMultiComponentName(calls []ComponentCall) *ast.Ident
- func BuildReturnStmt(output *ast.FieldList, vars map[string]*ast.Ident, typesInfo *types.Info) *ast.ReturnStmt
- func Default() map[string]Generator
- type BlockContext
- func (b *BlockContext) AddInput(t ast.Expr) *ast.Field
- func (b *BlockContext) BuildInputVars(input *ast.FieldList) []*ast.Field
- func (b *BlockContext) BuildOutputVars(output *ast.FieldList) ([]*ast.Field, bool)
- func (b *BlockContext) CalculateInput(calls []ComponentCall)
- func (b *BlockContext) CalculateOutput(calls []ComponentCall)
- func (b BlockContext) FindInputByType(t ast.Expr) *ast.Field
- func (b *BlockContext) OutputList() []*ast.Field
- type Chain
- type ComponentCall
- func BuildMultiComponentCall(f FlowGen, calls []ComponentCall, failureCall ComponentCall) ComponentCall
- func GenCaseComponentCall(f FlowGen, cComponent types.Component) (ComponentCall, error)
- func GenComponentCalls(f FlowGen, components ...types.Component) ([]ComponentCall, error)
- func GenDecisionComponentCall(f FlowGen, dComponent types.Component) (ComponentCall, error)
- func GenSimpleComponentCall(f FlowGen, sComponent types.Component) (ComponentCall, error)
- func GenWrapComponentCall(f FlowGen, wComponent types.Component) (ComponentCall, error)
- type ComponentStmt
- type FlowGen
- type Generator
- type Option
- type VarBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFailureReturnStmt ¶
func BuildMultiComponentName ¶
func BuildMultiComponentName(calls []ComponentCall) *ast.Ident
func BuildReturnStmt ¶
Types ¶
type BlockContext ¶
type BlockContext struct { Input *ast.FieldList Output *ast.FieldList Vars map[string]*ast.Ident Builder VarBuilder }
func NewBlockContext ¶
func NewBlockContext() *BlockContext
func (*BlockContext) BuildInputVars ¶
func (b *BlockContext) BuildInputVars(input *ast.FieldList) []*ast.Field
func (*BlockContext) BuildOutputVars ¶
func (*BlockContext) CalculateInput ¶
func (b *BlockContext) CalculateInput(calls []ComponentCall)
func (*BlockContext) CalculateOutput ¶
func (b *BlockContext) CalculateOutput(calls []ComponentCall)
func (BlockContext) FindInputByType ¶
func (b BlockContext) FindInputByType(t ast.Expr) *ast.Field
func (*BlockContext) OutputList ¶
func (b *BlockContext) OutputList() []*ast.Field
type Chain ¶
type ComponentCall ¶
type ComponentCall interface { Fn() ast.Expr Input() *ast.FieldList Output() *ast.FieldList Name() *ast.Ident }
func BuildMultiComponentCall ¶
func BuildMultiComponentCall(f FlowGen, calls []ComponentCall, failureCall ComponentCall) ComponentCall
func GenCaseComponentCall ¶
func GenCaseComponentCall(f FlowGen, cComponent types.Component) (ComponentCall, error)
func GenComponentCalls ¶
func GenComponentCalls(f FlowGen, components ...types.Component) ([]ComponentCall, error)
func GenDecisionComponentCall ¶
func GenDecisionComponentCall(f FlowGen, dComponent types.Component) (ComponentCall, error)
func GenSimpleComponentCall ¶
func GenSimpleComponentCall(f FlowGen, sComponent types.Component) (ComponentCall, error)
func GenWrapComponentCall ¶
func GenWrapComponentCall(f FlowGen, wComponent types.Component) (ComponentCall, error)
type ComponentStmt ¶
type FlowGen ¶
type FlowGen interface { AddImport(string) BuildComponentStmt(ctx *BlockContext, cCall, failureCall ComponentCall) ComponentStmt ApplyPlugins(ctx *BlockContext, componentStmt ComponentStmt) *ast.BlockStmt ServiceName() string VarBuilder() VarBuilder GenComponentCall(types.Component) (ComponentCall, error) TypesInfo() *goTypes.Info }
Click to show internal directories.
Click to hide internal directories.