Documentation ¶
Index ¶
- func EvalErrorParser(s schema.Schema, word string) parser.Func
- func EvalUserCtx() *conflow.EvalContext
- func ExpectBlockToEvaluate(p parsley.Parser, registry parsley.NodeTransformerRegistry) func(string, interface{}, func(interface{}, interface{}, string))
- func ExpectBlockToHaveEvalError(p parsley.Parser, registry parsley.NodeTransformerRegistry) func(string, types.GomegaMatcher)
- func ExpectBlockToHaveParseError(p parsley.Parser, registry parsley.NodeTransformerRegistry) func(string, types.GomegaMatcher)
- func ExpectFunctionNode(p parsley.Parser, registry parsley.NodeTransformerRegistry) func(string, func(interface{}, parsley.Node))
- func ExpectFunctionToEvaluate(p parsley.Parser, registry parsley.NodeTransformerRegistry) func(string, interface{})
- func ExpectFunctionToHaveEvalError(p parsley.Parser, registry parsley.NodeTransformerRegistry) func(string, error)
- func ExpectFunctionToHaveParseError(p parsley.Parser, registry parsley.NodeTransformerRegistry) func(string, error)
- func ExpectParserToEvaluate(p parsley.Parser) func(string, interface{})
- func ExpectParserToHaveEvalError(p parsley.Parser) func(string, error)
- func ExpectParserToHaveParseError(p parsley.Parser) func(string, error)
- func ExpectParserToHaveStaticCheckError(p parsley.Parser) func(string, error)
- func ExpectParserToReturn(p parsley.Parser, input string, expected parsley.Node)
- func FTableEntry(input string, parameters ...interface{}) table.TableEntry
- func MapParser(word string, value map[string]interface{}) parser.Func
- func ParseCtx(input string, blockRegistry parsley.NodeTransformerRegistry, ...) *parsley.Context
- func TableEntry(input string, parameters ...interface{}) table.TableEntry
- type Block
- type BlockInterpreter
- func (i BlockInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block
- func (i BlockInterpreter) Param(b conflow.Block, name conflow.ID) interface{}
- func (i BlockInterpreter) ParseContext(ctx *conflow.ParseContext) *conflow.ParseContext
- func (i BlockInterpreter) Schema() schema.Schema
- func (i BlockInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error
- func (i BlockInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error
- func (i BlockInterpreter) ValueParamName() conflow.ID
- type BlockWithClose
- type BlockWithInit
- type BlockWithRun
- type Directive
- type DirectiveInterpreter
- func (i DirectiveInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block
- func (i DirectiveInterpreter) Param(b conflow.Block, name conflow.ID) interface{}
- func (i DirectiveInterpreter) ParseContext(ctx *conflow.ParseContext) *conflow.ParseContext
- func (i DirectiveInterpreter) Schema() schema.Schema
- func (i DirectiveInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error
- func (i DirectiveInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error
- func (i DirectiveInterpreter) ValueParamName() conflow.ID
- type Scheduler
- type TestFunc0Interpreter
- type TestFunc1Interpreter
- type TestFunc2Interpreter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalErrorParser ¶
EvalErrorParser returns with a parser which will read the "ERR" string but the result node evaluation will throw an error
func EvalUserCtx ¶
func EvalUserCtx() *conflow.EvalContext
func ExpectBlockToEvaluate ¶
func ExpectBlockToHaveEvalError ¶
func ExpectBlockToHaveEvalError(p parsley.Parser, registry parsley.NodeTransformerRegistry) func(string, types.GomegaMatcher)
func ExpectBlockToHaveParseError ¶
func ExpectBlockToHaveParseError(p parsley.Parser, registry parsley.NodeTransformerRegistry) func(string, types.GomegaMatcher)
func ExpectFunctionNode ¶
func ExpectFunctionToEvaluate ¶
func ExpectFunctionToEvaluate(p parsley.Parser, registry parsley.NodeTransformerRegistry) func(string, interface{})
func ExpectParserToEvaluate ¶
func ExpectParserToReturn ¶
func FTableEntry ¶
func FTableEntry(input string, parameters ...interface{}) table.TableEntry
FTableEntry creates an custom focused entry for table driven tests where the input is the description
func MapParser ¶
MapParser returns with a parser which will read the "MAP" string but the result will return a sample map
func ParseCtx ¶
func ParseCtx( input string, blockRegistry parsley.NodeTransformerRegistry, functionRegistry parsley.NodeTransformerRegistry, ) *parsley.Context
func TableEntry ¶
func TableEntry(input string, parameters ...interface{}) table.TableEntry
TableEntry creates an custom entry for table driven tests where the input is the description
Types ¶
type Block ¶
type Block struct { // @id IDField conflow.ID // @value Value interface{} FieldString string FieldInt int64 FieldFloat float64 FieldBool bool FieldArray []interface{} FieldMap map[string]interface{} FieldTimeDuration time.Duration // @name "custom_field" FieldCustomName string // @name "testblock" BlockArray []*Block // @name "testblockmap" BlockMap map[string]*Block }
@block "configuration"
func (*Block) ParseContextOverride ¶
func (b *Block) ParseContextOverride() conflow.ParseContextOverride
type BlockInterpreter ¶
type BlockInterpreter struct { }
BlockInterpreter is the Conflow interpreter for the Block block
func (BlockInterpreter) CreateBlock ¶
func (i BlockInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block
Create creates a new Block block
func (BlockInterpreter) Param ¶
func (i BlockInterpreter) Param(b conflow.Block, name conflow.ID) interface{}
func (BlockInterpreter) ParseContext ¶
func (i BlockInterpreter) ParseContext(ctx *conflow.ParseContext) *conflow.ParseContext
ParseContext returns with the parse context for the block
func (BlockInterpreter) Schema ¶
func (i BlockInterpreter) Schema() schema.Schema
func (BlockInterpreter) ValueParamName ¶
func (i BlockInterpreter) ValueParamName() conflow.ID
ValueParamName returns the name of the parameter marked as value field, if there is one set
type BlockWithClose ¶
type BlockWithClose interface { conflow.Block conflow.BlockCloser }
type BlockWithInit ¶
type BlockWithInit interface { conflow.Block conflow.BlockInitialiser }
type BlockWithRun ¶
type BlockWithRun interface { conflow.Block conflow.BlockRunner }
type Directive ¶
type Directive struct { // @id IDField conflow.ID // @value Value interface{} FieldString string FieldInt int64 FieldFloat float64 FieldBool bool FieldArray []interface{} FieldMap map[string]interface{} FieldTimeDuration time.Duration // @name "custom_field" FieldCustomName string // @name "testblock" Blocks []*Block }
@block "directive"
func (*Directive) ApplyToRuntimeConfig ¶
func (d *Directive) ApplyToRuntimeConfig(config *conflow.RuntimeConfig)
func (*Directive) ParseContextOverride ¶
func (d *Directive) ParseContextOverride() conflow.ParseContextOverride
type DirectiveInterpreter ¶
type DirectiveInterpreter struct { }
DirectiveInterpreter is the Conflow interpreter for the Directive block
func (DirectiveInterpreter) CreateBlock ¶
func (i DirectiveInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block
Create creates a new Directive block
func (DirectiveInterpreter) Param ¶
func (i DirectiveInterpreter) Param(b conflow.Block, name conflow.ID) interface{}
func (DirectiveInterpreter) ParseContext ¶
func (i DirectiveInterpreter) ParseContext(ctx *conflow.ParseContext) *conflow.ParseContext
ParseContext returns with the parse context for the block
func (DirectiveInterpreter) Schema ¶
func (i DirectiveInterpreter) Schema() schema.Schema
func (DirectiveInterpreter) ValueParamName ¶
func (i DirectiveInterpreter) ValueParamName() conflow.ID
ValueParamName returns the name of the parameter marked as value field, if there is one set
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler is a test scheduler, it will simply run the given job in a goroutine in the background
type TestFunc0Interpreter ¶
type TestFunc0Interpreter struct { }
TestFunc0Interpreter is the Conflow interpreter for the testFunc0 function
func (TestFunc0Interpreter) Eval ¶
func (i TestFunc0Interpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)
Eval returns with the result of the function
func (TestFunc0Interpreter) Schema ¶
func (i TestFunc0Interpreter) Schema() schema.Schema
type TestFunc1Interpreter ¶
type TestFunc1Interpreter struct { }
TestFunc1Interpreter is the Conflow interpreter for the testFunc1 function
func (TestFunc1Interpreter) Eval ¶
func (i TestFunc1Interpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)
Eval returns with the result of the function
func (TestFunc1Interpreter) Schema ¶
func (i TestFunc1Interpreter) Schema() schema.Schema
type TestFunc2Interpreter ¶
type TestFunc2Interpreter struct { }
TestFunc2Interpreter is the Conflow interpreter for the testFunc2 function
func (TestFunc2Interpreter) Eval ¶
func (i TestFunc2Interpreter) Eval(ctx interface{}, args []interface{}) (interface{}, error)
Eval returns with the result of the function
func (TestFunc2Interpreter) Schema ¶
func (i TestFunc2Interpreter) Schema() schema.Schema