transform

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNode

func NewNode(flowOpCtx *model.FlowOperationalContext, meta model.MetaNode, ctx *model.Context) model.Node

Types

type Node

type Node struct {
	base.BaseNode
	// contains filtered or unexported fields
}

func (*Node) LoadNodeConfig

func (node *Node) LoadNodeConfig() error

func (*Node) OnInput

func (node *Node) OnInput(msg *model.Message) ([]model.NodeID, error)

func (*Node) WaitForEvent

func (node *Node) WaitForEvent(responseChannel chan model.ReactorEvent)

type NodeConfig

type NodeConfig struct {
	TargetVariableName       string // Variable
	TargetVariableType       string
	IsTargetVariableGlobal   bool
	IsTargetVariableInMemory bool
	TransformType            string               // map , calc , str-to-json ,json-to-str , jpath , xpath , template
	IsRVariableGlobal        bool                 // true - update global variable ; false - update local variable
	IsLVariableGlobal        bool                 // true - update global variable ; false - update local variable
	Expression               string               // type of transform operation , flip , add , subtract , multiply , divide , to_bool
	RType                    string               // var , const
	RValue                   model.Variable       // Constant Right variable value .
	RVariableName            string               // Right variable name , if empty , RValue will be used instead
	LVariableName            string               // Update input message if LVariable is empty
	ValueMapping             []ValueMappingRecord // ["LValue":1,"RValue":"mode-1"]
	XPathMapping             []TransformXPathRecord
	Template                 string // template used in jtemplate transformation

}

type TransformXPathRecord

type TransformXPathRecord struct {
	Name                   string
	Path                   string
	TargetVariableName     string
	TargetVariableType     string
	IsTargetVariableGlobal bool
	UpdateInputVariable    bool
}

type ValueMappingRecord

type ValueMappingRecord struct {
	LValue model.Variable
	RValue model.Variable
}

Jump to

Keyboard shortcuts

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