You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2021/03/24 11:17:56 UTC

[camel-kamelets] branch master updated (4e30f05 -> 0851143)

This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.


    from 4e30f05  AWS SQS Kamelets: Regen
     new 74d7346  Added Dropbox Sink Kamelet
     new f4eac81  Added Dropbox Sink Kamelet
     new 0851143  Added Dropbox Sink Kamelet

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../{dropbox-source.svg => dropbox-sink.svg}       |  0
 docs/modules/ROOT/nav.adoc                         |  1 +
 .../{dropbox-source.adoc => dropbox-sink.adoc}     | 44 ++++++++-------
 ...ource.kamelet.yaml => dropbox-sink.kamelet.yaml | 64 +++++++++++-----------
 4 files changed, 58 insertions(+), 51 deletions(-)
 copy docs/modules/ROOT/assets/images/kamelets/{dropbox-source.svg => dropbox-sink.svg} (100%)
 copy docs/modules/ROOT/pages/{dropbox-source.adoc => dropbox-sink.adoc} (55%)
 copy dropbox-source.kamelet.yaml => dropbox-sink.kamelet.yaml (52%)

[camel-kamelets] 02/03: Added Dropbox Sink Kamelet

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit f4eac817f751e2ae67bee46450d529e3143a2301
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 24 11:18:12 2021 +0100

    Added Dropbox Sink Kamelet
---
 docs/modules/ROOT/nav.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 409915d..9e4e74f 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -5,6 +5,7 @@
 * xref:ROOT:aws-sqs-sink.adoc[image:kamelets/aws-sqs-sink.svg[] AWS SQS Sink]
 * xref:ROOT:aws-sqs-source.adoc[image:kamelets/aws-sqs-source.svg[] AWS SQS Source]
 * xref:ROOT:bitcoin-source.adoc[image:kamelets/bitcoin-source.svg[] Bitcoin Source]
+* xref:ROOT:dropbox-sink.adoc[image:kamelets/dropbox-sink.svg[] Dropbox Sink]
 * xref:ROOT:dropbox-source.adoc[image:kamelets/dropbox-source.svg[] Dropbox Source]
 * xref:ROOT:earthquake-source.adoc[image:kamelets/earthquake-source.svg[] Earthquake Source]
 * xref:ROOT:file-watch-source.adoc[image:kamelets/file-watch-source.svg[] File Watch Source]

[camel-kamelets] 03/03: Added Dropbox Sink Kamelet

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 0851143b8feece2000bd2aca93bf36b650043e34
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 24 11:18:23 2021 +0100

    Added Dropbox Sink Kamelet
---
 .../ROOT/assets/images/kamelets/dropbox-sink.svg   |  4 ++
 docs/modules/ROOT/pages/dropbox-sink.adoc          | 71 ++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/dropbox-sink.svg b/docs/modules/ROOT/assets/images/kamelets/dropbox-sink.svg
