couchbase

package
v0.5.2-rc4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

README

tibco-couchbase

This activity provides your flogo application the ability to connect to a Couchbase server

Installation

flogo install github.com/TIBCOSoftware/flogo-contrib/activity/couchbase

Schema

Inputs and Outputs:

{
   "input":[
      {
         "name":"key",
         "type":"string",
         "required":true
      },
      {
         "name":"data",
         "type":"string"
      },
      {
         "name":"method",
         "type":"string",
         "allowed":[
            "Insert",
            "Upsert",
            "Remove",
            "Get"
         ],
         "value":"Insert",
         "required":true
      },
      {
         "name":"expiry",
         "type":"integer",
         "value":0,
         "required":true
      },
      {
         "name":"server",
         "type":"string",
         "required":true
      },
      {
         "name":"username",
         "type":"string"
      },
      {
         "name":"password",
         "type":"string"
      },
      {
         "name":"bucket",
         "type":"string",
         "required":true
      },
      {
         "name":"bucketPassword",
         "type":"string"
      }
   ],
   "output":[
      {
         "name":"output",
         "type":"any"
      }
   ]
}

Settings

Setting Description
key The document key identifier
data The document data (raw, JSON, etc.)
method The method type (Insert, Upsert, Remove or Get)
expiry The document expiry (default: 0)
server The Couchbase server (e.g. couchbase://127.0.0.1)
username Cluster username
password Cluster password
bucket The bucket name
bucketPassword The bucket password if any
Note: if method is set to Get, data is ignored

Configuration Examples

Configure an upsert method:

{  
   "key":"foo",
   "data":"bar",
   "method":"Upsert",
   "expiry":0,
   "server":"couchbase://127.0.0.1",
   "username":"Administrator",
   "password":"password",
   "bucket":"test",
   "bucketPassword":""
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivity

func NewActivity(metadata *activity.Metadata) activity.Activity

NewActivity creates a new AppActivity

Types

type CouchbaseActivity

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

Integration with Couchbase inputs: {data, method, expiry, server, username, password, bucket, bucketPassword} outputs: {output, status}

func (*CouchbaseActivity) Eval

func (a *CouchbaseActivity) Eval(context activity.Context) (done bool, err error)

Eval implements api.Activity.Eval - Couchbase integration

func (*CouchbaseActivity) Metadata

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

Metadata returns the activity's metadata

Jump to

Keyboard shortcuts

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