flogo

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalActivity

func EvalActivity(act activity.Activity, inputs map[string]interface{}) (map[string]*data.Attribute, error)

EvalActivity evaluates the specified activity using the provided inputs

func NewEngine

func NewEngine(a *App) (engine.Engine, error)

NewEngine creates a new flogo Engine from the specified App

func NewProxyAction

func NewProxyAction(f HandlerFunc) action.Action

Types

type Action

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

Action is the structure that defines the Action for a Handler

func (*Action) InputMappings

func (a *Action) InputMappings() []string

InputMappings gets the Action's input mappings

func (*Action) OutputMappings

func (a *Action) OutputMappings() []string

OutputMappings gets the Action's output mappings

func (*Action) SetInputMappings

func (a *Action) SetInputMappings(mappings ...string)

SetInputMappings sets the input mappings for the Action, which maps the outputs of the Trigger to the inputs of the Action

func (*Action) SetOutputMappings

func (a *Action) SetOutputMappings(mappings ...string)

SetOutputMappings sets the output mappings for the Action, which maps the outputs of the Action to the return of the Trigger

func (*Action) Settings

func (a *Action) Settings() map[string]interface{}

Settings gets the settings of the Action

type App

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

App is the structure that defines an application

func NewApp

func NewApp() *App

NewApp creates a new Flogo application

func (*App) AddProperty

func (a *App) AddProperty(name string, dataType data.Type, value interface{}) error

AddProperty adds a shared property to the application

func (*App) AddResource

func (a *App) AddResource(id string, data json.RawMessage)

AddResource adds a Flogo resource to the application

func (*App) NewTrigger

func (a *App) NewTrigger(trg trigger.Trigger, settings map[string]interface{}) *Trigger

NewTrigger adds a new trigger to the application

func (*App) Properties

func (a *App) Properties() []*data.Attribute

Properties gets the shared properties of the application

func (*App) Triggers

func (a *App) Triggers() []*Trigger

Triggers gets the Triggers of the application

type Handler

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

Handler is the structure that defines the handler for a Trigger

func (*Handler) Actions

func (h *Handler) Actions() []*Action

Actions gets the Actions of the Handler

func (*Handler) NewAction

func (h *Handler) NewAction(act action.Action, settings map[string]interface{}) *Action

NewAction creates a new Action for the Handler note: Currently only the first Action is executed for the Handler

func (*Handler) Settings

func (h *Handler) Settings() map[string]interface{}

Settings gets the Handler's settings

type HandlerFunc

type HandlerFunc func(ctx context.Context, inputs map[string]*data.Attribute) (map[string]*data.Attribute, error)

HandlerFunc is the signature for a function to use as a handler for a Trigger

type Trigger

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

Trigger is the structure that defines a Trigger for the application

func (*Trigger) Handlers

func (t *Trigger) Handlers() []*Handler

Handlers gets the Trigger's Handlers

func (*Trigger) NewFuncHandler

func (t *Trigger) NewFuncHandler(settings map[string]interface{}, handlerFunc HandlerFunc) *Handler

NewFuncHandler adds a new Function Handler to the Trigger

func (*Trigger) NewHandler

func (t *Trigger) NewHandler(settings map[string]interface{}) *Handler

NewHandler adds a new Handler to the Trigger

func (*Trigger) Settings

func (t *Trigger) Settings() map[string]interface{}

Settings gets the Trigger's settings

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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