blocks

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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModuleInterpreter

func NewModuleInterpreter(
	interpreter conflow.BlockInterpreter,
	node parsley.Node,
) conflow.BlockInterpreter

NewModuleInterpreter creates a new interpreter for a module

Types

type Basic

type Basic struct {
	// contains filtered or unexported fields
}

@block "configuration"

func (*Basic) ID

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

type BasicInterpreter

type BasicInterpreter struct {
}

BasicInterpreter is the Conflow interpreter for the Basic block

func (BasicInterpreter) CreateBlock

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

Create creates a new Basic block

func (BasicInterpreter) Param

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

func (BasicInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (BasicInterpreter) Schema

func (i BasicInterpreter) Schema() schema.Schema

func (BasicInterpreter) SetBlock

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

func (BasicInterpreter) SetParam

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

func (BasicInterpreter) ValueParamName

func (i BasicInterpreter) ValueParamName() conflow.ID

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

type Exec

type Exec struct {
	// contains filtered or unexported fields
}

@block "task"

func (*Exec) ID

func (e *Exec) ID() conflow.ID

func (*Exec) ParseContextOverride

func (e *Exec) ParseContextOverride() conflow.ParseContextOverride

func (*Exec) Run

func (e *Exec) Run(ctx context.Context) (conflow.Result, error)

type ExecInterpreter

type ExecInterpreter struct {
}

ExecInterpreter is the Conflow interpreter for the Exec block

func (ExecInterpreter) CreateBlock

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

Create creates a new Exec block

func (ExecInterpreter) Param

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

func (ExecInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (ExecInterpreter) Schema

func (i ExecInterpreter) Schema() schema.Schema

func (ExecInterpreter) SetBlock

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

func (ExecInterpreter) SetParam

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

func (ExecInterpreter) ValueParamName

func (i ExecInterpreter) ValueParamName() conflow.ID

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

type Fail

type Fail struct {
	// contains filtered or unexported fields
}

@block "task"

func (*Fail) ID

func (f *Fail) ID() conflow.ID

func (*Fail) Run

func (f *Fail) Run(ctx context.Context) (conflow.Result, error)

type FailInterpreter

type FailInterpreter struct {
}

FailInterpreter is the Conflow interpreter for the Fail block

func (FailInterpreter) CreateBlock

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

Create creates a new Fail block

func (FailInterpreter) Param

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

func (FailInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (FailInterpreter) Schema

func (i FailInterpreter) Schema() schema.Schema

func (FailInterpreter) SetBlock

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

func (FailInterpreter) SetParam

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

func (FailInterpreter) ValueParamName

func (i FailInterpreter) ValueParamName() conflow.ID

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

type Gunzip

type Gunzip struct {
	// contains filtered or unexported fields
}

@block "task"

func (*Gunzip) ID

func (g *Gunzip) ID() conflow.ID

func (*Gunzip) ParseContextOverride

func (g *Gunzip) ParseContextOverride() conflow.ParseContextOverride

func (*Gunzip) Run

func (g *Gunzip) Run(ctx context.Context) (conflow.Result, error)

type GunzipInterpreter

type GunzipInterpreter struct {
}

GunzipInterpreter is the Conflow interpreter for the Gunzip block

func (GunzipInterpreter) CreateBlock

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

Create creates a new Gunzip block

func (GunzipInterpreter) Param

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

func (GunzipInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (GunzipInterpreter) Schema

func (i GunzipInterpreter) Schema() schema.Schema

func (GunzipInterpreter) SetBlock

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

func (GunzipInterpreter) SetParam

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

func (GunzipInterpreter) ValueParamName

func (i GunzipInterpreter) ValueParamName() conflow.ID

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

type Gzip

type Gzip struct {
	// contains filtered or unexported fields
}

@block "task"

func (*Gzip) ID

func (g *Gzip) ID() conflow.ID

func (*Gzip) ParseContextOverride

func (g *Gzip) ParseContextOverride() conflow.ParseContextOverride

func (*Gzip) Run

func (g *Gzip) Run(ctx context.Context) (conflow.Result, error)

type GzipInterpreter

type GzipInterpreter struct {
}

GzipInterpreter is the Conflow interpreter for the Gzip block

func (GzipInterpreter) CreateBlock

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

Create creates a new Gzip block

func (GzipInterpreter) Param

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

func (GzipInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (GzipInterpreter) Schema

func (i GzipInterpreter) Schema() schema.Schema

func (GzipInterpreter) SetBlock

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

func (GzipInterpreter) SetParam

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

func (GzipInterpreter) ValueParamName

func (i GzipInterpreter) ValueParamName() conflow.ID

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

type Import

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

func (*Import) BlockInterpreters

func (i *Import) BlockInterpreters(parseCtx *conflow.ParseContext) (map[conflow.ID]conflow.BlockInterpreter, error)

func (*Import) EvalStage

func (i *Import) EvalStage() conflow.EvalStage

func (*Import) ID

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

type ImportInterpreter

type ImportInterpreter struct {
}

ImportInterpreter is the Conflow interpreter for the Import block

func (ImportInterpreter) CreateBlock

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

Create creates a new Import block

func (ImportInterpreter) Param

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

func (ImportInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (ImportInterpreter) Schema

func (i ImportInterpreter) Schema() schema.Schema

func (ImportInterpreter) SetBlock

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

func (ImportInterpreter) SetParam

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

func (ImportInterpreter) ValueParamName

func (i ImportInterpreter) ValueParamName() conflow.ID

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

type It

type It struct {
	// contains filtered or unexported fields
}

@block "configuration"

func (*It) ID

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

type ItInterpreter

type ItInterpreter struct {
}

ItInterpreter is the Conflow interpreter for the It block

func (ItInterpreter) CreateBlock

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

Create creates a new It block

func (ItInterpreter) Param

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

func (ItInterpreter) ParseContext

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

ParseContext returns with the parse context for the block

func (ItInterpreter) Schema

func (i ItInterpreter) Schema() schema.Schema

func (ItInterpreter) SetBlock

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

func (ItInterpreter) SetParam

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

func (ItInterpreter) ValueParamName

func (i ItInterpreter) ValueParamName() conflow.ID

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

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

@block "generator"

func (*Iterator) ID

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

func (*Iterator) ParseContextOverride

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

func (*Iterator) Run

func (i *Iterator) Run(ctx context.Context) (conflow.Result, error)

type IteratorInterpreter

type IteratorInterpreter struct {
}

IteratorInterpreter is the Conflow interpreter for the Iterator block

func (IteratorInterpreter) CreateBlock

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

Create creates a new Iterator block

func (IteratorInterpreter) Param

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

func (IteratorInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (IteratorInterpreter) Schema

func (i IteratorInterpreter) Schema() schema.Schema

func (IteratorInterpreter) SetBlock

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

func (IteratorInterpreter) SetParam

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

func (IteratorInterpreter) ValueParamName

func (i IteratorInterpreter) ValueParamName() conflow.ID

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

type Line

type Line struct {
	// contains filtered or unexported fields
}

@block "configuration"

func (*Line) ID

func (l *Line) ID() conflow.ID

type LineInterpreter

type LineInterpreter struct {
}

LineInterpreter is the Conflow interpreter for the Line block

func (LineInterpreter) CreateBlock

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

Create creates a new Line block

func (LineInterpreter) Param

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

func (LineInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (LineInterpreter) Schema

func (i LineInterpreter) Schema() schema.Schema

func (LineInterpreter) SetBlock

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

func (LineInterpreter) SetParam

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

func (LineInterpreter) ValueParamName

func (i LineInterpreter) ValueParamName() conflow.ID

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

type LineScanner

type LineScanner struct {
	// contains filtered or unexported fields
}

@block "generator"

func (*LineScanner) ID

func (l *LineScanner) ID() conflow.ID

func (*LineScanner) ParseContextOverride

func (l *LineScanner) ParseContextOverride() conflow.ParseContextOverride

func (*LineScanner) Run

func (l *LineScanner) Run(ctx context.Context) (conflow.Result, error)

type LineScannerInterpreter

type LineScannerInterpreter struct {
}

LineScannerInterpreter is the Conflow interpreter for the LineScanner block

func (LineScannerInterpreter) CreateBlock

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

Create creates a new LineScanner block

func (LineScannerInterpreter) Param

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

func (LineScannerInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (LineScannerInterpreter) Schema

func (LineScannerInterpreter) SetBlock

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

func (LineScannerInterpreter) SetParam

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

func (LineScannerInterpreter) ValueParamName

func (i LineScannerInterpreter) ValueParamName() conflow.ID

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

type Main

type Main struct {
	// contains filtered or unexported fields
}

func (*Main) ID

func (m *Main) ID() conflow.ID

type MainInterpreter

type MainInterpreter struct {
	BlockTransformerRegistry    parsley.NodeTransformerRegistry
	FunctionTransformerRegistry parsley.NodeTransformerRegistry
}

func (MainInterpreter) CreateBlock

func (MainInterpreter) Param

func (m MainInterpreter) Param(b conflow.Block, name conflow.ID) interface{}

func (MainInterpreter) ParseContext

func (MainInterpreter) Schema

func (m MainInterpreter) Schema() schema.Schema

func (MainInterpreter) SetBlock

func (m MainInterpreter) SetBlock(b conflow.Block, name conflow.ID, key string, value interface{}) error

func (MainInterpreter) SetParam

func (m MainInterpreter) SetParam(b conflow.Block, name conflow.ID, value interface{}) error

func (MainInterpreter) ValueParamName

func (m MainInterpreter) ValueParamName() conflow.ID

type Print

type Print struct {
	// contains filtered or unexported fields
}

Print will write a string to the standard output @block "task"

func (*Print) ID

func (p *Print) ID() conflow.ID

func (*Print) Run

func (p *Print) Run(ctx context.Context) (conflow.Result, error)

type PrintInterpreter

type PrintInterpreter struct {
}

PrintInterpreter is the Conflow interpreter for the Print block

func (PrintInterpreter) CreateBlock

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

Create creates a new Print block

func (PrintInterpreter) Param

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

func (PrintInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (PrintInterpreter) Schema

func (i PrintInterpreter) Schema() schema.Schema

func (PrintInterpreter) SetBlock

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

func (PrintInterpreter) SetParam

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

func (PrintInterpreter) ValueParamName

func (i PrintInterpreter) ValueParamName() conflow.ID

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

type Println

type Println struct {
	// contains filtered or unexported fields
}

Println will write a string followed by a new line to the standard output @block "task"

func (*Println) ID

func (p *Println) ID() conflow.ID

func (*Println) Run

func (p *Println) Run(ctx context.Context) (conflow.Result, error)

type PrintlnInterpreter

type PrintlnInterpreter struct {
}

PrintlnInterpreter is the Conflow interpreter for the Println block

func (PrintlnInterpreter) CreateBlock

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

Create creates a new Println block

func (PrintlnInterpreter) Param

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

func (PrintlnInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (PrintlnInterpreter) Schema

func (i PrintlnInterpreter) Schema() schema.Schema

func (PrintlnInterpreter) SetBlock

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

func (PrintlnInterpreter) SetParam

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

func (PrintlnInterpreter) ValueParamName

func (i PrintlnInterpreter) ValueParamName() conflow.ID

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

type Sleep

type Sleep struct {
	// contains filtered or unexported fields
}

@block "task"

func (*Sleep) ID

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

func (*Sleep) Run

func (s *Sleep) Run(ctx context.Context) (conflow.Result, error)

type SleepInterpreter

type SleepInterpreter struct {
}

SleepInterpreter is the Conflow interpreter for the Sleep block

func (SleepInterpreter) CreateBlock

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

Create creates a new Sleep block

func (SleepInterpreter) Param

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

func (SleepInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (SleepInterpreter) Schema

func (i SleepInterpreter) Schema() schema.Schema

func (SleepInterpreter) SetBlock

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

func (SleepInterpreter) SetParam

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

func (SleepInterpreter) ValueParamName

func (i SleepInterpreter) ValueParamName() conflow.ID

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

type Stream

type Stream struct {
	Stream io.ReadCloser
	// contains filtered or unexported fields
}

@block "configuration"

func NewStream

func NewStream(id conflow.ID, stream io.ReadCloser) *Stream

func (Stream) ID

func (s Stream) ID() conflow.ID

type StreamInterpreter

type StreamInterpreter struct {
}

StreamInterpreter is the Conflow interpreter for the Stream block

func (StreamInterpreter) CreateBlock

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

Create creates a new Stream block

func (StreamInterpreter) Param

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

func (StreamInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (StreamInterpreter) Schema

func (i StreamInterpreter) Schema() schema.Schema

func (StreamInterpreter) SetBlock

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

func (StreamInterpreter) SetParam

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

func (StreamInterpreter) ValueParamName

func (i StreamInterpreter) ValueParamName() conflow.ID

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

type Tick

type Tick struct {
	// contains filtered or unexported fields
}

@block "configuration"

func (*Tick) ID

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

type TickInterpreter

type TickInterpreter struct {
}

TickInterpreter is the Conflow interpreter for the Tick block

func (TickInterpreter) CreateBlock

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

Create creates a new Tick block

func (TickInterpreter) Param

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

func (TickInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (TickInterpreter) Schema

func (i TickInterpreter) Schema() schema.Schema

func (TickInterpreter) SetBlock

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

func (TickInterpreter) SetParam

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

func (TickInterpreter) ValueParamName

func (i TickInterpreter) ValueParamName() conflow.ID

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

type Ticker

type Ticker struct {
	// contains filtered or unexported fields
}

@block "generator"

func (*Ticker) ID

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

func (*Ticker) ParseContextOverride

func (t *Ticker) ParseContextOverride() conflow.ParseContextOverride

func (*Ticker) Run

func (t *Ticker) Run(ctx context.Context) (conflow.Result, error)

type TickerInterpreter

type TickerInterpreter struct {
}

TickerInterpreter is the Conflow interpreter for the Ticker block

func (TickerInterpreter) CreateBlock

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

Create creates a new Ticker block

func (TickerInterpreter) Param

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

func (TickerInterpreter) ParseContext

ParseContext returns with the parse context for the block

func (TickerInterpreter) Schema

func (i TickerInterpreter) Schema() schema.Schema

func (TickerInterpreter) SetBlock

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

func (TickerInterpreter) SetParam

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

func (TickerInterpreter) ValueParamName

func (i TickerInterpreter) 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