directives

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultRegistry

func DefaultRegistry() block.InterpreterRegistry

Types

type Array

type Array struct {
	schema.Array
}
@block {
  type = "directive"
  eval_stage = "parse"
}

func (*Array) ApplyToParameterConfig

func (a *Array) ApplyToParameterConfig(config *conflow.ParameterConfig)

func (*Array) ParseContextOverride

func (a *Array) ParseContextOverride() conflow.ParseContextOverride

type ArrayInterpreter

type ArrayInterpreter struct {
}

ArrayInterpreter is the Conflow interpreter for the Array block

func (ArrayInterpreter) CreateBlock

func (i ArrayInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Array block

func (ArrayInterpreter) Param

func (i ArrayInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (ArrayInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (ArrayInterpreter) Schema

func (i ArrayInterpreter) Schema() schema.Schema

func (ArrayInterpreter) SetBlock

func (i ArrayInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (ArrayInterpreter) SetParam

func (i ArrayInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (ArrayInterpreter) ValueParamName

func (i ArrayInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Boolean

type Boolean struct {
	schema.Boolean
}
@block {
  type = "directive"
  eval_stage = "parse"
}

func (*Boolean) ApplyToParameterConfig

func (b *Boolean) ApplyToParameterConfig(config *conflow.ParameterConfig)

type BooleanInterpreter

type BooleanInterpreter struct {
}

BooleanInterpreter is the Conflow interpreter for the Boolean block

func (BooleanInterpreter) CreateBlock

func (i BooleanInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Boolean block

func (BooleanInterpreter) Param

func (i BooleanInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (BooleanInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (BooleanInterpreter) Schema

func (i BooleanInterpreter) Schema() schema.Schema

func (BooleanInterpreter) SetBlock

func (i BooleanInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (BooleanInterpreter) SetParam

func (i BooleanInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (BooleanInterpreter) ValueParamName

func (i BooleanInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Bug

type Bug struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "ignore"
}
Example
eval(`
		@bug "There is a typo here"
		println "Hlelo World!"
	`)
Output:

Hlelo World!

func (*Bug) ApplyToParameterConfig

func (b *Bug) ApplyToParameterConfig(*conflow.ParameterConfig)

func (*Bug) ApplyToRuntimeConfig

func (b *Bug) ApplyToRuntimeConfig(*conflow.RuntimeConfig)

func (*Bug) ID

func (b *Bug) ID() conflow.ID

type BugInterpreter

type BugInterpreter struct {
}

BugInterpreter is the Conflow interpreter for the Bug block

func (BugInterpreter) CreateBlock

func (i BugInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Bug block

func (BugInterpreter) Param

func (i BugInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (BugInterpreter) ParseContext

func (i BugInterpreter) ParseContext(ctx *conflow.ParseContext) *conflow.ParseContext

ParseContext returns with the parse context for the block

func (BugInterpreter) Schema

func (i BugInterpreter) Schema() schema.Schema

func (BugInterpreter) SetBlock

func (i BugInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (BugInterpreter) SetParam

func (i BugInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (BugInterpreter) ValueParamName

func (i BugInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Deprecated

type Deprecated struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "ignore"
}
Example
eval(`
		@deprecated "This should not be used"
		println "What, I'm deprecated?!"
	`)
Output:

What, I'm deprecated?!

func (*Deprecated) ApplyToParameterConfig

func (d *Deprecated) ApplyToParameterConfig(*conflow.ParameterConfig)

func (*Deprecated) ApplyToRuntimeConfig

func (d *Deprecated) ApplyToRuntimeConfig(*conflow.RuntimeConfig)

func (*Deprecated) ID

func (d *Deprecated) ID() conflow.ID

type DeprecatedInterpreter

type DeprecatedInterpreter struct {
}

DeprecatedInterpreter is the Conflow interpreter for the Deprecated block

func (DeprecatedInterpreter) CreateBlock

func (i DeprecatedInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Deprecated block

func (DeprecatedInterpreter) Param

func (i DeprecatedInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (DeprecatedInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (DeprecatedInterpreter) Schema

func (i DeprecatedInterpreter) Schema() schema.Schema

func (DeprecatedInterpreter) SetBlock

func (i DeprecatedInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (DeprecatedInterpreter) SetParam

func (i DeprecatedInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (DeprecatedInterpreter) ValueParamName

func (i DeprecatedInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Doc

type Doc struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "ignore"
}

func (*Doc) ApplyToParameterConfig

func (d *Doc) ApplyToParameterConfig(*conflow.ParameterConfig)

func (*Doc) ApplyToRuntimeConfig

func (d *Doc) ApplyToRuntimeConfig(*conflow.RuntimeConfig)

func (*Doc) ID

func (d *Doc) ID() conflow.ID

type DocInterpreter

type DocInterpreter struct {
}

DocInterpreter is the Conflow interpreter for the Doc block

func (DocInterpreter) CreateBlock

func (i DocInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Doc block

func (DocInterpreter) Param

func (i DocInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (DocInterpreter) ParseContext

func (i DocInterpreter) ParseContext(ctx *conflow.ParseContext) *conflow.ParseContext

ParseContext returns with the parse context for the block

func (DocInterpreter) Schema

func (i DocInterpreter) Schema() schema.Schema

func (DocInterpreter) SetBlock

func (i DocInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (DocInterpreter) SetParam

func (i DocInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (DocInterpreter) ValueParamName

func (i DocInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Input

type Input struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "parse"
}

func (*Input) ApplyToParameterConfig

func (i *Input) ApplyToParameterConfig(config *conflow.ParameterConfig)

func (*Input) ID

func (i *Input) ID() conflow.ID

func (*Input) ParseContextOverride

func (i *Input) ParseContextOverride() conflow.ParseContextOverride

type InputInterpreter

type InputInterpreter struct {
}

InputInterpreter is the Conflow interpreter for the Input block

func (InputInterpreter) CreateBlock

func (i InputInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Input block

func (InputInterpreter) Param

func (i InputInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (InputInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (InputInterpreter) Schema

func (i InputInterpreter) Schema() schema.Schema

func (InputInterpreter) SetBlock

func (i InputInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (InputInterpreter) SetParam

func (i InputInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (InputInterpreter) ValueParamName

func (i InputInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Integer

type Integer struct {
	schema.Integer
}
@block {
  type = "directive"
  eval_stage = "parse"
}

func (*Integer) ApplyToParameterConfig

func (i *Integer) ApplyToParameterConfig(config *conflow.ParameterConfig)

type IntegerInterpreter

type IntegerInterpreter struct {
}

IntegerInterpreter is the Conflow interpreter for the Integer block

func (IntegerInterpreter) CreateBlock

func (i IntegerInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Integer block

func (IntegerInterpreter) Param

func (i IntegerInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (IntegerInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (IntegerInterpreter) Schema

func (i IntegerInterpreter) Schema() schema.Schema

func (IntegerInterpreter) SetBlock

func (i IntegerInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (IntegerInterpreter) SetParam

func (i IntegerInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (IntegerInterpreter) ValueParamName

func (i IntegerInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Map

type Map struct {
	schema.Map
}
@block {
  type = "directive"
  eval_stage = "parse"
}

func (*Map) ApplyToParameterConfig

func (m *Map) ApplyToParameterConfig(config *conflow.ParameterConfig)

func (*Map) ParseContextOverride

func (m *Map) ParseContextOverride() conflow.ParseContextOverride

type MapInterpreter

type MapInterpreter struct {
}

MapInterpreter is the Conflow interpreter for the Map block

func (MapInterpreter) CreateBlock

func (i MapInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Map block

func (MapInterpreter) Param

func (i MapInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (MapInterpreter) ParseContext

func (i MapInterpreter) ParseContext(ctx *conflow.ParseContext) *conflow.ParseContext

ParseContext returns with the parse context for the block

func (MapInterpreter) Schema

func (i MapInterpreter) Schema() schema.Schema

func (MapInterpreter) SetBlock

func (i MapInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (MapInterpreter) SetParam

func (i MapInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (MapInterpreter) ValueParamName

func (i MapInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Number

type Number struct {
	schema.Number
}
@block {
  type = "directive"
  eval_stage = "parse"
}

func (*Number) ApplyToParameterConfig

func (n *Number) ApplyToParameterConfig(config *conflow.ParameterConfig)

type NumberInterpreter

type NumberInterpreter struct {
}

NumberInterpreter is the Conflow interpreter for the Number block

func (NumberInterpreter) CreateBlock

func (i NumberInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Number block

func (NumberInterpreter) Param

func (i NumberInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (NumberInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (NumberInterpreter) Schema

func (i NumberInterpreter) Schema() schema.Schema

func (NumberInterpreter) SetBlock

func (i NumberInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (NumberInterpreter) SetParam

func (i NumberInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (NumberInterpreter) ValueParamName

func (i NumberInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Object

type Object struct {
	schema.Object
}
@block {
  type = "directive"
  eval_stage = "parse"
}

func (*Object) ApplyToParameterConfig

func (o *Object) ApplyToParameterConfig(config *conflow.ParameterConfig)

func (*Object) ParseContextOverride

func (o *Object) ParseContextOverride() conflow.ParseContextOverride

type ObjectInterpreter

type ObjectInterpreter struct {
}

ObjectInterpreter is the Conflow interpreter for the Object block

func (ObjectInterpreter) CreateBlock

func (i ObjectInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Object block

func (ObjectInterpreter) Param

func (i ObjectInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (ObjectInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (ObjectInterpreter) Schema

func (i ObjectInterpreter) Schema() schema.Schema

func (ObjectInterpreter) SetBlock

func (i ObjectInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (ObjectInterpreter) SetParam

func (i ObjectInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (ObjectInterpreter) ValueParamName

func (i ObjectInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Output

type Output struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "parse"
}

func (*Output) ApplyToParameterConfig

func (o *Output) ApplyToParameterConfig(config *conflow.ParameterConfig)

func (*Output) ID

func (o *Output) ID() conflow.ID

func (*Output) ParseContextOverride

func (o *Output) ParseContextOverride() conflow.ParseContextOverride

type OutputInterpreter

type OutputInterpreter struct {
}

OutputInterpreter is the Conflow interpreter for the Output block

func (OutputInterpreter) CreateBlock

func (i OutputInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Output block

func (OutputInterpreter) Param

func (i OutputInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (OutputInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (OutputInterpreter) Schema

func (i OutputInterpreter) Schema() schema.Schema

func (OutputInterpreter) SetBlock

func (i OutputInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (OutputInterpreter) SetParam

func (i OutputInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (OutputInterpreter) ValueParamName

func (i OutputInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Retry

type Retry struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "init"
}

func (*Retry) ApplyToRuntimeConfig

func (r *Retry) ApplyToRuntimeConfig(config *conflow.RuntimeConfig)

func (*Retry) ID

func (r *Retry) ID() conflow.ID

type RetryInterpreter

type RetryInterpreter struct {
}

RetryInterpreter is the Conflow interpreter for the Retry block

func (RetryInterpreter) CreateBlock

func (i RetryInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Retry block

func (RetryInterpreter) Param

func (i RetryInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (RetryInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (RetryInterpreter) Schema

func (i RetryInterpreter) Schema() schema.Schema

func (RetryInterpreter) SetBlock

func (i RetryInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (RetryInterpreter) SetParam

func (i RetryInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (RetryInterpreter) ValueParamName

func (i RetryInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Run

type Run struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "init"
}

func (*Run) ApplyToRuntimeConfig

func (r *Run) ApplyToRuntimeConfig(config *conflow.RuntimeConfig)

func (*Run) ID

func (r *Run) ID() conflow.ID

type RunInterpreter

type RunInterpreter struct {
}

RunInterpreter is the Conflow interpreter for the Run block

func (RunInterpreter) CreateBlock

func (i RunInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Run block

func (RunInterpreter) Param

func (i RunInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (RunInterpreter) ParseContext

func (i RunInterpreter) ParseContext(ctx *conflow.ParseContext) *conflow.ParseContext

ParseContext returns with the parse context for the block

func (RunInterpreter) Schema

func (i RunInterpreter) Schema() schema.Schema

func (RunInterpreter) SetBlock

func (i RunInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (RunInterpreter) SetParam

func (i RunInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (RunInterpreter) ValueParamName

func (i RunInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Skip

type Skip struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "init"
}

func (*Skip) ApplyToRuntimeConfig

func (s *Skip) ApplyToRuntimeConfig(config *conflow.RuntimeConfig)

func (*Skip) ID

func (s *Skip) ID() conflow.ID

type SkipInterpreter

type SkipInterpreter struct {
}

SkipInterpreter is the Conflow interpreter for the Skip block

func (SkipInterpreter) CreateBlock

func (i SkipInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Skip block

func (SkipInterpreter) Param

func (i SkipInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (SkipInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (SkipInterpreter) Schema

func (i SkipInterpreter) Schema() schema.Schema

func (SkipInterpreter) SetBlock

func (i SkipInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (SkipInterpreter) SetParam

func (i SkipInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (SkipInterpreter) ValueParamName

func (i SkipInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type String

type String struct {
	schema.String
}
@block {
  type = "directive"
  eval_stage = "parse"
}

func (*String) ApplyToParameterConfig

func (s *String) ApplyToParameterConfig(config *conflow.ParameterConfig)

type StringInterpreter

type StringInterpreter struct {
}

StringInterpreter is the Conflow interpreter for the String block

func (StringInterpreter) CreateBlock

func (i StringInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new String block

func (StringInterpreter) Param

func (i StringInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (StringInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (StringInterpreter) Schema

func (i StringInterpreter) Schema() schema.Schema

func (StringInterpreter) SetBlock

func (i StringInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (StringInterpreter) SetParam

func (i StringInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (StringInterpreter) ValueParamName

func (i StringInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Timeout

type Timeout struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "init"
}
Example
eval(`
		@timeout 10ms
		s sleep {
			duration = 20ms
		}
	`)
Output:

Example errored: timeout reached in sleep.s at 3:3

func (*Timeout) ApplyToRuntimeConfig

func (t *Timeout) ApplyToRuntimeConfig(config *conflow.RuntimeConfig)

func (*Timeout) ID

func (t *Timeout) ID() conflow.ID

type TimeoutInterpreter

type TimeoutInterpreter struct {
}

TimeoutInterpreter is the Conflow interpreter for the Timeout block

func (TimeoutInterpreter) CreateBlock

func (i TimeoutInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Timeout block

func (TimeoutInterpreter) Param

func (i TimeoutInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (TimeoutInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (TimeoutInterpreter) Schema

func (i TimeoutInterpreter) Schema() schema.Schema

func (TimeoutInterpreter) SetBlock

func (i TimeoutInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (TimeoutInterpreter) SetParam

func (i TimeoutInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (TimeoutInterpreter) ValueParamName

func (i TimeoutInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Todo

type Todo struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "ignore"
}
Example
eval(`
		@todo "This needs more world"
		println "Hello ..."
	`)
Output:

Hello ...

func (*Todo) ApplyToParameterConfig

func (t *Todo) ApplyToParameterConfig(*conflow.ParameterConfig)

func (*Todo) ApplyToRuntimeConfig

func (t *Todo) ApplyToRuntimeConfig(*conflow.RuntimeConfig)

func (*Todo) ID

func (t *Todo) ID() conflow.ID

type TodoInterpreter

type TodoInterpreter struct {
}

TodoInterpreter is the Conflow interpreter for the Todo block

func (TodoInterpreter) CreateBlock

func (i TodoInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Todo block

func (TodoInterpreter) Param

func (i TodoInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (TodoInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (TodoInterpreter) Schema

func (i TodoInterpreter) Schema() schema.Schema

func (TodoInterpreter) SetBlock

func (i TodoInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (TodoInterpreter) SetParam

func (i TodoInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (TodoInterpreter) ValueParamName

func (i TodoInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

type Triggers

type Triggers struct {
	// contains filtered or unexported fields
}
@block {
  type = "directive"
  eval_stage = "resolve"
}
Example
eval(`
		iterator {
			value = [1, 2, 3]
			a it
		}

		iterator {
			value = [1, 2, 3]
			b it
		}

		delayed_b sleep {
			duration = 10ms
			value := b.value
		}

		@triggers ["a"]
		println {
          value = "a = " + string(a.value) + ", b = " + string(delayed_b.value)
        }
	`)
Output:

a = 1, b = 1
a = 2, b = 1
a = 3, b = 1

func (*Triggers) ApplyToRuntimeConfig

func (t *Triggers) ApplyToRuntimeConfig(config *conflow.RuntimeConfig)

func (*Triggers) ID

func (t *Triggers) ID() conflow.ID

type TriggersInterpreter

type TriggersInterpreter struct {
}

TriggersInterpreter is the Conflow interpreter for the Triggers block

func (TriggersInterpreter) CreateBlock

func (i TriggersInterpreter) CreateBlock(id conflow.ID, blockCtx *conflow.BlockContext) conflow.Block

Create creates a new Triggers block

func (TriggersInterpreter) Param

func (i TriggersInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (TriggersInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (TriggersInterpreter) Schema

func (i TriggersInterpreter) Schema() schema.Schema

func (TriggersInterpreter) SetBlock

func (i TriggersInterpreter) SetBlock(block conflow.Block, name conflow.ID, key string, value interface{}) error

func (TriggersInterpreter) SetParam

func (i TriggersInterpreter) SetParam(block conflow.Block, name conflow.ID, value interface{}) error

func (TriggersInterpreter) ValueParamName

func (i TriggersInterpreter) ValueParamName() conflow.ID

ValueParamName returns the name of the parameter marked as value field, if there is one set

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL