updobject

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

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

Go to latest
Published: Feb 6, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

README

UpdObject

This activity allows update an existing object's values.

Installation

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

Configuration

Input:
Name Type Description
object object The object to update
values object The keys/properties and values to update or add

Example

Update the passthru object's foo value:

{
  "id": "updflowpassthru",
  "name": "Update Flow Passthru",
  "activity": {
    "ref": "github.com/project-flogo/contrib/activity/updobject",
    "input": {
      "object": "=$flow.passthru",
      "values": {"foo": "bar"}
    }
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Activity

type Activity struct {
}

Activity is an Update Value 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 {
	Object map[string]interface{} `md:"object"` // The object to update
	Values map[string]interface{} `md:"values"` // The key and values to update or add
}

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

func (*Input) ToMap

func (i *Input) ToMap() map[string]interface{}

Jump to

Keyboard shortcuts

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