appdata

package module
v0.0.0-...-d725791 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: BSD-3-Clause Imports: 5 Imported by: ? 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.

README

AppData

This activity allows you to set and get global App attributes.

Installation

Flogo CLI
flogo install github.com/project-flogo/contrib/activity/appdata

Configuration

Settings:
Name Type Description
name string The name of the shared attribute - REQUIRED
op string The operation (get or set), 'get' is the default
type string The data type of the shared value, default is 'any'
Input:
Name Type Description
value object The value of the shared attribute
Output:
Name Type Description
value object The value of the shared attribute

Examples

Get

Get the value of the 'myAttr' attribute:

{
  "id": "get_app_attr",
  "name": "Get App Attr",
  "activity": {
    "ref": "github.com/project-flogo/contrib/activity/appdata",
    "settings": {
      "attribute": "myAttr",
      "operation": "get"
    }
  }
}
Set

Update the value of the 'myAttr' attribute to bar:

{
  "id": "set_app_attr",
  "name": "Set App Attr",
  "activity": {
    "ref": "github.com/project-flogo/contrib/activity/appdata",
    "settings": {
      "attribute": "myAttr",
      "operation": "set"
    },
    "input": {
      "value": "bar"
    }  
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Activity

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

Activity is a Counter Activity implementation

func (*Activity) Eval

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

Eval implements activity.Activity.Eval

func (*Activity) Metadata

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

Metadata implements activity.Activity.Metadata

type Input

type Input struct {
	Value interface{} `md:"value"` // The value of the shared attribute
}

type Output

type Output struct {
	Value interface{} `md:"value"` // The value of the shared attribute
}

type Settings

type Settings struct {
	Name string `md:"name,required"`       // The name of the shared attribute
	Op   string `md:"op,allowed(get,set)"` // The operation (get or set), 'get' is the default
	Type string `md:"type"`                // The data type of the shared value, default is 'any'
}

Jump to

Keyboard shortcuts

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