{"id":23627416,"url":"https://github.com/abstractbreazy/grpc-sandbox","last_synced_at":"2025-08-31T03:31:52.394Z","repository":{"id":42469395,"uuid":"405995317","full_name":"abstractbreazy/grpc-sandbox","owner":"abstractbreazy","description":"An example of Go gRPC-Server with Envoy gRPC-JSON Transcoding.","archived":false,"fork":false,"pushed_at":"2025-03-14T10:31:38.000Z","size":62,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T11:37:48.124Z","etag":null,"topics":["buf","envoy","golang","grpc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abstractbreazy.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":"2021-09-13T13:58:09.000Z","updated_at":"2025-03-14T10:15:19.000Z","dependencies_parsed_at":"2022-09-13T15:03:22.057Z","dependency_job_id":null,"html_url":"https://github.com/abstractbreazy/grpc-sandbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abstractbreazy/grpc-sandbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractbreazy%2Fgrpc-sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractbreazy%2Fgrpc-sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractbreazy%2Fgrpc-sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractbreazy%2Fgrpc-sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abstractbreazy","download_url":"https://codeload.github.com/abstractbreazy/grpc-sandbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abstractbreazy%2Fgrpc-sandbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272934245,"owners_count":25017821,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["buf","envoy","golang","grpc"],"created_at":"2024-12-27T23:59:16.840Z","updated_at":"2025-08-31T03:31:52.388Z","avatar_url":"https://github.com/abstractbreazy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## gRPC-JSON Transcoder \n[![Go Report Card](https://goreportcard.com/badge/github.com/abstractbreazy/grpc-sandbox)](https://goreportcard.com/report/github.com/abstractbreazy/grpc-sandbox)\nProtobuf, gRPC, Envoy    example using `buf.build` tool.\n\nIf you have `Go`, `make` and `buf.build` tool installed, you should be able to just execute.\n\n```shell\n make\n```\n\nI recommend completing [Tour of Buf](https://docs.buf.build/tour/introduction)  to understand the functionality  of both the CLI and the BSR.\n\n\n### *Envoy*\n\nEnvoy is a very flexible proxy. It's implements *gRPC-JSON transcoding* as a [filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/grpc_stats_filter).\nIn order to to start transcoding you need to:\n\n- Generate the proto descriptor of gRPC service   \n    ```bash\n    make image-gen \n    ```\n- Run Envoy using [Docker](https://docs.docker.com/get-docker/) \n    ```bash\n    make docker-run \n    ```\n- Build a gRPC-service:\n    ```bash \n    make run \n    ```\n\nBy default, when transcoding occurs, *gRPC-JSON* encodes the message output of a gRPC service method into JSON and sets the HTTP response *Content-Type* header to *`application/json`*.  \n\nYou can verify that *gRPC-JSON transcoding* works fine by sending the following request:\n\n``` bash\ncurl -X 'GET' \\\n  'http://localhost:8080/v1/example/ping' \\\n  -H 'accept: application/json'\n```\n\n### *gRPCurl*\n\nYou can use [gRPCurl](https://github.com/fullstorydev/grpcurl) to interact with gRPC server without using an Envoy proxy.\n\nExample of gRPCurl usage: \n\n```bash\ngrpcurl -plaintext localhost:9092 describe                     \n\ngrpcurl -plaintext -d '{}' localhost:9092 example.v1.Example.Ping\n```\n\n### *Tests*\n\nYou can use `make` command to run unit-tests without running the app or building `envoy` container:\n\n```bash \nmake go-test \n  ```\n\n### *Links*:\n- [Envoy gRPC-JSON transcoder](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/grpc_json_transcoder_filter)\n- [gRPCurl Library](https://github.com/fullstorydev/grpcurl)\n- [Buf.build documantation](https://docs.buf.build/introduction)\n- [GNU Make](https://www.gnu.org/software/make/)\n- [Docker](https://docs.docker.com/get-docker/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabstractbreazy%2Fgrpc-sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabstractbreazy%2Fgrpc-sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabstractbreazy%2Fgrpc-sandbox/lists"}