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/10 09:56:57 UTC
[camel-kamelets] branch master updated (9bad055 -> 97407ea)
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 9bad055 Added Google Calendar Stream source Kamelet
new 9d71422 Add Google Mail Stream source kamelet
new 7ef5987 Added Google Mail source kamelet
new 97407ea Google Mail Stream source kamelet: Set mark as read as true by default
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:
.../images/kamelets/google-mail-stream-source.svg | 7 ++
docs/modules/ROOT/nav.adoc | 1 +
.../ROOT/pages/google-mail-stream-source.adoc | 73 +++++++++++++++++
google-mail-stream-source.kamelet.yaml | 93 ++++++++++++++++++++++
4 files changed, 174 insertions(+)
create mode 100644 docs/modules/ROOT/assets/images/kamelets/google-mail-stream-source.svg
create mode 100644 docs/modules/ROOT/pages/google-mail-stream-source.adoc
create mode 100644 google-mail-stream-source.kamelet.yaml
[camel-kamelets] 01/03: Add Google Mail Stream source 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 9d71422f91ec70c9fc2f2544ea20fb9dedbe3e83
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 10 08:46:41 2021 +0100
Add Google Mail Stream source kamelet
---
google-mail-stream-source.kamelet.yaml | 93 ++++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)
diff --git a/google-mail-stream-source.kamelet.yaml b/google-mail-stream-source.kamelet.yaml
new file mode 100644
index 0000000..6a735c7
--- /dev/null
+++ b/google-mail-stream-source.kamelet.yaml
@@ -0,0 +1,93 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: google-mail-stream-source
+ annotations:
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjUyIDQyIDg4IDY2Ij4KPHBhdGggZmlsbD0iIzQyODVmNCIgZD0iTTU4IDEwOGgxNFY3NEw1MiA1OXY0M2MwIDMuMzIgMi42OSA2IDYgNiIvPgo8cGF0aCBmaWxsPSIjMzRhODUzIiBkPSJNMTIwIDEwOGgxNGMzLjMyIDAgNi0yLjY5IDYtNlY1OWwtMjAgMTUiLz4KPHBhdGggZmlsbD0iI2ZiYmMwNCIgZD0iTTEyMCA0OHYyNmwyMC0xNXYtOGMwLTcuNDItOC40Ny0xMS42NS0xNC40LTcuMiIvPgo8cGF0aCBmaWxsPSIjZWE0MzM1IiBkPSJNNzIgNzRWNDhsMjQgMTggMjQtMTh2MjZMOT [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ labels:
+ camel.apache.org/kamelet.type: "source"
+spec:
+ definition:
+ title: "Google Mail Stream Source"
+ description: |-
+ Receive data from Google Mail.
+ required:
+ - index
+ - clientId
+ - accessToken
+ - refreshToken
+ - clientSecret
+ - applicationName
+ properties:
+ index:
+ title: Index
+ description: An index for the google mail endpoint
+ type: string
+ clientId:
+ title: Client Id
+ description: Client ID of the gmail application
+ type: string
+ x-descriptors:
+ - urn:alm:descriptor:com.tectonic.ui:password
+ clientSecret:
+ title: Client Secret
+ description: Client Secret of the gmail application
+ type: string
+ x-descriptors:
+ - urn:alm:descriptor:com.tectonic.ui:password
+ accessToken:
+ title: Access Token
+ description: OAuth 2 access token for google mail application. This typically expires after an hour so refreshToken is recommended for long term usage.
+ type: string
+ x-descriptors:
+ - urn:alm:descriptor:com.tectonic.ui:password
+ refreshToken:
+ title: Refresh Token
+ description: OAuth 2 refresh token for google mail application. Using this, the Google Calendar component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived.
+ type: string
+ x-descriptors:
+ - urn:alm:descriptor:com.tectonic.ui:password
+ applicationName:
+ title: Application name
+ description: Google Mail application name
+ type: string
+ markAsRead:
+ title: Mark as read
+ description: Mark the message as read once it has been consumed
+ type: boolean
+ x-descriptors:
+ - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+ default: false
+ labels:
+ title: Gmail labels
+ description: Comma separated list of labels to take into account
+ type: string
+ example: "inbox"
+ query:
+ title: Gmail query
+ description: The query to execute on gmail box
+ type: string
+ example: "is:unread -category:(promotions OR social)"
+ default: "is:unread"
+ types:
+ out:
+ mediaType: application/json
+ dependencies:
+ - "camel:jackson"
+ flow:
+ from:
+ uri: "google-mail-stream://{{index}}"
+ parameters:
+ clientId: "{{clientId}}"
+ accessToken: "{{accessToken}}"
+ refreshToken: "{{refreshToken}}"
+ clientSecret: "{{clientSecret}}"
+ applicationName: "{{applicationName}}"
+ markAsRead: "{{markAsRead}}"
+ labels: "{{labels}}"
+ query: "{{query}}"
+ steps:
+ - marshal:
+ json: {}
+ - to: "kamelet:sink"
[camel-kamelets] 02/03: Added Google Mail source 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 7ef59875282683f5f7df112f07a4337cd4f64ec6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 10 08:47:09 2021 +0100
Added Google Mail source kamelet
---
.../images/kamelets/google-mail-stream-source.svg | 7 +++
docs/modules/ROOT/nav.adoc | 1 +
.../ROOT/pages/google-mail-stream-source.adoc | 73 ++++++++++++++++++++++
3 files changed, 81 insertions(+)
diff --git a/docs/modules/ROOT/assets/images/kamelets/google-mail-stream-source.svg b/docs/modules/ROOT/assets/images/kamelets/google-mail-stream-source.svg
new file mode 100644
index 0000000..40b7175
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/google-mail-stream-source.svg
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="52 42 88 66">
+<path fill="#4285f4" d="M58 108h14V74L52 59v43c0 3.32 2.69 6 6 6"/>
+<path fill="#34a853" d="M120 108h14c3.32 0 6-2.69 6-6V59l-20 15"/>
+<path fill="#fbbc04" d="M120 48v26l20-15v-8c0-7.42-8.47-11.65-14.4-7.2"/>
+<path fill="#ea4335" d="M72 74V48l24 18 24-18v26L96 92"/>
+<path fill="#c5221f" d="M52 51v8l20 15V48l-5.6-4.2c-5.94-4.45-14.4-.22-14.4 7.2"/>
+</svg>
\ No newline at end of file
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 907bc37..3f8b085 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -6,6 +6,7 @@
* xref:ROOT:ftp-source.adoc[image:kamelets/ftp-source.svg[] FTP Source]
* xref:ROOT:ftps-source.adoc[image:kamelets/ftps-source.svg[] FTPS Source]
* xref:ROOT:google-calendar-stream-source.adoc[image:kamelets/google-calendar-stream-source.svg[] Google Calendar Stream Source]
+* xref:ROOT:google-mail-stream-source.adoc[image:kamelets/google-mail-stream-source.svg[] Google Mail Stream Source]
* xref:ROOT:http-source.adoc[image:kamelets/http-source.svg[] HTTP Source]
* xref:ROOT:jira-source.adoc[image:kamelets/jira-source.svg[] Jira Source]
* xref:ROOT:kafka-source.adoc[image:kamelets/kafka-source.svg[] Kafka Source]
diff --git a/docs/modules/ROOT/pages/google-mail-stream-source.adoc b/docs/modules/ROOT/pages/google-mail-stream-source.adoc
new file mode 100644
index 0000000..5d9a372
--- /dev/null
+++ b/docs/modules/ROOT/pages/google-mail-stream-source.adoc
@@ -0,0 +1,73 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/google-mail-stream-source.svg[] Google Mail Stream Source
+
+*Provided by: "Apache Software Foundation"*
+
+Receive data from Google Mail.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `google-mail-stream-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *accessToken {empty}* *| Access Token| OAuth 2 access token for google mail application. This typically expires after an hour so refreshToken is recommended for long term usage.| string| |
+| *applicationName {empty}* *| Application name| Google Mail application name| string| |
+| *clientId {empty}* *| Client Id| Client ID of the gmail application| string| |
+| *clientSecret {empty}* *| Client Secret| Client Secret of the gmail application| string| |
+| *index {empty}* *| Index| An index for the google mail endpoint| string| |
+| *refreshToken {empty}* *| Refresh Token| OAuth 2 refresh token for google mail application. Using this, the Google Calendar component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived.| string| |
+| labels| Gmail labels| Comma separated list of labels to take into account| string| | `"inbox"`
+| markAsRead| Mark as read| Mark the message as read once it has been consumed| boolean| `false`|
+| query| Gmail query| The query to execute on gmail box| string| `"is:unread"`| `"is:unread -category:(promotions OR social)"`
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `google-mail-stream-source` can be used in various contexts.
+
+=== Knative Source
+
+The `google-mail-stream-source` Kamelet can be used as Knative source by binding it to a Knative object.
+
+.google-mail-stream-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+ name: google-mail-stream-source-binding
+spec:
+ source:
+ ref:
+ kind: Kamelet
+ apiVersion: camel.apache.org/v1alpha1
+ name: google-mail-stream-source
+ properties:
+ accessToken: "The Access Token"
+ applicationName: "The Application name"
+ clientId: "The Client Id"
+ clientSecret: "The Client Secret"
+ index: "The Index"
+ refreshToken: "The Refresh Token"
+ sink:
+ ref:
+ kind: InMemoryChannel
+ apiVersion: messaging.knative.dev/v1
+ name: mychannel
+
+----
+
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `google-mail-stream-source-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the source using the following command:
+
+[source,shell]
+----
+kubectl apply -f google-mail-stream-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
[camel-kamelets] 03/03: Google Mail Stream source kamelet: Set mark
as read as true by default
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 97407eaf97340e1a6025f4e2593fb870c8042f2d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 10 10:27:36 2021 +0100
Google Mail Stream source kamelet: Set mark as read as true by default
---
google-mail-stream-source.kamelet.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/google-mail-stream-source.kamelet.yaml b/google-mail-stream-source.kamelet.yaml
index 6a735c7..651002d 100644
--- a/google-mail-stream-source.kamelet.yaml
+++ b/google-mail-stream-source.kamelet.yaml
@@ -58,7 +58,7 @@ spec:
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
- default: false
+ default: true
labels:
title: Gmail labels
description: Comma separated list of labels to take into account