{"id":29179703,"url":"https://github.com/trendyol/gaos","last_synced_at":"2025-07-01T19:06:22.807Z","repository":{"id":43053393,"uuid":"278005393","full_name":"Trendyol/gaos","owner":"Trendyol","description":"HTTP mocking to test API services for chaos scenarios","archived":false,"fork":false,"pushed_at":"2025-02-03T11:17:51.000Z","size":95,"stargazers_count":213,"open_issues_count":6,"forks_count":7,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-06T14:36:06.830Z","etag":null,"topics":["api","chaos","go","mocking"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","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":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-08T06:12:34.000Z","updated_at":"2025-04-04T03:42:26.000Z","dependencies_parsed_at":"2024-01-07T05:59:54.325Z","dependency_job_id":"548220b3-ecbb-4ae3-9a01-983cbaba346a","html_url":"https://github.com/Trendyol/gaos","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Trendyol/gaos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fgaos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fgaos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fgaos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fgaos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Trendyol","download_url":"https://codeload.github.com/Trendyol/gaos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trendyol%2Fgaos/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":["api","chaos","go","mocking"],"created_at":"2025-07-01T19:06:09.207Z","updated_at":"2025-07-01T19:06:22.768Z","avatar_url":"https://github.com/Trendyol.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/Trendyol/gaos\" target=\"_blank\"\u003e\u003cimg height=\"128\" src=\"https://raw.githubusercontent.com/Trendyol/gaos/master/.res/logo.png\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eGAOS\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n \u003cstrong\u003e\n   HTTP mocking to test API services for chaos scenarios\n \u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square\" alt=\"Apache 2.0\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/Trendyol/gaos\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/Trendyol/gaos?style=flat-square\" alt=\"Go Report\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Trendyol/gaos/actions?workflow=test\"\u003e\u003cimg src=\"https://img.shields.io/github/workflow/status/Trendyol/gaos/Test?label=build\u0026logo=github\u0026style=flat-square\" alt=\"Build Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Trendyol/gaos/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/release/Trendyol/gaos.svg?style=flat-square\" alt=\"GitHub release\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n*Gaos*, can create and provide custom mock restful services via using your fully-customizable scenarios and runs them on Docker \u0026 Kubernetes \u0026 localhost flawlessly.\n\n**Warning:** Currently in Beta.\n\n[![asciicast](https://asciinema.org/a/348527.svg)](https://asciinema.org/a/348527)\n\n## Features\n\n\u003e * API response mocking\n\u003e * Custom behaviour scenarios\n\u003e * Create custom actions for each scenario\n\u003e * Robust routing\n\u003e * Serve static \u0026 dynamic responses\n\u003e * Duration, Latency, Error scenarios\n\u003e * Deploy your services on Docker \u0026 K8S\n\u003e * ... and much more, explore the Gaos!\n\n## Installation\n\n* Via HomeBrew\n```bash\n$ brew tap trendyol/trendyol-tap\n$ brew install gaos\n```\n\n* Via Go\n```bash\n$ go get -u github.com/Trendyol/gaos \n```\n\n* Build on Docker\n```bash\n$ make build\n```\n\n## Scenarios\n\n| Scenario\t\t         | Explanation\t\t\t\t\t\t\t\t      |\n| ---------------------- |:----------------------------------------------:|\n| `latency`\t\t\t\t | Adds extra latency for request  |\n| `duration`\t\t     | Adds duration limit for request  |\n| `span`\t\t\t\t | Executes `accept` if in the specified time range, `ignore` otherwise.  |\n| `rate`\t\t\t\t | Executes `ignore` if reaches the value or on multiples of, `accept` otherwise.  |\n\n## Actions\n\n| Action\t\t         | Explanation\t\t\t\t\t\t\t\t      |\n| ---------------------- |:----------------------------------------------:|\n| `accept`\t\t\t\t | Execute if span and rate conditions doesn't match in the specified scenario  |\n| `ignore`\t\t\t\t | Execute if span and rate conditions does match in the specified scenario  |\n| `direct`\t\t\t\t | Specifies which scenario should be handled by next request  |\n| `result`\t\t\t\t | Specifies *Result Type* that will be return eventually  |\n| `status`\t\t\t\t | Specifies *Status Code* for given *Result Type*  |\n\n## Results\n\n| Result\t\t         | Explanation\t\t\t\t\t\t\t\t      |\n| ---------------------- |:----------------------------------------------:|\n| `type`\t\t\t\t | *Result Type* of the content  |\n| `content`\t\t\t\t | Definitions the relevant result's content, according to *Result Type*  |\n\n### Result Type\n\n| Result Type\t\t     | Explanation\t\t\t\t\t\t\t\t      |\n| ---------------------- |:----------------------------------------------:|\n| `static`\t\t\t\t | Returns `json` content  |\n| `file`\t\t\t\t | Returns `content.type` after reading the file in `content.path`  |\n| `redirect`\t\t     | Sends request to remote `content.host` and awaits response _(reverse proxy)_ |\n\n## Usage\n\n```bash\nUsage:\n  gaos [command]\n\nAvailable Commands:\n  help        Help about any command\n  run         Run Gaos server on localhost\n  start       Start Gaos server on given engine (Docker, K8S)\n\nFlags:\n  -h, --help   help for gaos\n```\n\n### Run Command\n\n```bash\nRun Gaos server on your localhost\n\nUsage:\n  gaos run [flags]\n\nFlags:\n  -x, --execute string    execute scenario services\n  -s, --scenario string   scenario file input (default \"./scenario.json\")\n```\n\nExample:\n\n```bash\n$ gaos run -s ./examples/example.json\n```\n\nAfter Gaos server started:\n\n```bash\n$ go run ./examples/example.go\n```\n\n### Start Command\n\n```bash\nStart Gaos server on given engine (Docker, K8S)\n\nUsage:\n  gaos start [flags]\n\nFlags:\n  -c, --config string        choose k8s config (default \"minikube\")\n      --cpu string           cpu limit (default \"500m\")\n  -e, --environment string   gaos running environment {docker, k8s} (default \"local\")\n\t  --memory string        memory limit (default \"500mi\")\n  -n, --namespace string     choose namespace (default \"default\")\n  -p, --password string      image registry password\n  -r, --registry string      image registry\n\t  --replica string       replica count (default \"1\")\n  -s, --scenario string      scenario file input (default \"./scenario.json\")\n\t  --secret string        secret key name\n  -t, --timeout string       client timeout (default \"5m\")\n  -u, --username string      image registry username\n```\n\n* Example: Docker\n\n```bash\n$ gaos start -e docker -s './examples/example.json'\n```\n\n* Example: Kubernetes\n\n```bash\n$ gaos start -e k8s -s './examples/example.json'\n```\n\n## Running Tests\n\n*Requirements:*\n\n* [bats](https://github.com/bats-core/bats-core)\n* [docker](https://www.docker.com/)\n* [kind](https://github.com/kubernetes-sigs/kind) (with `kind-kind` context, `localhost:5000` [local registry](https://kind.sigs.k8s.io/docs/user/local-registry/))\n\n```bash\n$ bats e2e.bats\n```\n\n## Known Issues\n\n* Lack of some unit tests\n* E2E tests are not running on pipeline yet. (Manually: `bats e2e.bats`)\n* Not tested in Windows yet\n\n## TO-DO\n\n* [ ] Add `./docs` folder for better documentation\n* [ ] Scenario linter - to check rules, keys and paths\n* [ ] Remote server config reader\n* [ ] API client\n* [ ] [Envoy](https://www.envoyproxy.io/) support - sidecar feature\n* [ ] [Consul](https://www.consul.io/) support - service mesh feature\n\n## License\n\nThe base project code is licensed under Apache License unless otherwise specified. Please see the **[LICENSE](https://github.com/Trendyol/gaos/blob/master/LICENSE)** file for more information.\n\n\u003ckbd\u003eGAOS\u003c/kbd\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendyol%2Fgaos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrendyol%2Fgaos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendyol%2Fgaos/lists"}