flow

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BiLeft  = "bi_left"
	BiRight = "bi_right"
)
View Source
const (
	RangeIndex     = "range_index"
	RangeOnceValue = "range_once_value"
)
View Source
const (
	TypeBi = "bi"
)
View Source
const (
	TypeIf = "if"
)
View Source
const (
	TypeLoop = "loop"
)
View Source
const (
	TypeRange = "range"
)
View Source
const (
	TypeSeq = "seq"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bi

type Bi struct {
	component.BaseComponent
	Components []component.Component
}

func (*Bi) Run

func (f *Bi) Run(globalRunParams *component.GlobalRunParams, dynamicParams map[string]any) (any, error)

type BiBuildParams

type BiBuildParams struct {
	Components []SubComponentBuildParams `mapstructure:"components" structs:"components"`
}

func (*BiBuildParams) Check

func (params *BiBuildParams) Check() error

type BiBuilder

type BiBuilder struct{}

func (*BiBuilder) Build

func (builder *BiBuilder) Build(name string, buildParams map[string]any, runParams map[string]any) (component.Component, error)

func (*BiBuilder) ProductType

func (builder *BiBuilder) ProductType() string

type BiRunParams

type BiRunParams struct {
	IsBi        bool `mapstructure:"is_bi" structs:"is_bi"`
	LeftParams  any  `mapstructure:"left_params" structs:"left_params"`
	RightParams any  `mapstructure:"right_params" structs:"right_params"`
}

func (*BiRunParams) Check

func (params *BiRunParams) Check() error

type If

type If struct {
	component.BaseComponent
	ConditionComponent component.Component
	TrueComponent      component.Component
	FalseComponent     component.Component
}

func (*If) Run

func (f *If) Run(globalRunParams *component.GlobalRunParams, dynamicParams map[string]any) (any, error)

type IfBuildParams

type IfBuildParams struct {
	ConditionComponent *SubComponentBuildParams `mapstructure:"condition" structs:"condition"`
	TrueComponent      *SubComponentBuildParams `mapstructure:"condition_true" structs:"condition_true"`
	FalseComponent     *SubComponentBuildParams `mapstructure:"condition_false" structs:"condition_false"`
}

func (*IfBuildParams) Check

func (params *IfBuildParams) Check() error

type IfBuilder

type IfBuilder struct{}

func (*IfBuilder) Build

func (builder *IfBuilder) Build(name string, buildParams map[string]any, runParams map[string]any) (component.Component, error)

func (*IfBuilder) ProductType

func (builder *IfBuilder) ProductType() string

type Loop

type Loop struct {
	component.BaseComponent
	ConditionComponent component.Component
	SubComponent       component.Component
}

func (*Loop) Run

func (f *Loop) Run(globalRunParams *component.GlobalRunParams, dynamicParams map[string]any) (any, error)

type LoopBuildParams

type LoopBuildParams struct {
	ConditionComponent *SubComponentBuildParams `mapstructure:"condition" structs:"condition"`
	SubComponent       *SubComponentBuildParams `mapstructure:"sub" structs:"sub"`
}

func (*LoopBuildParams) Check

func (params *LoopBuildParams) Check() error

type LoopBuilder

type LoopBuilder struct{}

func (*LoopBuilder) Build

func (builder *LoopBuilder) Build(name string, buildParams map[string]any, runParams map[string]any) (component.Component, error)

func (*LoopBuilder) ProductType

func (builder *LoopBuilder) ProductType() string

type Range

type Range struct {
	component.BaseComponent
	Values       []any
	SubComponent component.Component
}

func (*Range) Run

func (f *Range) Run(globalRunParams *component.GlobalRunParams, dynamicParams map[string]any) (any, error)

type RangeBuildParams

type RangeBuildParams struct {
	Values       []any                    `mapstructure:"values" structs:"values"`
	SubComponent *SubComponentBuildParams `mapstructure:"sub" structs:"sub"`
}

func (*RangeBuildParams) Check

func (params *RangeBuildParams) Check() error

type RangeBuilder

type RangeBuilder struct{}

func (*RangeBuilder) Build

func (builder *RangeBuilder) Build(name string, buildParams map[string]any, runParams map[string]any) (component.Component, error)

func (*RangeBuilder) ProductType

func (builder *RangeBuilder) ProductType() string

type Seq

type Seq struct {
	component.BaseComponent
	Components []component.Component
}

func (*Seq) Run

func (f *Seq) Run(globalRunParams *component.GlobalRunParams, dynamicParams map[string]any) (any, error)

type SeqBuildParams

type SeqBuildParams struct {
	Components []SubComponentBuildParams `mapstructure:"components" structs:"components"`
}

func (*SeqBuildParams) Check

func (params *SeqBuildParams) Check() error

type SeqBuilder

type SeqBuilder struct{}

func (*SeqBuilder) Build

func (builder *SeqBuilder) Build(name string, buildParams map[string]any, runParams map[string]any) (component.Component, error)

func (*SeqBuilder) ProductType

func (builder *SeqBuilder) ProductType() string

type SubComponentBuildParams

type SubComponentBuildParams struct {
	Type        string         `mapstructure:"type" structs:"type"`
	Name        string         `mapstructure:"name" structs:"name"`
	BuildParams map[string]any `mapstructure:"build_params" structs:"build_params"`
	RunParams   map[string]any `mapstructure:"run_params" structs:"run_params"`
}

func (*SubComponentBuildParams) BuildComponent

func (params *SubComponentBuildParams) BuildComponent() (component.Component, error)

func (*SubComponentBuildParams) Check

func (params *SubComponentBuildParams) Check(parentNodeType string) error

Jump to

Keyboard shortcuts

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