new file mode 100644
index 0000000..84ac860
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/dropbox-sink.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="43px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 43 40" version="1.1" height="40px">
+ <path d="m12.5 0l-12.5 8.1 8.7 7 12.5-7.8-8.7-7.3zm-12.5 21.9l12.5 8.2 8.7-7.3-12.5-7.7-8.7 6.8zm21.2 0.9l8.8 7.3 12.4-8.1-8.6-6.9-12.6 7.7zm21.2-14.7l-12.4-8.1-8.8 7.3 12.6 7.8 8.6-7zm-21.1 16.3l-8.8 7.3-3.7-2.5v2.8l12.5 7.5 12.5-7.5v-2.8l-3.8 2.5-8.7-7.3z" fill="#007EE5"/>
+</svg>
diff --git a/docs/modules/ROOT/pages/dropbox-sink.adoc b/docs/modules/ROOT/pages/dropbox-sink.adoc
new file mode 100644
index 0000000..b71a5b7
--- /dev/null
+++ b/docs/modules/ROOT/pages/dropbox-sink.adoc
@@ -0,0 +1,71 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/dropbox-sink.svg[] Dropbox Sink
+
+*Provided by: "Apache Software Foundation"*
+
+Upload Files to Dropbox.
+
+The Kamelet expects the following headers to be set:
+
+- `file` / `ce-file`: as the file name to upload
+
+If the header won't be set the exchange ID will be used as file name.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `dropbox-sink` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *accessToken {empty}* *| Dropbox Access Token| The access Token to use to access Dropbox| string| | 
+| *clientIdentifier {empty}* *| The client identifier| Dropbox App client Identifier| string| | 
+| *remotePath {empty}* *| Remote path| Original file or folder to work with| string| | 
+| *uploadMode {empty}* *| Upload Mode| Which mode to upload. in case of add the new file will be renamed if a file with the same name already exists on dropbox. in case of force if a file with the same name already exists on dropbox, this will be overwritten. The value can be one of add, force.| string| `"add"`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `dropbox-sink` can be used in various contexts.
+
+=== Knative Sink
+
+The `dropbox-sink` Kamelet can be used as Knative sink by binding it to a Knative object.
+
+.dropbox-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: dropbox-sink-binding
+spec:
+  source:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  sink:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: dropbox-sink
+    properties:
+      accessToken: "The Dropbox Access Token"
+      clientIdentifier: "The The client identifier"
+      remotePath: "The Remote path"
+
+----
+
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `dropbox-sink-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the sink using the following command:
+
+[source,shell]
+----
+kubectl apply -f dropbox-sink-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

[camel-kamelets] 01/03: Added Dropbox Sink Kamelet

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 74d7346eeb738d5d3d123263121f1c649052da23
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 24 11:17:23 2021 +0100

    Added Dropbox Sink Kamelet
---
 dropbox-sink.kamelet.yaml | 69 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/dropbox-sink.kamelet.yaml b/dropbox-sink.kamelet.yaml
new file mode 100644
index 0000000..ed060c1
--- /dev/null
+++ b/dropbox-sink.kamelet.yaml
@@ -0,0 +1,69 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: dropbox-sink
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjQzcHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDQzIDQwIiB2ZXJzaW9uPSIxLjEiIGhlaWdodD0iNDBweCI+CiA8cGF0aCBkPSJtMTIuNSAwbC0xMi41IDguMSA4LjcgNyAxMi41LTcuOC04LjctNy4zem0tMTIuNSAyMS45bDEyLjUgOC4yIDguNy03LjMtMTIuNS03LjctOC43IDYuOHptMjEuMiAwLjlsOC44IDcuMyAxMi40LTguMS04LjYtNi45LTEyLjYgNy43em0yMS4yLTE0LjdsLTEyLjQtOC4xLTguOC [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "Dropbox Sink"
+    description: |-
+      Upload Files to Dropbox.
+
+      The Kamelet expects the following headers to be set:
+
+      - `file` / `ce-file`: as the file name to upload
+
+      If the header won't be set the exchange ID will be used as file name.
+    required:
+      - accessToken
+      - clientIdentifier
+      - remotePath
+      - uploadMode
+    properties:
+      accessToken:
+        title: Dropbox Access Token
+        description: The access Token to use to access Dropbox
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      clientIdentifier:
+        title: The client identifier
+        description: Dropbox App client Identifier
+        type: string
+      remotePath:
+        title: Remote path
+        description: Original file or folder to work with
+        type: string
+      uploadMode:
+        title: Upload Mode
+        description: Which mode to upload. in case of add the new file will be renamed if a file with the same name already exists on dropbox. in case of force if a file with the same name already exists on dropbox, this will be overwritten. The value can be one of add, force.
+        type: string
+        default: add
+  flow:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - choice:
+          when:
+          - simple: "${header[file]}"
+            steps:
+            - set-header:
+                name: CamelDropboxPutFileName
+                simple: "${header[file]}"
+          - simple: "${header[ce-file]}"
+            steps:
+            - set-header:
+                name: CamelDropboxPutFileName
+                simple: "${header[ce-file]}"
+      - to:
+          uri: 'dropbox:put'
+          parameters:
+            accessToken: '{{accessToken}}'
+            remotePath: '{{remotePath}}'
+            clientIdentifier: '{{clientIdentifier}}'
+            uploadMode: '{{uploadMode}}'
+