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 c2d4b86f493d50db8467217ea3e03fae18e4c06f Author: nicolaferraro <ni.ferr...@gmail.com> AuthorDate: Thu Feb 11 10:54:00 2021 +0100 added a few kamelets and fixed the generator --- .gitignore | 5 + README.md | 3 + aws-kinesis-source.kamelet.yaml | 58 ++++ aws-sqs-source.kamelet.yaml | 65 +++++ docs/generator/generator.go | 306 +++++++++++++++++++++ docs/kamelet-catalog-ui/src/css/catalog.css | 7 +- .../src/partials/catalog-body.hbs | 2 +- .../assets/images/kamelets/aws-kinesis-source.svg | 1 + .../ROOT/assets/images/kamelets/aws-sqs-source.svg | 1 + .../ROOT/assets/images/kamelets/jira-source.svg | 18 ++ .../assets/images/kamelets/salesforce-source.svg | 1 + .../ROOT/assets/images/kamelets/slack-source.svg | 28 ++ .../assets/images/kamelets/telegram-source.svg | 1 + .../ROOT/assets/images/kamelets/timer-source.svg | 7 + .../assets/images/kamelets/twitter-feed-source.svg | 6 - .../images/kamelets/twitter-timeline-source.svg | 6 - docs/modules/ROOT/nav.adoc | 11 +- docs/modules/ROOT/pages/aws-kinesis-source.adoc | 66 +++++ docs/modules/ROOT/pages/aws-sqs-source.adoc | 67 +++++ docs/modules/ROOT/pages/index.adoc | 1 + docs/modules/ROOT/pages/jira-source.adoc | 65 +++++ docs/modules/ROOT/pages/salesforce-source.adoc | 71 +++++ docs/modules/ROOT/pages/slack-source.adoc | 62 +++++ docs/modules/ROOT/pages/telegram-source.adoc | 62 +++++ docs/modules/ROOT/pages/timer-source.adoc | 61 ++++ docs/modules/ROOT/pages/twitter-feed-source.adoc | 3 - .../ROOT/pages/twitter-timeline-source.adoc | 3 - go.mod | 8 + go.sum | 104 +++++++ jira-source.kamelet.yaml | 57 ++++ salesforce-source.kamelet.yaml | 83 ++++++ slack-source.kamelet.yaml | 43 +++ telegram-source.kamelet.yaml | 39 +++ timer-source.kamelet.yaml | 3 +- 34 files changed, 1301 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 1169150..6b02832 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ node_modules /docs/build +.idea +*.iml +.project +.classpath +.metadata diff --git a/README.md b/README.md index 881212e..b643b0a 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ All Kamelets **MUST** declare an icon in the `camel.apache.org/kamelet.icon` ann Kamelets that are logically related (e.g. all Kamelets that allow doing things with Twitter) **SHOULD** be linked together using the label `camel.apache.org/kamelet.group=<name of the group>` (e.g. `camel.apache.org/kamelet.group=Twitter`) to ease visualization in tooling. +All Kamelets present in this repository **MUST** have the *annotation* `camel.apache.org/provider` set to `"Apache Software Foundation"`. + We provide an example of Kamelet to give more context to the following sections: ```yaml @@ -43,6 +45,7 @@ metadata: name: timer-source annotations: camel.apache.org/kamelet.icon: data:image/svg+xml;base64,PD94... + camel.apache.org/provider: "Apache Software Foundation" labels: camel.apache.org/kamelet.type: source spec: diff --git a/aws-kinesis-source.kamelet.yaml b/aws-kinesis-source.kamelet.yaml new file mode 100644 index 0000000..31a87e0 --- /dev/null +++ b/aws-kinesis-source.kamelet.yaml @@ -0,0 +1,58 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: aws-kinesis-source + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTYgMzA4LjIzNDAxIj48dGl0bGU+YXdzLWtpbmVzaXM8L3RpdGxlPjxwYXRoIGQ9Ik0wLDE3Mi4wODdsMTI3Ljc1NCw1OC44MSwxMjcuNzUyLTU4LjgxLTEyNy43NTItNS4yOTNaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDAuMDAwMDUpIiBmaWxsPSIjZmNiZjkyIi8+PHBhdGggZD0iTTEyOC4xNDcsMCwuMDU5LDYzLjg4MXY5MC4xMzZIMTUzLjY0OFYxMi43NTFaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDAuMD [...] + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: "source" +spec: + definition: + title: "AWS Kinesis Source" + description: |- + Receive data from AWS Kinesis. + required: + - stream + - accessKey + - secretKey + - region + properties: + stream: + title: Stream Name + description: The Kinesis stream that you want to access (needs to be created in advance) + type: string + accessKey: + title: Access Key + description: The access key obtained from AWS + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + secretKey: + title: Secret Key + description: The secret key obtained from AWS + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + region: + title: AWS Region + description: The AWS region to connect to (capitalized name) + type: string + example: EU_WEST_1 + types: + out: + mediaType: application/json + dependencies: + - "camel:jackson" + - "camel:cbor" + flow: + from: + uri: aws-kinesis:{{stream}} + parameters: + secretKey: "{{secretKey}}" + accessKey: "{{accessKey}}" + region: "{{region}}" + steps: + - marshal: + json: {} + - to: "kamelet:sink" diff --git a/aws-sqs-source.kamelet.yaml b/aws-sqs-source.kamelet.yaml new file mode 100644 index 0000000..6996bdf --- /dev/null +++ b/aws-sqs-source.kamelet.yaml @@ -0,0 +1,65 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: aws-sqs-source + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDEwMCAxMDAiIGhlaWdodD0iMTAwcHgiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHdpZHRoPSIxMDBweCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bG [...] + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: "source" +spec: + definition: + title: "AWS SQS Source" + description: |- + Receive data from AWS SQS. + required: + - queueNameOrArn + - accessKey + - secretKey + - region + properties: + queueNameOrArn: + title: Queue Name + description: The SQS Queue name or ARN + type: string + deleteAfterRead: + title: Auto-delete messages + description: Delete messages after consuming them + type: boolean + x-descriptors: + - 'urn:alm:descriptor:com.tectonic.ui:checkbox' + default: true + accessKey: + title: Access Key + description: The access key obtained from AWS + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + secretKey: + title: Secret Key + description: The secret key obtained from AWS + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + region: + title: AWS Region + description: The AWS region to connect to + type: string + example: eu-west-1 + types: + out: + mediaType: application/json + dependencies: + - "camel:jackson" + flow: + from: + uri: "aws2-sqs:{{queueNameOrArn}}" + parameters: + secretKey: "{{secretKey}}" + accessKey: "{{accessKey}}" + region: "{{region}}" + deleteAfterRead: "{{deleteAfterRead}}" + steps: + - marshal: + json: {} + - to: "kamelet:sink" diff --git a/docs/generator/generator.go b/docs/generator/generator.go new file mode 100644 index 0000000..2d9367c --- /dev/null +++ b/docs/generator/generator.go @@ -0,0 +1,306 @@ +package main + +import ( + "encoding/base64" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "sort" + "strings" + + camel "github.com/apache/camel-k/pkg/apis/camel/v1alpha1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/yaml" +) + +func main() { + if len(os.Args) != 3 { + println("usage: generator kamelets-path doc-root") + os.Exit(1) + } + + dir := os.Args[1] + out := os.Args[2] + + kamelets := listKamelets(dir) + + links := make([]string, 0) + for _, k := range kamelets { + img := saveImage(k, out) + produceDoc(k, out, img) + + links = append(links, fmt.Sprintf("** xref:ROOT:%s.adoc[%s %s]", k.Name, img, k.Spec.Definition.Title)) + } + + saveNav(links, out) +} + +func saveNav(links []string, out string) { + content := "// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT\n" + content += "* xref:ROOT:index.adoc[Kamelet Catalog]\n" + for _, l := range links { + content += l + "\n" + } + content += "// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT\n" + dest := filepath.Join(out, "nav.adoc") + if _, err := os.Stat(dest); err == nil { + err = os.Remove(dest) + handleGeneralError(fmt.Sprintf("cannot remove file %q", dest), err) + } + err := ioutil.WriteFile(dest, []byte(content), 0666) + handleGeneralError(fmt.Sprintf("cannot write file %q", dest), err) + fmt.Printf("%q written\n", dest) +} + +func saveImage(k camel.Kamelet, out string) string { + if ic, ok := k.ObjectMeta.Annotations["camel.apache.org/kamelet.icon"]; ok { + svgb64Prefix := "data:image/svg+xml;base64," + if strings.HasPrefix(ic, svgb64Prefix) { + data := ic[len(svgb64Prefix):] + decoder := base64.NewDecoder(base64.StdEncoding, strings.NewReader(data)) + iconContent, err := ioutil.ReadAll(decoder) + handleGeneralError(fmt.Sprintf("cannot decode icon from Kamelet %s", k.Name), err) + dest := filepath.Join(out, "assets", "images", "kamelets", fmt.Sprintf("%s.svg", k.Name)) + if _, err := os.Stat(dest); err == nil { + err = os.Remove(dest) + handleGeneralError(fmt.Sprintf("cannot remove file %q", dest), err) + } + err = ioutil.WriteFile(dest, iconContent, 0666) + handleGeneralError(fmt.Sprintf("cannot write file %q", dest), err) + fmt.Printf("%q written\n", dest) + return fmt.Sprintf("image:kamelets/%s.svg[]", k.Name) + } + } + return "" +} + +func produceDoc(k camel.Kamelet, out string, image string) { + docFile := filepath.Join(out, "pages", k.Name + ".adoc") + + content := "// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT\n" + content += "= " + image + " " + k.Spec.Definition.Title + "\n" + content += "\n" + if prov, ok := k.Annotations["camel.apache.org/provider"]; ok { + content += fmt.Sprintf("*Provided by: %q*\n", prov) + content += "\n" + } + content += k.Spec.Definition.Description + "\n" + content += "\n" + content += "== Configuration Options\n" + content += "\n" + + required := make(map[string]bool) + keys := make([]string, 0, len(k.Spec.Definition.Properties)) + + if len(k.Spec.Definition.Properties) > 0 { + for _, r := range k.Spec.Definition.Required { + required[r] = true + } + + for key := range k.Spec.Definition.Properties { + keys = append(keys, key) + } + sort.Slice(keys, func(i, j int) bool { + ri := required[keys[i]] + rj := required[keys[j]] + if ri && !rj { + return true + } else if !ri && rj { + return false + } + return keys[i] < keys[j] + }) + + content += fmt.Sprintf("The following table summarizes the configuration options available for the `%s` Kamelet:\n", k.Name) + + content += `[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]` + "\n" + content += "|===\n" + content += tableLine("Property", "Name", "Description", "Type", "Default", "Example") + + for _, key := range keys { + prop := k.Spec.Definition.Properties[key] + name := key + if required[key] { + name = "*" + name + " {empty}* *" + } + def := "" + if prop.Default != nil { + b, err := prop.Default.MarshalJSON() + handleGeneralError(fmt.Sprintf("cannot marshal property %q default value in Kamelet %s", key, k.Name), err) + def = "`" + strings.ReplaceAll(string(b), "`", "'") + "`" + } + ex := "" + if prop.Example != nil { + b, err := prop.Example.MarshalJSON() + handleGeneralError(fmt.Sprintf("cannot marshal property %q example value in Kamelet %s", key, k.Name), err) + ex = "`" + strings.ReplaceAll(string(b), "`", "'") + "`" + } + content += tableLine(name, prop.Title, prop.Description, prop.Type, def, ex) + } + + content += "|===\n" + content += "\n" + content += "NOTE: Fields marked with ({empty}*) are mandatory.\n" + + } else { + content += "The Kamelet does not specify any configuration option.\n" + } + + content += "\n" + content += "== Usage\n" + content += "\n" + content += fmt.Sprintf("This section summarizes how the `%s` can be used in various contexts.\n", k.Name) + content += "\n" + + tp := k.ObjectMeta.Labels["camel.apache.org/kamelet.type"] + if tp != "" { + content += fmt.Sprintf("=== Knative %s\n", strings.Title(tp)) + content += "\n" + + content += fmt.Sprintf("The `%s` Kamelet can be used as Knative %s by binding it to a Knative object.\n", k.Name, tp) + content += "\n" + + sampleConfig := make([]string, 0) + for _, key := range keys { + if !required[key] { + continue + } + prop := k.Spec.Definition.Properties[key] + if prop.Default == nil { + ex := "" + if prop.Example != nil { + b, err := prop.Example.MarshalJSON() + handleGeneralError(fmt.Sprintf("cannot marshal property %q example value in Kamelet %s", key, k.Name), err) + ex = string(b) + } + if ex == "" { + ex = `"The ` + prop.Title + `"` + } + sampleConfig = append(sampleConfig, fmt.Sprintf("%s: %s", key, ex)) + } + } + props := "" + if len(sampleConfig) > 0 { + props += " properties:\n" + for _, p := range sampleConfig { + props += fmt.Sprintf(" %s\n", p) + } + } + + kameletRef := fmt.Sprintf(` ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: %s +%s`, k.Name, props) + + knativeRef := ` ref: + kind: InMemoryChannel + apiVersion: messaging.knative.dev/v1 + name: mychannel +` + + sourceRef := kameletRef + sinkRef := knativeRef + if tp == "sink" { + sourceRef = knativeRef + sinkRef = kameletRef + } + + binding := fmt.Sprintf(`apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: %s-binding +spec: + source: +%s sink: +%s +`, k.Name, sourceRef, sinkRef) + + content += fmt.Sprintf(".%s-binding.yaml\n", k.Name) + content += "[source,yaml]\n" + content += "----\n" + content += binding + content += "----\n" + + content += "\n" + content += "Make sure you have https://camel.apache.org/camel-k/latest/installation/installation.html[Camel K installed] into the Kubernetes cluster you're connected to.\n" + content += "\n" + content += fmt.Sprintf("Save the `%s-binding.yaml` file into your hard drive, then configure it according to your needs.\n", k.Name) + content += "\n" + content += fmt.Sprintf("You can run the %s using the following command:\n", tp) + content += "\n" + content += "[source,shell]\n" + content += "----\n" + content += fmt.Sprintf("kubectl apply -f %s-binding.yaml\n", k.Name) + content += "----\n" + + } + + content += "// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT\n" + + if _, err := os.Stat(docFile); err == nil { + err = os.Remove(docFile) + handleGeneralError(fmt.Sprintf("cannot remove file %q", docFile), err) + } + err := ioutil.WriteFile(docFile, []byte(content), 0666) + handleGeneralError(fmt.Sprintf("cannot write to file %q", docFile), err) + fmt.Printf("%q written\n", docFile) +} + +func tableLine(val ...string) string { + res := "" + for _, s := range val { + clean := strings.ReplaceAll(s, "|", "\\|") + res += "| " + clean + } + return res + "\n" +} + +func listKamelets(dir string) []camel.Kamelet { + scheme := runtime.NewScheme() + err := camel.AddToScheme(scheme) + handleGeneralError("cannot to add camel APIs to scheme", err) + + codecs := serializer.NewCodecFactory(scheme) + gv := camel.SchemeGroupVersion + gvk := schema.GroupVersionKind{ + Group: gv.Group, + Version: gv.Version, + Kind: "Kamelet", + } + decoder := codecs.UniversalDecoder(gv) + + kamelets := make([]camel.Kamelet, 0) + files, err := ioutil.ReadDir(dir) + filesSorted := make([]string, 0) + handleGeneralError(fmt.Sprintf("cannot list dir %q", dir), err) + for _, fd := range files { + if !fd.IsDir() && strings.HasSuffix(fd.Name(), ".kamelet.yaml") { + filesSorted = append(filesSorted, fd.Name()) + } + } + sort.Strings(filesSorted) + for _, fileName := range filesSorted { + content, err := ioutil.ReadFile(fileName) + handleGeneralError(fmt.Sprintf("cannot read file %q", fileName), err) + + json, err := yaml.ToJSON(content) + handleGeneralError(fmt.Sprintf("cannot convert file %q to JSON", fileName), err) + + kamelet := camel.Kamelet{} + _, _, err = decoder.Decode(json, &gvk, &kamelet) + handleGeneralError(fmt.Sprintf("cannot unmarshal file %q into Kamelet", fileName), err) + kamelets = append(kamelets, kamelet) + } + return kamelets +} + +func handleGeneralError(desc string, err error) { + if err != nil { + fmt.Printf("%s: %+v\n", desc, err) + os.Exit(2) + } +} diff --git a/docs/kamelet-catalog-ui/src/css/catalog.css b/docs/kamelet-catalog-ui/src/css/catalog.css index 52f9957..5b37b86 100644 --- a/docs/kamelet-catalog-ui/src/css/catalog.css +++ b/docs/kamelet-catalog-ui/src/css/catalog.css @@ -1,8 +1,13 @@ -/* Global fixes to the template */ +/* Start of global fixes to the template */ +article h1.page img { + width: 1em; +} + .nav-link .image > img, .breadcrumbs li .image > img { width: 1em; } +/* End of global fixes to the template */ .catalog-container { margin-top: 20px; diff --git a/docs/kamelet-catalog-ui/src/partials/catalog-body.hbs b/docs/kamelet-catalog-ui/src/partials/catalog-body.hbs index d11c0ec..22e76e7 100644 --- a/docs/kamelet-catalog-ui/src/partials/catalog-body.hbs +++ b/docs/kamelet-catalog-ui/src/partials/catalog-body.hbs @@ -1,4 +1,4 @@ -<div class="body"> +<div class="body catalog-body"> {{> nav}} {{> catalog-main}} </div> diff --git a/docs/modules/ROOT/assets/images/kamelets/aws-kinesis-source.svg b/docs/modules/ROOT/assets/images/kamelets/aws-kinesis-source.svg new file mode 100644 index 0000000..26ddfef --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/aws-kinesis-source.svg @@ -0,0 +1 @@ +<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 308.23401"><title>aws-kinesis</title><path d="M0,172.087l127.754,58.81,127.752-58.81-127.752-5.293Z" transform="translate(0 0.00005)" fill="#fcbf92"/><path d="M128.147,0,.059,63.881v90.136H153.648V12.751Z" transform="translate(0 0.00005)" fill="#9d5025"/><path d="M.059,217.559l128.162,90.675L256,217.559,127.945,198.926Z" transform="translate(0 0.00005)" fill="#fcbf92"/><path d="M128.146,154.017h67.5 [...] \ No newline at end of file diff --git a/docs/modules/ROOT/assets/images/kamelets/aws-sqs-source.svg b/docs/modules/ROOT/assets/images/kamelets/aws-sqs-source.svg new file mode 100644 index 0000000..04656a3 --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/aws-sqs-source.svg @@ -0,0 +1 @@ +<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 100 100" height="100px" version="1.1" viewBox="0 0 100 100" width="100px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Amazon_CloudSearch"><g><polygon fill="#D9A741" points="54.46,59.506 23.985,63.793 23.987,36.201 54.462,40.494 "/><polygon fill="#876929" points="20.179,37.3 [...] \ No newline at end of file diff --git a/docs/modules/ROOT/assets/images/kamelets/jira-source.svg b/docs/modules/ROOT/assets/images/kamelets/jira-source.svg new file mode 100644 index 0000000..29f29a3 --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/jira-source.svg @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"> + <defs> + <linearGradient x1="98.0308675%" y1="0.160599572%" x2="58.8877062%" y2="40.7655246%" id="linearGradient-1"> + <stop stop-color="#0052CC" offset="18%"></stop> + <stop stop-color="#2684FF" offset="100%"></stop> + </linearGradient> + <linearGradient x1="100.665247%" y1="0.45503212%" x2="55.4018095%" y2="44.7269807%" id="linearGradient-2"> + <stop stop-color="#0052CC" offset="18%"></stop> + <stop stop-color="#2684FF" offset="100%"></stop> + </linearGradient> + </defs> + <g> + <path d="M244.657778,0 L121.706667,0 C121.706667,14.7201046 127.554205,28.837312 137.962891,39.2459977 C148.371577,49.6546835 162.488784,55.5022222 177.208889,55.5022222 L199.857778,55.5022222 L199.857778,77.3688889 C199.877391,107.994155 224.699178,132.815943 255.324444,132.835556 L255.324444,10.6666667 C255.324444,4.77562934 250.548815,3.60722001e-16 244.657778,0 Z" fill="#2684FF"></path> + <path d="M183.822222,61.2622222 L60.8711111,61.2622222 C60.8907238,91.8874888 85.7125112,116.709276 116.337778,116.728889 L138.986667,116.728889 L138.986667,138.666667 C139.025905,169.291923 163.863607,194.097803 194.488889,194.097778 L194.488889,71.9288889 C194.488889,66.0378516 189.71326,61.2622222 183.822222,61.2622222 Z" fill="url(#linearGradient-1)"></path> + <path d="M122.951111,122.488889 L0,122.488889 C3.75391362e-15,153.14192 24.8491913,177.991111 55.5022222,177.991111 L78.2222222,177.991111 L78.2222222,199.857778 C78.241767,230.45532 103.020285,255.265647 133.617778,255.324444 L133.617778,133.155556 C133.617778,127.264518 128.842148,122.488889 122.951111,122.488889 Z" fill="url(#linearGradient-2)"></path> + </g> +</svg> diff --git a/docs/modules/ROOT/assets/images/kamelets/salesforce-source.svg b/docs/modules/ROOT/assets/images/kamelets/salesforce-source.svg new file mode 100644 index 0000000..4c72b80 --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/salesforce-source.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48" version="1.1"><g id="surface1"><path d="M36.5 12c-1.324 0-2.59.258-3.758.703A7.994 7.994 0 0 0 26 9c-2.105 0-4.02.82-5.445 2.152A9.468 9.468 0 0 0 13.5 8C8.254 8 4 12.254 4 17.5c0 .793.11 1.559.29 2.293A8.472 8.472 0 0 0 1 26.5C1 31.195 4.805 35 9.5 35c.414 0 .816-.04 1.215-.098 1.312 3 4.3 5.098 7.785 5.098 3.16 0 5.914-1.73 7.379-4.293A7.923 7.923 [...] \ No newline at end of file diff --git a/docs/modules/ROOT/assets/images/kamelets/slack-source.svg b/docs/modules/ROOT/assets/images/kamelets/slack-source.svg new file mode 100644 index 0000000..db76dd8 --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/slack-source.svg @@ -0,0 +1,28 @@ +<?xml version="1.0" ?><svg id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css"> + .st0{fill:#25D366;} + .st1{fill:#FFFFFF;} + .st2{fill:#FF0000;} + .st3{fill:#3D5A98;} + .st4{fill:url(#SVGID_1_);} + .st5{fill:url(#SVGID_2_);} + .st6{fill:#55ADEE;} + .st7{fill:#1E96C8;} + .st8{fill:#A9C9DD;} + .st9{fill:#C8DAEA;} + .st10{fill:none;} + .st11{fill:#4787F3;} + .st12{fill:#DC483C;} + .st13{fill:#FFCE43;} + .st14{fill:#149F5C;} + .st15{fill:#CE1E5B;} + .st16{fill:#72C5CD;} + .st17{fill:#DFA22F;} + .st18{fill:#3CB187;} + .st19{fill:#248C73;} + .st20{fill:#392538;} + .st21{fill:#BB242A;} + .st22{fill:none;stroke:#3CB187;stroke-miterlimit:10;} + .st23{fill:#009A57;} + .st24{fill:#FCCD37;} + .st25{fill:#2771F0;} +</style><g><path class="st15" d="M501.8,274L501.8,274c-7.6-23.3-32.6-36.1-56-28.5L96.2,359.1c-23.3,7.6-36.1,32.6-28.5,56l0,0 c7.6,23.3,32.6,36.1,56,28.5l349.6-113.6C496.6,322.4,509.4,297.3,501.8,274z"/><path class="st16" d="M443.5,97.7l-0.2-0.5c-7.6-23.3-32.6-36.1-56-28.5L38.7,182.1c-23.3,7.6-36.1,32.6-28.5,56l0.2,0.5 c7.6,23.3,32.6,36.1,56,28.5l348.6-113.3C438.3,146.1,451,121.1,443.5,97.7z"/><path class="st17" d="M443.6,388.3L329.9,38.7c-7.6-23.3-32.6-36.1-56-28.5v0c-23.3,7.6-36.1,3 [...] \ No newline at end of file diff --git a/docs/modules/ROOT/assets/images/kamelets/telegram-source.svg b/docs/modules/ROOT/assets/images/kamelets/telegram-source.svg new file mode 100644 index 0000000..080818f --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/telegram-source.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240"><defs><linearGradient id="a" x1=".667" x2=".417" y1=".167" y2=".75"><stop offset="0" stop-color="#37aee2"/><stop offset="1" stop-color="#1e96c8"/></linearGradient><linearGradient id="b" x1=".66" x2=".851" y1=".437" y2=".802"><stop offset="0" stop-color="#eff7fc"/><stop offset="1" stop-color="#fff"/></linearGradient></defs><circle cx="120" cy="120" r="120" fill="url(#a)"/><path fill="#c8daea" d="M98 175c-3.888 0-3.227-1.468-4.5 [...] \ No newline at end of file diff --git a/docs/modules/ROOT/assets/images/kamelets/timer-source.svg b/docs/modules/ROOT/assets/images/kamelets/timer-source.svg new file mode 100644 index 0000000..1aa543f --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/timer-source.svg @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve"> +<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata> +<g><g transform="translate(0.000000,511.000000) scale(0.100000,-0.100000)"><path d="M3888.1,4774.9v-235.1h411.4h414.3l-8.8-329.1l-8.8-332l-117.5-8.8c-229.2-14.7-620-99.9-925.6-196.9C2257.4,3220.6,1167.2,2065.8,802.9,649.6c-511.3-1986.3,384.9-4002,2206.7-4965.8c302.6-161.6,758.1-320.2,1154.8-405.5c426.1-91.1,1251.7-91.1,1680.7,0c1768.9,382,3044.1,1657.2,3426.1,3426.1c91.1,426.1,91.1,1254.6,0,1677.8c-420.2,1942.2-1936.4,3302.6-3890.3,3496.6l-199.8,20.6v320.3v320.3h411.4h411.4v235.1V5010H49 [...] +</svg> \ No newline at end of file diff --git a/docs/modules/ROOT/assets/images/kamelets/twitter-feed-source.svg b/docs/modules/ROOT/assets/images/kamelets/twitter-feed-source.svg deleted file mode 100644 index c0364cc..0000000 --- a/docs/modules/ROOT/assets/images/kamelets/twitter-feed-source.svg +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg width="256px" height="209px" viewBox="0 0 256 209" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"> - <g> - <path d="M256,25.4500259 C246.580841,29.6272672 236.458451,32.4504868 225.834156,33.7202333 C236.678503,27.2198053 245.00583,16.9269929 248.927437,4.66307685 C238.779765,10.6812633 227.539325,15.0523376 215.57599,17.408298 C205.994835,7.2006971 192.34506,0.822 177.239197,0.822 C148.232605,0.822 124.716076,24.3375931 124.716076,53.3423116 C124.716076,57.4586875 125.181462,61.4673784 126.076652,65.3112644 C82.4258385,63.1210453 43.7257252,42.211429 17.821398,10.4359288 C13.3005011, [...] - </g> -</svg> \ No newline at end of file diff --git a/docs/modules/ROOT/assets/images/kamelets/twitter-timeline-source.svg b/docs/modules/ROOT/assets/images/kamelets/twitter-timeline-source.svg deleted file mode 100644 index c0364cc..0000000 --- a/docs/modules/ROOT/assets/images/kamelets/twitter-timeline-source.svg +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg width="256px" height="209px" viewBox="0 0 256 209" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"> - <g> - <path d="M256,25.4500259 C246.580841,29.6272672 236.458451,32.4504868 225.834156,33.7202333 C236.678503,27.2198053 245.00583,16.9269929 248.927437,4.66307685 C238.779765,10.6812633 227.539325,15.0523376 215.57599,17.408298 C205.994835,7.2006971 192.34506,0.822 177.239197,0.822 C148.232605,0.822 124.716076,24.3375931 124.716076,53.3423116 C124.716076,57.4586875 125.181462,61.4673784 126.076652,65.3112644 C82.4258385,63.1210453 43.7257252,42.211429 17.821398,10.4359288 C13.3005011, [...] - </g> -</svg> \ No newline at end of file diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index da55e70..68a4450 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -1,3 +1,10 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT * xref:ROOT:index.adoc[Kamelet Catalog] -** xref:ROOT:twitter-feed-source.adoc[image:kamelets/twitter-feed-source.svg[] Twitter Feed Source] -** xref:ROOT:twitter-timeline-source.adoc[image:kamelets/twitter-timeline-source.svg[] Twitter Timeline Source] +** xref:ROOT:aws-kinesis-source.adoc[image:kamelets/aws-kinesis-source.svg[] AWS Kinesis Source] +** xref:ROOT:aws-sqs-source.adoc[image:kamelets/aws-sqs-source.svg[] AWS SQS Source] +** xref:ROOT:jira-source.adoc[image:kamelets/jira-source.svg[] Jira Source] +** xref:ROOT:salesforce-source.adoc[image:kamelets/salesforce-source.svg[] Salesforce Source] +** xref:ROOT:slack-source.adoc[image:kamelets/slack-source.svg[] Slack Source] +** xref:ROOT:telegram-source.adoc[image:kamelets/telegram-source.svg[] Telegram Source] +** xref:ROOT:timer-source.adoc[image:kamelets/timer-source.svg[] Timer Source] +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/docs/modules/ROOT/pages/aws-kinesis-source.adoc b/docs/modules/ROOT/pages/aws-kinesis-source.adoc new file mode 100644 index 0000000..9e00661 --- /dev/null +++ b/docs/modules/ROOT/pages/aws-kinesis-source.adoc @@ -0,0 +1,66 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT += image:kamelets/aws-kinesis-source.svg[] AWS Kinesis Source + +*Provided by: "Apache Software Foundation"* + +Receive data from AWS Kinesis. + +== Configuration Options + +The following table summarizes the configuration options available for the `aws-kinesis-source` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *accessKey {empty}* *| Access Key| The access key obtained from AWS| string| | +| *region {empty}* *| AWS Region| The AWS region to connect to (capitalized name)| string| | `"EU_WEST_1"` +| *secretKey {empty}* *| Secret Key| The secret key obtained from AWS| string| | +| *stream {empty}* *| Stream Name| The Kinesis stream that you want to access (needs to be created in advance)| string| | +|=== + +NOTE: Fields marked with ({empty}*) are mandatory. + +== Usage + +This section summarizes how the `aws-kinesis-source` can be used in various contexts. + +=== Knative Source + +The `aws-kinesis-source` Kamelet can be used as Knative source by binding it to a Knative object. + +.aws-kinesis-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: aws-kinesis-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: aws-kinesis-source + properties: + accessKey: "The Access Key" + region: "EU_WEST_1" + secretKey: "The Secret Key" + stream: "The Stream Name" + sink: + ref: + kind: InMemoryChannel + apiVersion: messaging.knative.dev/v1 + name: mychannel + +---- + +Make sure you have https://camel.apache.org/camel-k/latest/installation/installation.html[Camel K installed] into the Kubernetes cluster you're connected to. + +Save the `aws-kinesis-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 aws-kinesis-source-binding.yaml +---- +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/docs/modules/ROOT/pages/aws-sqs-source.adoc b/docs/modules/ROOT/pages/aws-sqs-source.adoc new file mode 100644 index 0000000..617c174 --- /dev/null +++ b/docs/modules/ROOT/pages/aws-sqs-source.adoc @@ -0,0 +1,67 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT += image:kamelets/aws-sqs-source.svg[] AWS SQS Source + +*Provided by: "Apache Software Foundation"* + +Receive data from AWS SQS. + +== Configuration Options + +The following table summarizes the configuration options available for the `aws-sqs-source` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *accessKey {empty}* *| Access Key| The access key obtained from AWS| string| | +| *queueNameOrArn {empty}* *| Queue Name| The SQS Queue name or ARN| string| | +| *region {empty}* *| AWS Region| The AWS region to connect to| string| | `"eu-west-1"` +| *secretKey {empty}* *| Secret Key| The secret key obtained from AWS| string| | +| deleteAfterRead| Auto-delete messages| Delete messages after consuming them| boolean| `true`| +|=== + +NOTE: Fields marked with ({empty}*) are mandatory. + +== Usage + +This section summarizes how the `aws-sqs-source` can be used in various contexts. + +=== Knative Source + +The `aws-sqs-source` Kamelet can be used as Knative source by binding it to a Knative object. + +.aws-sqs-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: aws-sqs-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: aws-sqs-source + properties: + accessKey: "The Access Key" + queueNameOrArn: "The Queue Name" + region: "eu-west-1" + secretKey: "The Secret Key" + sink: + ref: + kind: InMemoryChannel + apiVersion: messaging.knative.dev/v1 + name: mychannel + +---- + +Make sure you have https://camel.apache.org/camel-k/latest/installation/installation.html[Camel K installed] into the Kubernetes cluster you're connected to. + +Save the `aws-sqs-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 aws-sqs-source-binding.yaml +---- +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index 1424d8d..3728628 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -3,3 +3,4 @@ This page contains the default catalog of Apache Camel Kamelets. **We love contributions for this catalog**: more information in the https://github.com/apache/camel-kamelets/[github.com/apache/camel-kamelets] repository. + diff --git a/docs/modules/ROOT/pages/jira-source.adoc b/docs/modules/ROOT/pages/jira-source.adoc new file mode 100644 index 0000000..16269bd --- /dev/null +++ b/docs/modules/ROOT/pages/jira-source.adoc @@ -0,0 +1,65 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT += image:kamelets/jira-source.svg[] Jira Source + +*Provided by: "Apache Software Foundation"* + +Receive notifications about new issues from Jira. + +== Configuration Options + +The following table summarizes the configuration options available for the `jira-source` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *jiraUrl {empty}* *| Jira URL| The URL of your instance of Jira| string| | `"http://my_jira.com:8081"` +| *password {empty}* *| Password| The password to access Jira| string| | +| *username {empty}* *| Username| The username to access Jira| string| | +| jql| JQL| A query to filter issues| string| | `"project=MyProject"` +|=== + +NOTE: Fields marked with ({empty}*) are mandatory. + +== Usage + +This section summarizes how the `jira-source` can be used in various contexts. + +=== Knative Source + +The `jira-source` Kamelet can be used as Knative source by binding it to a Knative object. + +.jira-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: jira-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: jira-source + properties: + jiraUrl: "http://my_jira.com:8081" + password: "The Password" + username: "The Username" + sink: + ref: + kind: InMemoryChannel + apiVersion: messaging.knative.dev/v1 + name: mychannel + +---- + +Make sure you have https://camel.apache.org/camel-k/latest/installation/installation.html[Camel K installed] into the Kubernetes cluster you're connected to. + +Save the `jira-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 jira-source-binding.yaml +---- +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/docs/modules/ROOT/pages/salesforce-source.adoc b/docs/modules/ROOT/pages/salesforce-source.adoc new file mode 100644 index 0000000..b4b2cca --- /dev/null +++ b/docs/modules/ROOT/pages/salesforce-source.adoc @@ -0,0 +1,71 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT += image:kamelets/salesforce-source.svg[] Salesforce Source + +*Provided by: "Apache Software Foundation"* + +Receive updates from Salesforce. + +== Configuration Options + +The following table summarizes the configuration options available for the `salesforce-source` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *clientId {empty}* *| Consumer Key| The Salesforce application consumer key| string| | +| *clientSecret {empty}* *| Consumer Secret| The Salesforce application consumer secret| string| | +| *password {empty}* *| Password| The Salesforce user password| string| | +| *query {empty}* *| Query| The query to execute on Salesforce| string| | `"SELECT Id, Name, Email, Phone FROM Contact"` +| *topicName {empty}* *| Topic Name| The name of the topic/channel to use| string| | `"ContactTopic"` +| *userName {empty}* *| Username| The Salesforce username| string| | +| loginUrl| Login URL| The Salesforce instance login URL| string| `"https://login.salesforce.com"`| +|=== + +NOTE: Fields marked with ({empty}*) are mandatory. + +== Usage + +This section summarizes how the `salesforce-source` can be used in various contexts. + +=== Knative Source + +The `salesforce-source` Kamelet can be used as Knative source by binding it to a Knative object. + +.salesforce-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: salesforce-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: salesforce-source + properties: + clientId: "The Consumer Key" + clientSecret: "The Consumer Secret" + password: "The Password" + query: "SELECT Id, Name, Email, Phone FROM Contact" + topicName: "ContactTopic" + userName: "The Username" + sink: + ref: + kind: InMemoryChannel + apiVersion: messaging.knative.dev/v1 + name: mychannel + +---- + +Make sure you have https://camel.apache.org/camel-k/latest/installation/installation.html[Camel K installed] into the Kubernetes cluster you're connected to. + +Save the `salesforce-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 salesforce-source-binding.yaml +---- +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/docs/modules/ROOT/pages/slack-source.adoc b/docs/modules/ROOT/pages/slack-source.adoc new file mode 100644 index 0000000..758ec9a --- /dev/null +++ b/docs/modules/ROOT/pages/slack-source.adoc @@ -0,0 +1,62 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT += image:kamelets/slack-source.svg[] Slack Source + +*Provided by: "Apache Software Foundation"* + +Receive messages from a Slack channel. + +== Configuration Options + +The following table summarizes the configuration options available for the `slack-source` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *channel {empty}* *| Channel| The Slack channel to receive messages from| string| | `"#myroom"` +| *token {empty}* *| Token| The token to access Slack. A Slack app is needed. This app needs to have channels:history and channels:read permissions. The Bot User OAuth Access Token is the kind of token needed.| string| | +|=== + +NOTE: Fields marked with ({empty}*) are mandatory. + +== Usage + +This section summarizes how the `slack-source` can be used in various contexts. + +=== Knative Source + +The `slack-source` Kamelet can be used as Knative source by binding it to a Knative object. + +.slack-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: slack-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: slack-source + properties: + channel: "#myroom" + token: "The Token" + sink: + ref: + kind: InMemoryChannel + apiVersion: messaging.knative.dev/v1 + name: mychannel + +---- + +Make sure you have https://camel.apache.org/camel-k/latest/installation/installation.html[Camel K installed] into the Kubernetes cluster you're connected to. + +Save the `slack-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 slack-source-binding.yaml +---- +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/docs/modules/ROOT/pages/telegram-source.adoc b/docs/modules/ROOT/pages/telegram-source.adoc new file mode 100644 index 0000000..dc38787 --- /dev/null +++ b/docs/modules/ROOT/pages/telegram-source.adoc @@ -0,0 +1,62 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT += image:kamelets/telegram-source.svg[] Telegram Source + +*Provided by: "Apache Software Foundation"* + +Receive all messages that people send to your Telegram bot. + +To create a bot, contact the @botfather account using the Telegram app. + +== Configuration Options + +The following table summarizes the configuration options available for the `telegram-source` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *authorizationToken {empty}* *| Token| The token to access your bot on Telegram. You you can obtain it from the Telegram @botfather.| string| | +|=== + +NOTE: Fields marked with ({empty}*) are mandatory. + +== Usage + +This section summarizes how the `telegram-source` can be used in various contexts. + +=== Knative Source + +The `telegram-source` Kamelet can be used as Knative source by binding it to a Knative object. + +.telegram-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: telegram-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: telegram-source + properties: + authorizationToken: "The Token" + sink: + ref: + kind: InMemoryChannel + apiVersion: messaging.knative.dev/v1 + name: mychannel + +---- + +Make sure you have https://camel.apache.org/camel-k/latest/installation/installation.html[Camel K installed] into the Kubernetes cluster you're connected to. + +Save the `telegram-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 telegram-source-binding.yaml +---- +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/docs/modules/ROOT/pages/timer-source.adoc b/docs/modules/ROOT/pages/timer-source.adoc new file mode 100644 index 0000000..aeeb62b --- /dev/null +++ b/docs/modules/ROOT/pages/timer-source.adoc @@ -0,0 +1,61 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT += image:kamelets/timer-source.svg[] Timer Source + +*Provided by: "Apache Software Foundation"* + +Produces periodic events with a custom payload. + +== Configuration Options + +The following table summarizes the configuration options available for the `timer-source` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *message {empty}* *| Message| The message to generate| string| | `"hello world"` +| period| Period| The interval between two events in milliseconds| integer| `1000`| +|=== + +NOTE: Fields marked with ({empty}*) are mandatory. + +== Usage + +This section summarizes how the `timer-source` can be used in various contexts. + +=== Knative Source + +The `timer-source` Kamelet can be used as Knative source by binding it to a Knative object. + +.timer-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: timer-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: timer-source + properties: + message: "hello world" + sink: + ref: + kind: InMemoryChannel + apiVersion: messaging.knative.dev/v1 + name: mychannel + +---- + +Make sure you have https://camel.apache.org/camel-k/latest/installation/installation.html[Camel K installed] into the Kubernetes cluster you're connected to. + +Save the `timer-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 timer-source-binding.yaml +---- +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT diff --git a/docs/modules/ROOT/pages/twitter-feed-source.adoc b/docs/modules/ROOT/pages/twitter-feed-source.adoc deleted file mode 100644 index 6ebf5ce..0000000 --- a/docs/modules/ROOT/pages/twitter-feed-source.adoc +++ /dev/null @@ -1,3 +0,0 @@ -= Twitter Feed Source - -Lorem ipsum dolor... diff --git a/docs/modules/ROOT/pages/twitter-timeline-source.adoc b/docs/modules/ROOT/pages/twitter-timeline-source.adoc deleted file mode 100644 index 4c80a8e..0000000 --- a/docs/modules/ROOT/pages/twitter-timeline-source.adoc +++ /dev/null @@ -1,3 +0,0 @@ -= Twitter Timeline Source - -Lorem ipsum dolor... diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..da6292e --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module github.com/apache/camel-kamelets + +go 1.14 + +require ( + github.com/apache/camel-k/pkg/apis/camel v1.3.1 + k8s.io/apimachinery v0.18.9 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..aead593 --- /dev/null +++ b/go.sum @@ -0,0 +1,104 @@ +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/apache/camel-k/pkg/apis/camel v1.3.1 h1:8w3oXV1gQbTeazfOGuvYiSy52s3Zx9f3TeFF0pWyJvs= +github.com/apache/camel-k/pkg/apis/camel v1.3.1/go.mod h1:N3N41+jPM447J8CvnzUcIdGZVvMh1dxP31xDSpZDeUk= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +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= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +k8s.io/api v0.18.9 h1:7VDtivqwbvLOf8hmXSd/PDSSbpCBq49MELg84EYBYiQ= +k8s.io/api v0.18.9/go.mod h1:9u/h6sUh6FxfErv7QqetX1EB3yBMIYOBXzdcf0Gf0rc= +k8s.io/apimachinery v0.18.9 h1:3ZABKQx3F3xPWlsGhCfUl8W+JXRRblV6Wo2A3zn0pvY= +k8s.io/apimachinery v0.18.9/go.mod h1:PF5taHbXgTEJLU+xMypMmYTXTWPJ5LaW8bfsisxnEXk= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/jira-source.kamelet.yaml b/jira-source.kamelet.yaml new file mode 100644 index 0000000..74167d8 --- /dev/null +++ b/jira-source.kamelet.yaml @@ -0,0 +1,57 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: jira-source + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjU2cHgiIGhlaWdodD0iMjU2cHgiIHZpZXdCb3g9IjAgMCAyNTYgMjU2IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iOTguMDMwODY3NSUiIHkxPSIwLjE2MDU5OTU3MiUiIHgyPSI1OC44ODc3MDYyJSIgeTI9IjQwLjc2NTUyNDYlIi [...] + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: "source" +spec: + definition: + title: "Jira Source" + description: |- + Receive notifications about new issues from Jira. + required: + - jiraUrl + - username + - password + properties: + jiraUrl: + title: Jira URL + description: The URL of your instance of Jira + type: string + example: http://my_jira.com:8081 + username: + title: Username + description: The username to access Jira + type: string + password: + title: Password + description: The password to access Jira + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + jql: + title: JQL + description: A query to filter issues + type: string + example: project=MyProject + + types: + out: + mediaType: application/json + dependencies: + - "camel:jackson" + flow: + from: + uri: "jira:newIssues" + parameters: + jiraUrl: "{{jiraUrl}}" + username: "{{username}}" + password: "{{password}}" + jql: "{{jql}}" + steps: + - marshal: + json: {} + - to: "kamelet:sink" diff --git a/salesforce-source.kamelet.yaml b/salesforce-source.kamelet.yaml new file mode 100644 index 0000000..b650031 --- /dev/null +++ b/salesforce-source.kamelet.yaml @@ -0,0 +1,83 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: salesforce-source + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCA0OCA0OCIgdmVyc2lvbj0iMS4xIj48ZyBpZD0ic3VyZmFjZTEiPjxwYXRoIGQ9Ik0zNi41IDEyYy0xLjMyNCAwLTIuNTkuMjU4LTMuNzU4LjcwM0E3Ljk5NCA3Ljk5NCAwIDAgMCAyNiA5Yy0yLjEwNSAwLTQuMDIuODItNS40NDUgMi4xNTJBOS40NjggOS40NjggMCAwIDAgMTMuNSA4QzguMjU0IDggNCAxMi4yNTQgNCAxNy41YzAgLj [...] + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: "source" +spec: + definition: + title: "Salesforce Source" + description: |- + Receive updates from Salesforce. + required: + - query + - topicName + - clientId + - clientSecret + - userName + - password + properties: + query: + title: Query + description: The query to execute on Salesforce + type: string + example: SELECT Id, Name, Email, Phone FROM Contact + topicName: + title: Topic Name + description: The name of the topic/channel to use + type: string + example: ContactTopic + loginUrl: + title: Login URL + description: The Salesforce instance login URL + type: string + default: https://login.salesforce.com + clientId: + title: Consumer Key + description: The Salesforce application consumer key + type: string + clientSecret: + title: Consumer Secret + description: The Salesforce application consumer secret + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + userName: + title: Username + description: The Salesforce username + type: string + password: + title: Password + description: The Salesforce user password + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + types: + out: + mediaType: application/json + dependencies: + - "camel:jackson" + - "camel:salesforce" + flow: + from: + uri: "kamelet-reify:salesforce:{{topicName}}" + parameters: + clientId: "{{clientId}}" + clientSecret: "{{clientSecret}}" + userName: "{{userName}}" + password: "{{password}}" + notifyForFields: "ALL" + updateTopic: "true" + notifyForOperationCreate: "true" + notifyForOperationUpdate: "false" + notifyForOperationDelete: "false" + notifyForOperationUndelete: "false" + sObjectQuery: "{{query}}" + loginUrl: "{{loginUrl}}" + steps: + - marshal: + json: {} + - to: "kamelet:sink" diff --git a/slack-source.kamelet.yaml b/slack-source.kamelet.yaml new file mode 100644 index 0000000..9f9a64e --- /dev/null +++ b/slack-source.kamelet.yaml @@ -0,0 +1,43 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: slack-source + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaWQ9IkxheWVyXzEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMiA1MTI7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiMyNUQzNjY7fQoJLnN0MXtmaWxsOiNGRkZGRkY7fQoJLnN0MntmaWxsOiNGRjAwMDA7fQoJLnN0M3tmaWxsOiMzRDVBOT [...] + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: "source" +spec: + definition: + title: "Slack Source" + description: |- + Receive messages from a Slack channel. + required: + - channel + - token + properties: + channel: + title: Channel + description: The Slack channel to receive messages from + type: string + example: "#myroom" + token: + title: Token + description: The token to access Slack. A Slack app is needed. This app needs to have channels:history and channels:read permissions. The Bot User OAuth Access Token is the kind of token needed. + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + types: + out: + mediaType: application/json + dependencies: + - "camel:jackson" + flow: + from: + uri: "slack:{{channel}}" + parameters: + token: "{{token}}" + steps: + - marshal: + json: {} + - to: "kamelet:sink" diff --git a/telegram-source.kamelet.yaml b/telegram-source.kamelet.yaml new file mode 100644 index 0000000..3193e8a --- /dev/null +++ b/telegram-source.kamelet.yaml @@ -0,0 +1,39 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: telegram-source + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNDAgMjQwIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIuNjY3IiB4Mj0iLjQxNyIgeTE9Ii4xNjciIHkyPSIuNzUiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzM3YWVlMiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzFlOTZjOCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJiIiB4MT0iLjY2IiB4Mj0iLjg1MSIgeTE9Ii40MzciIHkyPSIuODAyIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNlZmY3Zm [...] + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: "source" +spec: + definition: + title: "Telegram Source" + description: |- + Receive all messages that people send to your Telegram bot. + + To create a bot, contact the @botfather account using the Telegram app. + required: + - authorizationToken + properties: + authorizationToken: + title: Token + description: The token to access your bot on Telegram. You you can obtain it from the Telegram @botfather. + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + types: + out: + mediaType: application/json + dependencies: + - "camel:jackson" + flow: + from: + uri: telegram:bots + parameters: + authorizationToken: "{{authorizationToken}}" + steps: + - marshal: + json: {} + - to: "kamelet:sink" diff --git a/timer-source.kamelet.yaml b/timer-source.kamelet.yaml index ebfc3f1..a20d9e1 100644 --- a/timer-source.kamelet.yaml +++ b/timer-source.kamelet.yaml @@ -21,13 +21,14 @@ metadata: name: timer-source annotations: camel.apache.org/kamelet.icon: data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gU3ZnIFZlY3RvciBJY29ucyA6IGh0dHA6Ly93d3cub25saW5ld2ViZm9udHMuY29tL2ljb24gLS0+DQo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm9 [...] + camel.apache.org/provider: "Apache Software Foundation" labels: camel.apache.org/kamelet.type: source camel.apache.org/kamelet.verified: "true" spec: definition: title: Timer Source - description: Produces periodic events with a custom payload + description: Produces periodic events with a custom payload. required: - message properties: