Categorygithub.com/project-flogo/datastore-contrib/activity/mongodb
modulepackage
0.1.0
Repository: https://github.com/project-flogo/datastore-contrib.git
Documentation: pkg.go.dev

# README

MongoDb

This activity allows you to Get, Insert, Update and Delete a document in MongoDb database.

Installation

Flogo CLI

flogo install github.com/project-flogo/datastore-contrib/activity/mongodb

Configuration

Settings:

NameTypeDescription
uristringThe MongoDB connection URI - REQUIRED
methodstringThe method type (GET, INSERT, UPDATE or DELETE) - REQUIRED
dbNamestringThe name of the database - REQUIRED
collectionstringThe collection to work on - REQUIRED
usernamestringThe username of the client
passwordstringThe password of the client

Input:

NameTypeDescription
keyNamestringThe name of the key to use when looking up an object (used in GET, UPDATE and DELETE)
keyValuestringThe value of the key to use when looking up an object (used in GET, UPDATE, and DELETE)
dataobjectThe bson document to insert in mongodb

Output:

NameTypeDescription
outputanyThe result of the MongoDB method invocation

Example

The below example allows you to configure the activity to reply and set the output values to literals "name" (a string) and 2 (an integer).

{
  "id": "flogo-mongodb",
  "name": "MongoDb",
  "description": "MongoDb Activity",
  "activity": {
    "ref": "github.com/project-flogo/datastore-contrib/activity/mongodb",
    "settings": {
      "uri" : "localhost:27017",
      "method" : "INSERT",
      "dbName" : "test",
      "collection" : "example"
    },
    "input" : {
        "keyName" : "foo",
        "keyValue" : "bar"
    }
  }
}

# Functions

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author