{"id":46874792,"url":"https://github.com/ooclab/ga","last_synced_at":"2026-03-10T20:52:38.008Z","repository":{"id":57588814,"uuid":"153872147","full_name":"ooclab/ga","owner":"ooclab","description":"A lightweight middleware for service-oriented architecture","archived":false,"fork":false,"pushed_at":"2024-01-01T04:10:34.000Z","size":9525,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-06-20T14:21:07.626Z","etag":null,"topics":["apigateway","golang","microservice","middleware","openai","plugable","service-oriented"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ooclab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-20T05:15:07.000Z","updated_at":"2023-12-30T07:39:00.000Z","dependencies_parsed_at":"2024-06-20T14:03:22.938Z","dependency_job_id":"7c747d4f-28fd-45fb-bd64-87ad4458416a","html_url":"https://github.com/ooclab/ga","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/ooclab/ga","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooclab%2Fga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooclab%2Fga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooclab%2Fga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooclab%2Fga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ooclab","download_url":"https://codeload.github.com/ooclab/ga/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooclab%2Fga/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30354922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["apigateway","golang","microservice","middleware","openai","plugable","service-oriented"],"created_at":"2026-03-10T20:52:37.863Z","updated_at":"2026-03-10T20:52:37.990Z","avatar_url":"https://github.com/ooclab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Guardian Angel\n\n**G**uardian **A**ngel is a lightweight middleware for service-oriented architecture.\n\nWhat is the `service-oriented` here ?\n\n1. `big services` : export a http(s) api\n2. `small services`\n   - microservices / nanoservices\n   - serverless / FaaS\n\nWe don't want to argument the term, we just want to do right job.\n:-)\n\n![ga arch](./docs/attachments/ga-current-arch.png)\n\nCurrent Support:\n\n- \\[x] custom your middleware with golang plugin ( [third-party-middleware](https://github.com/urfave/negroni#third-party-middleware) )\n\nCurrent Middlewares:\n\n- \\[x] [openai](./middlewares/openai) : as a gateway of openai, custom your key and limit the request count\n- \\[x] [hello](./middlewares/hello) : for example\n- \\[x] [jwt](./middlewares/jwt) : decode JWT (from `Authorization` in HTTP Request Header), and set `X-User-Id` header by user id\n- \\[x] [addauth](./middlewares/addauth) : manage `access_token` and `refresh_token` , add JWT with `Authorization` in HTTP Request Header auto\n- \\[x] [openapi](./middlewares/openapi) : authorize permissions and validate request args with OpenAPI 2.0 Spec Document of the backend service\n- \\[x] [debug](./middlewares/debug) : print http request data when debug is enable\n- \\[ ] openapi-response : check the response for testing\n\n------\n\n## 目录\n\n- [作为 openai 的网关](./docs/openai-gateway.md)\n- [为什么开发 ga ？](./docs/reason.md)\n- [ideas](./docs/ideas.md)\n- [istio](./docs/istio.md)\n- [与 es 配合架构思考](./docs/add-es.md)\n- [authz](./docs/authz.md)\n- [docker build image](./docs/docker.md)\n\nga 架构示例：\n\n- [ga 架构一](./docs/arch-design/arch1.md)\n\n### 进展\n\n#### 已完成\n\n- \\[x] 支持启动任意数量的 forwarder ，每个 forwarder 可以自由搭配任意数量的 middlewares\n- \\[x] 支持 golang plugin 方式写自定义的 middleware 。 可以查看示例： [hello](https://github.com/ooclab/ga/tree/master/middlewares/hello)\n\n#### TODO\n\n- [ ] 支持提供 TLS 服务：指定证书和私钥或使用 letsencrypt 申请并自动更新证书（参考 caddy 和 traefik ）。避免使用文件系统存放证书，而是使用 etcd 存放证书（分布式）。\n- [ ] 使用 etcd 或类似服务作为统一分布式存储，主程序和 middleware 都可以使用 etcd 存储和读取数据及配置，提供统一内部 API 供主程序和 middleware 使用。\n  - 存储可以考虑单机（kv）或分布式（etcd）2种方式，提供统一的 store 抽象。\n  - main, middleware 的配置和数据（监控），以及 let's encrypt 的证书都需要存储。\n\n## Contact\n\n- info@ooclab.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fooclab%2Fga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fooclab%2Fga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fooclab%2Fga/lists"}