{"id":22492555,"url":"https://github.com/garystafford/pb-greeting","last_synced_at":"2026-05-01T15:38:37.299Z","repository":{"id":74258791,"uuid":"179977205","full_name":"garystafford/pb-greeting","owner":"garystafford","description":"Protobuf source code and buf configuration","archived":false,"fork":false,"pushed_at":"2021-07-15T12:22:48.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"v2021","last_synced_at":"2023-08-12T04:15:58.060Z","etag":null,"topics":["grpc","grpc-gateway","grpc-go","istio","istioctl","protobuf","protocol-buffers"],"latest_commit_sha":null,"homepage":"https://wp.me/p1RD28-6k1","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/garystafford.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-04-07T14:25:22.000Z","updated_at":"2021-07-20T02:44:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"afd75bed-5900-4d08-85af-442418e1878f","html_url":"https://github.com/garystafford/pb-greeting","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garystafford%2Fpb-greeting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garystafford%2Fpb-greeting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garystafford%2Fpb-greeting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garystafford%2Fpb-greeting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garystafford","download_url":"https://codeload.github.com/garystafford/pb-greeting/tar.gz/refs/heads/v2021","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245919861,"owners_count":20693974,"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":["grpc","grpc-gateway","grpc-go","istio","istioctl","protobuf","protocol-buffers"],"created_at":"2024-12-06T18:19:01.969Z","updated_at":"2026-05-01T15:38:37.259Z","avatar_url":"https://github.com/garystafford.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Protobuf Files for Istio Observability Demo\n\nProtocol Buffers (Protobuf) files for reference application platform, used in my Istio observability demo blog posts.\n\n## Commands\n\nGenerates (4) files: go, grpc, grpc gateway, and swagger\n\nSee [Build Protocol Buffers using Docker](./build_protobuf_notes.md).\n\n```shell\ngo mod tidy\n\nbuf beta mod update\nbuf lint\nbuf ls-files\n```\n\n```shell\nbuf generate -v\n\n# alternately\nbuf generate --path proto/greeting/v2 -v\n\n# using protoc instead\nbuf protoc -I . \\\n  --openapiv2_out=../protobuf --openapiv2_opt=logtostderr=true \\\n  --go_out=../protobuf --go_opt=paths=source_relative \\\n  --go-grpc_out=../protobuf --go-grpc_opt=paths=source_relative \\\n  --grpc-gateway_out=../protobuf --grpc-gateway_opt=paths=source_relative,generate_unbound_methods=true \\\n  proto/greeting/v2/greeting.proto\n\n# for python\npython3 -m grpc_tools.protoc -I . \\\n  --python_out=../protobuf \\\n  --grpc_python_out=../protobuf \\\n  --grpc-gateway_out=../protobuf --grpc-gateway_opt=paths=source_relative,generate_unbound_methods=true \\\n  proto/greeting/v2/greeting.proto\n\n```\n\n## Swagger\n\nUse Docker to view Swagger doc at \u003chttp://localhost:8080/\u003e.\n\n```shell\ndocker run -p 8080:8080 -d --name swagger-ui \\\n  -e SWAGGER_JSON=/tmp/greeting/v2/greeting.swagger.json \\\n  -v ~/Documents/projects/protobuf:/tmp swaggerapi/swagger-ui\n```\n\n## Sample Output an Array of Greeting\n\n```json\n{\n  \"greeting\": [\n    {\n      \"id\": \"a9afab6a-3e2a-41a6-aec7-7257d2904076\",\n      \"service\": \"Service D\",\n      \"message\": \"Shalom (שָׁלוֹם), from Service D!\",\n      \"created\": \"2021-06-04T14:28:32.695151047Z\",\n      \"hostname\": \"service-d-565c775894-vdsjx\"\n    },\n    {\n      \"id\": \"6d4cc38a-b069-482c-ace5-65f0c2d82713\",\n      \"service\": \"Service G\",\n      \"message\": \"Ahlan (أهلا), from Service G!\",\n      \"created\": \"2021-06-04T14:28:32.814550521Z\",\n      \"hostname\": \"service-g-5b846ff479-znpcb\"\n    },\n    {\n      \"id\": \"988757e3-29d2-4f53-87bf-e4ff6fbbb105\",\n      \"service\": \"Service H\",\n      \"message\": \"Nǐ hǎo (你好), from Service H!\",\n      \"created\": \"2021-06-04T14:28:32.947406463Z\",\n      \"hostname\": \"service-h-76cb7c8d66-lkr26\"\n    },\n    {\n      \"id\": \"966b0bfa-0b63-4e21-96a1-22a76e78f9cd\",\n      \"service\": \"Service E\",\n      \"message\": \"Bonjour, from Service E!\",\n      \"created\": \"2021-06-04T14:28:33.007881464Z\",\n      \"hostname\": \"service-e-594d4754fc-pr7tc\"\n    },\n    {\n      \"id\": \"c612a228-704f-4562-90c5-33357b12ff8d\",\n      \"service\": \"Service B\",\n      \"message\": \"Namasté (नमस्ते), from Service B!\",\n      \"created\": \"2021-06-04T14:28:33.015985983Z\",\n      \"hostname\": \"service-b-697b78cf54-4lk8s\"\n    },\n    {\n      \"id\": \"b621bd8a-02ee-4f9b-ac1a-7d91ddad85f5\",\n      \"service\": \"Service C\",\n      \"message\": \"Konnichiwa (こんにちは), from Service C!\",\n      \"created\": \"2021-06-04T14:28:33.042001406Z\",\n      \"hostname\": \"service-c-7fd4dd5947-5wcgs\"\n    },\n    {\n      \"id\": \"52eac1fa-4d0c-42b4-984b-b65e70afd98a\",\n      \"service\": \"Service A\",\n      \"message\": \"Hello, from Service A!\",\n      \"created\": \"2021-06-04T14:28:33.093380628Z\",\n      \"hostname\": \"service-a-6f776d798f-5l5dz\"\n    }\n  ]\n}\n```\n\n---\n\n\u003ci\u003eThe contents of this repository represent my viewpoints and not of my past or current employers, including Amazon Web Services (AWS). All third-party libraries, modules, plugins, and SDKs are the property of their respective owners.\u003c/i\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarystafford%2Fpb-greeting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarystafford%2Fpb-greeting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarystafford%2Fpb-greeting/lists"}