Skip to content

Commit

Permalink
Merge pull request #4 from fm-tibco/master
Browse files Browse the repository at this point in the history
minor cleanup; update dependencies
  • Loading branch information
Frank Martinez committed May 14, 2019
2 parents d094d6f + 4ae0734 commit ba67cc3
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 52 deletions.
8 changes: 6 additions & 2 deletions activity/couchbase/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
title: Couchbase
weight: 4608
-->
# Couchbase
This activity allows you to Get, Insert, Update and Delete a document in couchbase database.

Expand All @@ -13,7 +17,7 @@ flogo install github.com/project-flogo/datastore-contrib/activity/couchbase
### Settings:
| Name | Type | Description
| :--- | :--- | :---
| userName | string | Cluster username
| username | string | Cluster username
| password | string | Cluster password
| bucketName | string | The bucket name
| bucketPassword | string | The bucket password if any
Expand Down Expand Up @@ -47,7 +51,7 @@ The below example allows you to configure the activity to insert the value "exam
"ref": "github.com/project-flogo/datastore-contrib/activity/couchbase",
"settings": {
"server" : "http://localhost:8091",
"userName": "Administrator",
"username": "Administrator",
"password": "password",
"bucketName" : "sample",
"method" : "Insert"
Expand Down
2 changes: 1 addition & 1 deletion activity/couchbase/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flogo-couchbase",
"type": "flogo:activity",
"version": "5.0.0.0",
"version": "0.1.0",
"title": "Couchbase connector",
"description": "Manage Couchbase documents in a specified bucket",
"homepage": "https://github.com/project-flogo/contrib/tree/master/activity/couchbase",
Expand Down
12 changes: 6 additions & 6 deletions activity/couchbase/go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module github.com/project-flogo/datastore-contrib/activity/couchbase

go 1.12

require (
github.com/golang/snappy v0.0.1 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/project-flogo/core v0.9.0-beta.3
github.com/project-flogo/core v0.9.0
github.com/stretchr/testify v1.3.0
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect
gopkg.in/couchbase/gocb.v1 v1.6.0
gopkg.in/couchbase/gocbcore.v7 v7.1.12 // indirect
golang.org/x/net v0.0.0-20190514140710-3ec191127204 // indirect
gopkg.in/couchbase/gocb.v1 v1.6.1
gopkg.in/couchbase/gocbcore.v7 v7.1.13 // indirect
gopkg.in/couchbaselabs/gocbconnstr.v1 v1.0.2 // indirect
gopkg.in/couchbaselabs/gojcbmock.v1 v1.0.3 // indirect
gopkg.in/couchbaselabs/jsonx.v1 v1.0.0 // indirect
Expand Down
20 changes: 10 additions & 10 deletions activity/couchbase/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/project-flogo/core v0.9.0-beta.3 h1:RXBJBMLkMnEkI9MC/8xhGtLkk4XnMmug5Cvx4Of7yJo=
github.com/project-flogo/core v0.9.0-beta.3/go.mod h1:dzmBbQfNNC0g0KClKYQxxGJLe53MHafg75Vhmw2TW8U=
github.com/project-flogo/core v0.9.0 h1:/iR4m5L0zj5SuqLtDDZIRyvrvG8TxwxdM0n8ZURo1I4=
github.com/project-flogo/core v0.9.0/go.mod h1:QGWi7TDLlhGUaYH3n/16ImCuulbEHGADYEXyrcHhX7U=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190514140710-3ec191127204 h1:4yG6GqBtw9C+UrLp6s2wtSniayy/Vd/3F7ffLE427XI=
golang.org/x/net v0.0.0-20190514140710-3ec191127204/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/couchbase/gocb.v1 v1.6.0 h1:qIb83YJOm2Qyc+K1/SnsjxaGQNm0Auttp3ocUu1r2B8=
gopkg.in/couchbase/gocb.v1 v1.6.0/go.mod h1:Ri5Qok4ZKiwmPr75YxZ0uELQy45XJgUSzeUnK806gTY=
gopkg.in/couchbase/gocbcore.v7 v7.1.12 h1:yWXNAu1UjOVaTFILa4La11UQBY2A45hwXEbfbw98rvs=
gopkg.in/couchbase/gocbcore.v7 v7.1.12/go.mod h1:48d2Be0MxRtsyuvn+mWzqmoGUG9uA00ghopzOs148/E=
gopkg.in/couchbase/gocb.v1 v1.6.1 h1:Bo2FFo0qobajIFa2hAjPrSk1nbKabt9OuBaiHd+EkSA=
gopkg.in/couchbase/gocb.v1 v1.6.1/go.mod h1:Ri5Qok4ZKiwmPr75YxZ0uELQy45XJgUSzeUnK806gTY=
gopkg.in/couchbase/gocbcore.v7 v7.1.13 h1:chtznc1kxxsudXZl293QEhUXfyOlxakFtSPmKhon2r8=
gopkg.in/couchbase/gocbcore.v7 v7.1.13/go.mod h1:48d2Be0MxRtsyuvn+mWzqmoGUG9uA00ghopzOs148/E=
gopkg.in/couchbaselabs/gocbconnstr.v1 v1.0.2 h1:EJFMMmmXe0pF+AdSYdwQ050BVJHwpLmsEMTQoUAEFv8=
gopkg.in/couchbaselabs/gocbconnstr.v1 v1.0.2/go.mod h1:ZjII0iKx4Veo6N6da+pEZu/ptNyKLg9QTVt7fFmR6sw=
gopkg.in/couchbaselabs/gojcbmock.v1 v1.0.3 h1:7n5tht07rEuogME6fmi6FVglIAUFD8m4t8ZQbnUq0sA=
Expand Down
2 changes: 1 addition & 1 deletion activity/couchbase/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

type Settings struct {
Username string `md:"userName"` // Cluster username
Username string `md:"username"` // Cluster username
Password string `md:"password"` // Cluster password
BucketName string `md:"bucketName,required"` // The bucket name
BucketPassword string `md:"bucketPassword"` // The bucket password
Expand Down
12 changes: 8 additions & 4 deletions activity/mongodb/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
title: MongoDB
weight: 4622
-->
# MongoDb
This activity allows you to Get, Insert, Update and Delete a document in MongoDb database.

Expand All @@ -11,10 +15,10 @@ flogo install github.com/project-flogo/datastore-contrib/activity/mongodb
## Configuration

### Settings:
| Name | Type | Description
|:--- | :--- | :---
| uri | string | The MongoDB connection URI - ***REQUIRED***
| method | string | The method type (GET, INSERT, UPDATE or DELETE) - ***REQUIRED***
| Name | Type | Description
|:--- | :--- | :---
| uri | string | The MongoDB connection URI - ***REQUIRED***
| method | string | The method type (GET, INSERT, UPDATE or DELETE) - ***REQUIRED***
| dbName | string | The name of the database - ***REQUIRED***
| collection | string | The collection to work on - ***REQUIRED***
| username | string | The username of the client
Expand Down
8 changes: 4 additions & 4 deletions activity/mongodb/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ func (a *Activity) Eval(ctx activity.Context) (done bool, err error) {
if input.Data != nil {
result, err = a.collection.InsertOne(bCtx, bson.D{input.Data.(bson.E)})
if err != nil {
logger.Debugf("Error during adding data..", err)
logger.Debugf("Error performing Insert: %v", err)
return true, err
}
} else {
result, err = a.collection.InsertOne(bCtx, bson.M{input.KeyName: input.KeyValue})
if err != nil {
logger.Debugf("Error during adding data..", err)
logger.Debugf("Error performing Insert: %v", err)
return true, err
}
}
Expand All @@ -145,7 +145,7 @@ func (a *Activity) Eval(ctx activity.Context) (done bool, err error) {
case methodDelete:
result, err := a.collection.DeleteOne(bCtx, bson.M{input.KeyName: input.KeyValue}, nil)
if err != nil {
logger.Debugf("Error during deleting data..", err)
logger.Debugf("Error performing Delete: %v", err)
return true, err
}
logger.Tracef("Delete Count: %d", result.DeletedCount)
Expand All @@ -154,7 +154,7 @@ func (a *Activity) Eval(ctx activity.Context) (done bool, err error) {
case methodUpdate:
result, err := a.collection.UpdateOne(bCtx, bson.M{input.KeyName: input.KeyValue}, bson.M{"$set": input.Data})
if err != nil {
logger.Debugf("Error during updating data..", err)
logger.Debugf("Error performing Update: %v", err)
return true, err
}

Expand Down
2 changes: 1 addition & 1 deletion activity/mongodb/descriptor.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flogo-mongodb",
"type": "flogo:activity",
"version": "0.0.1",
"version": "0.1.0",
"title": "MongoDB",
"description": "Manage MongoDB documents in a specified collection",
"homepage": "",
Expand Down
16 changes: 8 additions & 8 deletions activity/mongodb/go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
module github.com/project-flogo/datastore-contrib/activity/mongodb

go 1.12

require (
github.com/go-stack/stack v1.8.0 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/google/go-cmp v0.2.0 // indirect
github.com/google/go-cmp v0.3.0 // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/project-flogo/core v0.9.0-beta.3
github.com/project-flogo/core v0.9.0
github.com/stretchr/testify v1.3.0
github.com/tidwall/pretty v0.0.0-20190325153808-1166b9ac2b65 // indirect
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect
github.com/xdg/stringprep v1.0.0 // indirect
go.mongodb.org/mongo-driver v1.0.0
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a // indirect
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 // indirect
golang.org/x/text v0.3.0 // indirect
go.mongodb.org/mongo-driver v1.0.1
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f // indirect
golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect
golang.org/x/text v0.3.2 // indirect
)
34 changes: 19 additions & 15 deletions activity/mongodb/go.sum
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/project-flogo/core v0.9.0-beta.3 h1:RXBJBMLkMnEkI9MC/8xhGtLkk4XnMmug5Cvx4Of7yJo=
github.com/project-flogo/core v0.9.0-beta.3/go.mod h1:dzmBbQfNNC0g0KClKYQxxGJLe53MHafg75Vhmw2TW8U=
github.com/project-flogo/core v0.9.0 h1:/iR4m5L0zj5SuqLtDDZIRyvrvG8TxwxdM0n8ZURo1I4=
github.com/project-flogo/core v0.9.0/go.mod h1:QGWi7TDLlhGUaYH3n/16ImCuulbEHGADYEXyrcHhX7U=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
Expand All @@ -21,18 +20,23 @@ github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhe
github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0=
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
go.mongodb.org/mongo-driver v1.0.0 h1:KxPRDyfB2xXnDE2My8acoOWBQkfv3tz0SaWTRZjJR0c=
go.mongodb.org/mongo-driver v1.0.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.mongodb.org/mongo-driver v1.0.1 h1:r2xNB8juGGrZVcIjX2TpY7HUfz+pNYq+GIuC9h6URZg=
go.mongodb.org/mongo-driver v1.0.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a h1:Igim7XhdOpBnWPuYJ70XcNpq8q3BCACtVgNfoJxOV7g=
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f h1:R423Cnkcp5JABoeemiGEPlt9tHXFfw5kvc0yqlxRPWo=
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

0 comments on commit ba67cc3

Please sign in to comment.