{"id":29179707,"url":"https://github.com/trendyol/cbef","last_synced_at":"2025-07-01T19:06:23.325Z","repository":{"id":207637677,"uuid":"717797488","full_name":"Trendyol/cbef","owner":"Trendyol","description":"GitOps Capability Provider for Couchbase Eventing Functions 🚀","archived":false,"fork":false,"pushed_at":"2025-02-03T11:24:36.000Z","size":1127,"stargazers_count":40,"open_issues_count":7,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-02T07:04:41.536Z","etag":null,"topics":["couchbase","couchbase-eventing","eventing","eventing-functions","gitops"],"latest_commit_sha":null,"homepage":"https://ty.gl/cbef","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Trendyol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-12T16:22:23.000Z","updated_at":"2024-07-23T19:47:30.000Z","dependencies_parsed_at":"2023-11-16T21:23:40.148Z","dependency_job_id":"5b2daeef-70bc-421a-9d24-7d9b2fa1669e","html_url":"https://github.com/Trendyol/cbef","commit_stats":null,"previous_names":["trendyol/cbef"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Trendyol/cbef","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fcbef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fcbef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fcbef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fcbef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Trendyol","download_url":"https://codeload.github.com/Trendyol/cbef/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fcbef/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263021821,"owners_count":23401148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["couchbase","couchbase-eventing","eventing","eventing-functions","gitops"],"created_at":"2025-07-01T19:06:09.672Z","updated_at":"2025-07-01T19:06:23.304Z","avatar_url":"https://github.com/Trendyol.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## cbef (Couchbase Eventing Functions)\n[![Release](https://img.shields.io/github/v/release/Trendyol/cbef?sort=semver)](https://github.com/Trendyol/cbef/releases)\n[![GoDoc](https://img.shields.io/static/v1?label=godoc\u0026message=reference\u0026color=blue)](https://pkg.go.dev/github.com/Trendyol/cbef)\n[![Tag Push](https://github.com/Trendyol/cbef/actions/workflows/tag-push.yml/badge.svg)](https://github.com/Trendyol/cbef/actions/workflows/tag-push.yml)\n![GitHub License](https://img.shields.io/github/license/Trendyol/cbef)\n\n`cbef` is a simple, gitops capability provider for [Couchbase eventing functions](https://www.couchbase.com/products/eventing/).\n\n![cbef](https://github.com/Trendyol/cbef/blob/main/.github/assets/cbef.gif)\n\n## Table of Contents\n- [Why?](#why)\n- [Quickstart](#quickstart)\n  - [Local](#local)\n  - [Docker](#docker)\n  - [GitLab](#gitlab)\n- [Function Configurations](#function-configurations)\n\n## Why?\nIn production projects where code reliability is a key consideration, it is essential to control and review the implemented processes using Git.\n\n`cbef` facilitates GitOps support for the operations performed within eventing functions.\n\nMoreover, to ensure the seamless functionality of eventing functions before deploying to the live environment, testing support is provided. This testing ensures that the functions operate as expected, offering confidence in their reliability.\n\nIn contrast to operations carried out through the UI, transitioning to a new function version is designed to be zero-downtime, allowing for rapid rollback if needed. The inclusion of revision history support further enhances the ability to track and manage changes effectively.\n\n## Quickstart\n\n### Local\n\u003e Note: Precompiled cbef for all arch types is available in the [releases](https://github.com/trendyol/cbef/releases) page.\n\nClone the `cbef` repository from the given GitHub URL\n```bash\ngit clone https://github.com/trendyol/cbef\n```\n\nChange the current working directory to the `cbef` directory\n```bash\ncd cbef\n```\n\nUpdate function settings\n```bash\nnano ./examples/functions/basic.json\n```\n\u003e Note: JavaScript eventing code file is found automatically.\n\nUpdate function file\n```bash\nnano ./examples/functions/basic.js\n```\n\u003e Note: If you need to example eventing functions code, click [here](https://docs.couchbase.com/server/current/eventing/eventing-examples.html) to read official Couchbase documentation.\n\nDownload dependencies\n```bash\ngo mod tidy\n```\n\nSet the environment variable `CONFIG_FILE` to the path of the `basic.json` configuration file\n```bash\nexport CONFIG_FILE=./examples/functions/basic.json\n```\n\nSet the environment variable `CI_COMMIT_AUTHOR` to the value `foo`, representing the author of the commit\n```bash\nexport CI_COMMIT_AUTHOR=foo\n```\n\nRun the Go program located in the `cmd` directory\n```bash\ngo run ./cmd\n```\n\n### Docker\nPull latest image\n```bash\ndocker pull ghcr.io/trendyol/cbef:1.0.2-amd64\n```\n\nRun latest image\n```bash\ndocker run --platform=linux/amd64 ghcr.io/trendyol/cbef:1.0.2-amd64\n```\n\u003e Note: All images available in the [packages](https://github.com/Trendyol/cbef/pkgs/container/cbef) page.\n\n### GitLab\nJust open a new repository and copy the examples folder.\n\nThe structure in `examples/.gitlab-ci.yml` will help you deploy your eventing function.\n\nAlso, you can store cluster connection secrets as masked and protected in ci/cd variables.\n\n## Function Configurations\n\u003e Configurations that can be used in files with `.json` extension located in the functions folder\n\n| Field                                    | Description                                                  |   Value Type   | Required | Options                            |\n|------------------------------------------|--------------------------------------------------------------|:--------------:|:--------:|------------------------------------|\n| cluster                                  | Couchbase connection configurations                          |     object     |    ✅     |                                    |\n| cluster.connection_string                | Couchbase cluster connection string                          |     string     |    ✅     | env supported with {{ENV}}         |\n| cluster.user                             | Username for cluster authentication                          |     string     |    ✅     | env supported with {{ENV}}         |\n| cluster.pass                             | Password for cluster authentication                          |     string     |    ✅     | env supported with {{ENV}}         |\n| name                                     | Function name                                                |     string     |    ✅     |                                    |\n| metadata_keyspace                        | Metadata keyspace configurations                             |     object     |    ✅     |                                    |\n| metadata_keyspace.bucket                 | Metadata bucket name                                         |     string     |    ✅     |                                    |\n| metadata_keyspace.scope                  | Metadata scope name                                          |     string     |    ✅     |                                    |\n| metadata_keyspace.collection             | Metadata collection name                                     |     string     |    ✅     |                                    |\n| source_keyspace                          | Source keyspace configurations                               |     object     |    ✅     |                                    |\n| source_keyspace.bucket                   | Source bucket name                                           |     string     |    ✅     |                                    |\n| source_keyspace.scope                    | Source scope name                                            |     string     |    ✅     |                                    |\n| source_keyspace.collection               | Source collection name                                       |     string     |    ✅     |                                    |\n| bucket_bindings                          | Bucket bindings configurations                               |  object array  |    ❌     |                                    |\n| bucket_bindings.alias                    | Alias for bucket binding                                     |     string     |    ❌     |                                    |\n| bucket_bindings.bucket                   | Target bucket name for binding                               |     string     |    ❌     |                                    |\n| bucket_bindings.scope                    | Target scope name for binding                                |     string     |    ❌     |                                    |\n| bucket_bindings.collection               | Target collection name for binding                           |     string     |    ❌     |                                    |\n| bucket_bindings.access                   | Access level for binding                                     |     string     |    ❌     | r (read-only), rw (read-write)     |\n| url_bindings                             | URL bindings configurations                                  |  object array  |    ❌     |                                    |\n| bucket_bindings.hostname                 | Hostname for URL binding                                     |     string     |    ❌     |                                    |\n| bucket_bindings.alias                    | Alias for URL binding                                        |     string     |    ❌     |                                    |\n| bucket_bindings.allow_cookies            | Allow cookies for URL binding                                |      bool      |    ❌     |                                    |\n| bucket_bindings.validate_ssl_certificate | Validate SSL certificate for URL binding                     |      bool      |    ❌     |                                    |\n| bucket_bindings.auth                     | Authentication configurations for URL binding                |     object     |    ❌     |                                    |\n| bucket_bindings.auth.type                | Authentication type for URL binding                          |     string     |    ❌     | basic, digest, bearer              |\n| bucket_bindings.auth.user                | Username for URL binding authentication                      |     string     |    ❌     |                                    |\n| bucket_bindings.auth.pass                | Password for URL binding authentication                      |     string     |    ❌     |                                    |\n| bucket_bindings.auth.token               | Token for URL binding authentication                         |     string     |    ❌     |                                    |\n| constant_bindings                        | Constant bindings configurations                             |  object array  |    ❌     |                                    |\n| constant_bindings.alias                  | Alias for constant binding                                   |     string     |    ❌     |                                    |\n| constant_bindings.literal                | Literal value for constant binding                           |     string     |    ❌     |                                    |\n| settings                                 | Function configurations                                      |     object     |    ❌     |                                    |\n| settings.dcp_stream_boundary             | The preferred deployment time feed boundary for the function |     string     |    ❌     | everything, from_now               |\n| settings.description                     | Description for function                                     |     string     |    ❌     |                                    |\n| settings.log_level                       | Granularity of system events being captured in the log       |     string     |    ❌     | INFO, ERROR, WARNING, DEBUG, TRACE |\n| settings.query_consistency               | Consistency level of N1QL statements in the function         |      uint      |    ❌     | 1 (NotBounded), 2 (RequestPlus)    |\n| settings.worker_count                    | Number of workers per node to process the events             |      uint      |    ❌     |                                    |\n| settings.language_compatibility          | Language compatibility of the function                       |     string     |    ❌     | 6.0.0, 6.5.0, 6.6.2                |\n| settings.execution_timeout               | Time after which the function's execution will be timed out  | uint (seconds) |    ❌     |                                    |\n| settings.timer_context_size              | Maximum allowed value of the timer context size in bytes     |      uint      |    ❌     |                                    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendyol%2Fcbef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrendyol%2Fcbef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendyol%2Fcbef/lists"}