api

package
v1.6.26 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: BSD-3-Clause Imports: 20 Imported by: 11 modules, 22 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 EvalActivity

func EvalActivity(act activity.Activity, input interface{}) (map[string]interface{}, error)

EvalActivity evaluates the specified activity using the provided inputs

func NewActivity

func NewActivity(act activity.Activity, settings ...interface{}) (activity.Activity, error)

NewActivity creates an instance of the specified activity

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

func RunAction added in v0.9.2

func RunAction(ctx context.Context, act action.Action, inputs map[string]interface{}) (results map[string]interface{}, err error)

Types

type Action

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

Action is the structure that defines the Action for a Handler

func (*Action) Condition

func (a *Action) Condition() string

Condition returns the condition

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) SetCondition

func (a *Action) SetCondition(condition string)

SetCondition sets the conditional expression which determines if the action is executed

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) Actions

func (a *App) Actions() map[string]*Action

Triggers gets the Triggers of the application

func (*App) AddAction

func (a *App) AddAction(id string, act action.Action, settings interface{}) error

AddAction adds an action to the 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) NewIndependentAction added in v0.9.2

func (a *App) NewIndependentAction(act action.Action, settings interface{}) (action.Action, error)

func (*App) NewTrigger

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

NewTrigger adds a new trigger to the application

func (*App) Properties

func (a *App) Properties() map[string]data.TypedValue

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(handlerAction interface{}, settings ...interface{}) (act *Action, err error)

NewAction adds a new Action to 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]interface{}) (map[string]interface{}, 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) NewHandler

func (t *Trigger) NewHandler(settings interface{}) (*Handler, error)

NewHandler adds a new Handler to the Trigger

func (*Trigger) Settings

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

Settings gets the Trigger's settings

Jump to

Keyboard shortcuts

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