{"id":15046454,"url":"https://github.com/dan-and-dna/gin-grpc","last_synced_at":"2026-02-19T05:01:19.620Z","repository":{"id":62867845,"uuid":"562767207","full_name":"DAN-AND-DNA/gin-grpc","owner":"DAN-AND-DNA","description":"The Gin middleware that forwards grpc requests","archived":false,"fork":false,"pushed_at":"2022-11-09T16:43:27.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-22T09:26:36.541Z","etag":null,"topics":["forwarding","gin","gin-middleware","grpc","middleware"],"latest_commit_sha":null,"homepage":"","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/DAN-AND-DNA.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":null,"security":null,"support":null}},"created_at":"2022-11-07T08:07:38.000Z","updated_at":"2023-09-01T11:59:19.000Z","dependencies_parsed_at":"2023-01-21T09:18:09.673Z","dependency_job_id":null,"html_url":"https://github.com/DAN-AND-DNA/gin-grpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DAN-AND-DNA/gin-grpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAN-AND-DNA%2Fgin-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAN-AND-DNA%2Fgin-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAN-AND-DNA%2Fgin-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAN-AND-DNA%2Fgin-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DAN-AND-DNA","download_url":"https://codeload.github.com/DAN-AND-DNA/gin-grpc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DAN-AND-DNA%2Fgin-grpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29604107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T04:38:07.383Z","status":"ssl_error","status_checked_at":"2026-02-19T04:35:50.016Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["forwarding","gin","gin-middleware","grpc","middleware"],"created_at":"2024-09-24T20:53:07.684Z","updated_at":"2026-02-19T05:01:19.588Z","avatar_url":"https://github.com/DAN-AND-DNA.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gin-grpc\nThe Gin middleware that forwards grpc requests\n\n\n# [中文文档](./README_cn.md)\n1. This middleware enables us to handle requests for different protocols simultaneously with just one piece of code\n\n2. Here is the Grpc middleware [grpc-route](https://github.com/DAN-AND-DNA/grpc-route) \n\n\n## Usage Scenarios\n- Need to handle both Restful Api and Grpc\n\n- Network Framework and Business Framework (for example: MVC) are separated from each other, just need use the grpc way to write business, such as WebBFF and Services can use one Framework\n\n- Reuse Gin and Grpc community middleware to build your own Microservices framework (Customizable for Observability and Performance)\n\n## Benchmark\n```\ngoos: windows\ngoarch: amd64\npkg: github.com/dan-and-dna/gin-grpc\ncpu: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz\nBenchmarkGinGrpc\nBenchmarkGinGrpc-12      3528080              1675 ns/op            1496 B/op\n              13 allocs/op\nPASS\n```\n\n## Unit Test\n```\n=== RUN   TestGinGrpc\n=== RUN   TestGinGrpc/TestJsonUnmarshalAndMarshal\n=== RUN   TestGinGrpc/TestReturnNil\n=== RUN   TestGinGrpc/TestRequestError\n=== RUN   TestGinGrpc/TestRightRequest\n=== RUN   TestGinGrpc/TestOmitempty\n=== RUN   TestGinGrpc/TestBadBody\n=== RUN   TestGinGrpc/TestEmptyBody\n=== RUN   TestGinGrpc/TestBadPath\n--- PASS: TestGinGrpc (0.00s)\n    --- PASS: TestGinGrpc/TestJsonUnmarshalAndMarshal (0.00s)\n    --- PASS: TestGinGrpc/TestReturnNil (0.00s)\n    --- PASS: TestGinGrpc/TestRequestError (0.00s)\n    --- PASS: TestGinGrpc/TestRightRequest (0.00s)\n    --- PASS: TestGinGrpc/TestOmitempty (0.00s)\n    --- PASS: TestGinGrpc/TestBadBody (0.00s)\n    --- PASS: TestGinGrpc/TestEmptyBody (0.00s)\n    --- PASS: TestGinGrpc/TestBadPath (0.00s)\nPASS\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-and-dna%2Fgin-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdan-and-dna%2Fgin-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-and-dna%2Fgin-grpc/lists"}