Documentation ¶
Index ¶
- func EvalActivity(act activity.Activity, input interface{}) (map[string]interface{}, error)
- func NewActivity(act activity.Activity, settings ...interface{}) (activity.Activity, error)
- func NewEngine(a *App) (engine.Engine, error)
- func NewProxyAction(f HandlerFunc) action.Action
- func RunAction(ctx context.Context, act action.Action, inputs map[string]interface{}) (results map[string]interface{}, err error)
- type Action
- func (a *Action) Condition() string
- func (a *Action) InputMappings() []string
- func (a *Action) OutputMappings() []string
- func (a *Action) SetCondition(condition string)
- func (a *Action) SetInputMappings(mappings ...string)
- func (a *Action) SetOutputMappings(mappings ...string)
- func (a *Action) Settings() map[string]interface{}
- type App
- func (a *App) Actions() map[string]*Action
- func (a *App) AddAction(id string, act action.Action, settings interface{}) error
- func (a *App) AddProperty(name string, dataType data.Type, value interface{}) error
- func (a *App) AddResource(id string, data json.RawMessage)
- func (a *App) NewIndependentAction(act action.Action, settings interface{}) (action.Action, error)
- func (a *App) NewTrigger(trg trigger.Trigger, settings interface{}) *Trigger
- func (a *App) Properties() map[string]data.TypedValue
- func (a *App) Triggers() []*Trigger
- type Handler
- type HandlerFunc
- type Trigger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalActivity ¶
EvalActivity evaluates the specified activity using the provided inputs
func NewActivity ¶
NewActivity creates an instance of the specified activity
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 ¶
InputMappings gets the Action's input mappings
func (*Action) OutputMappings ¶
OutputMappings gets the Action's output mappings
func (*Action) SetCondition ¶
SetCondition sets the conditional expression which determines if the action is executed
func (*Action) SetInputMappings ¶
SetInputMappings sets the input mappings for the Action, which maps the outputs of the Trigger to the inputs of the Action
func (*Action) SetOutputMappings ¶
SetOutputMappings sets the output mappings for the Action, which maps the outputs of the Action to the return of the Trigger
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the structure that defines an application
func (*App) AddProperty ¶
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 ¶
func (*App) NewTrigger ¶
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
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the structure that defines the handler for a Trigger
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