core

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(id string, payload interface{}, definition *Microgateway, iometadata *metadata.IOMetadata, log logger.Logger) (code int, output interface{}, err error)

Execute executes the microgateway

func TranslateMappings

func TranslateMappings(scope data.Scope, mappings []*Expr, log logger.Logger) (tree map[string]interface{}, err error)

TranslateMappings translates dot notation mappings

func TranslateMappingsToTree

func TranslateMappingsToTree(scope data.Scope, mappings []*Expr, tree map[string]interface{}, log logger.Logger) (err error)

TranslateMappingsToTree translates dot notation mappings

Types

type Adapter

type Adapter struct {
	Handler api.ServiceFunc
}

Adapter is an adapter activity for ServiceFunc

func (*Adapter) Eval

func (a *Adapter) Eval(ctx activity.Context) (done bool, err error)

Eval evaluates the adapter activity

func (*Adapter) Metadata

func (a *Adapter) Metadata() *activity.Metadata

Metadata returns the metadata for the adapter activity

type Expr

type Expr struct {
	expression.Expr
	Name string
	// contains filtered or unexported fields
}

Expr is an expression with its original source

func NewExpr

func NewExpr(name, source string, expr expression.Expr) *Expr

NewExpr creates a new expression

func (*Expr) String

func (e *Expr) String() string

String gets the source of the expression

type Microgateway

type Microgateway struct {
	Name          string
	Async         bool
	Steps         []Step
	Responses     []Response
	Configuration map[string]interface{}
}

Microgateway defines a microgateway

type Output

type Output struct {
	Code  *Expr
	Data  *Expr
	Datum []*Expr
}

Output defines response output values back to a trigger event.

type Response

type Response struct {
	Condition *Expr
	Error     bool
	Output    Output
}

Response defines response handling rules.

type Service

type Service struct {
	Name     string
	Settings []Setting
	Activity activity.Activity
}

Service defines a functional target that may be invoked by a step in an execution flow.

type Setting

type Setting struct {
	Name  string
	Value interface{}
}

Setting is a service setting

type Step

type Step struct {
	Condition     *Expr
	Service       *Service
	Input         []*Expr
	HaltCondition *Expr
}

Step conditionally defines a step in a route's execution flow.

Jump to

Keyboard shortcuts

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