{"id":20816815,"url":"https://github.com/khofesh/grpc-in-golang","last_synced_at":"2026-04-24T10:32:24.316Z","repository":{"id":124988435,"uuid":"477243667","full_name":"khofesh/grpc-in-golang","owner":"khofesh","description":"gRPC","archived":false,"fork":false,"pushed_at":"2022-04-10T12:14:39.000Z","size":110,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T15:54:42.499Z","etag":null,"topics":["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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khofesh.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":"2022-04-03T05:07:11.000Z","updated_at":"2023-03-09T02:35:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d760a7c-2bde-4f50-aff0-726c12edd630","html_url":"https://github.com/khofesh/grpc-in-golang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fgrpc-in-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fgrpc-in-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fgrpc-in-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fgrpc-in-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khofesh","download_url":"https://codeload.github.com/khofesh/grpc-in-golang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243165501,"owners_count":20246722,"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":["golang","grpc"],"created_at":"2024-11-17T21:37:11.323Z","updated_at":"2025-12-24T10:46:37.375Z","avatar_url":"https://github.com/khofesh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gRPC golang\n\n## gRPC reflection and evans cli\n\nhttps://github.com/grpc/grpc-go/tree/master/reflection\n\nhttps://github.com/ktr0731/evans/issues/150#issuecomment-465394581\n\n```shell\n$ curl -L 'https://github.com/ktr0731/evans/releases/download/0.10.4/evans_linux_amd64.tar.gz' | tar xvzf -\n$ file evans\nevans: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped\n$ mv evans /usr/local/bin/evans\n```\n\nthe evans\n\n```shell\n[fahmad@ryzen calculator]$ evans -p 50051 -r\n\n  ______\n |  ____|\n | |__    __   __   __ _   _ __    ___\n |  __|   \\ \\ / /  / _. | | '_ \\  / __|\n | |____   \\ V /  | (_| | | | | | \\__ \\\n |______|   \\_/    \\__,_| |_| |_| |___/\n\n more expressive universal gRPC client\n\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e show pac\ncommand show: unknown target 'pac'\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e show package\n+-------------------------+\n|         PACKAGE         |\n+-------------------------+\n| calculator              |\n| grpc.reflection.v1alpha |\n+-------------------------+\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e show service\n+-------------------+--------------------------+---------------------------------+----------------------------------+\n|      SERVICE      |           RPC            |          REQUEST TYPE           |          RESPONSE TYPE           |\n+-------------------+--------------------------+---------------------------------+----------------------------------+\n| CalculatorService | Sum                      | SumRequest                      | SumResponse                      |\n| CalculatorService | PrimeNumberDecomposition | PrimeNumberDecompositionRequest | PrimeNumberDecompositionResponse |\n| CalculatorService | ComputeAverage           | ComputeAverageRequest           | ComputeAverageResponse           |\n| CalculatorService | FindMaximum              | FindMaximumRequest              | FindMaximumResponse              |\n| CalculatorService | SquareRoot               | SquareRootRequest               | SquareRootResponse               |\n+-------------------+--------------------------+---------------------------------+----------------------------------+\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e show message\n+----------------------------------+\n|             MESSAGE              |\n+----------------------------------+\n| ComputeAverageRequest            |\n| ComputeAverageResponse           |\n| FindMaximumRequest               |\n| FindMaximumResponse              |\n| PrimeNumberDecompositionRequest  |\n| PrimeNumberDecompositionResponse |\n| SquareRootRequest                |\n| SquareRootResponse               |\n| SumRequest                       |\n| SumResponse                      |\n+----------------------------------+\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e desc SumRequest\n+-------+------------------------+----------+\n| FIELD |          TYPE          | REPEATED |\n+-------+------------------------+----------+\n| data  | TYPE_MESSAGE (SumData) | false    |\n+-------+------------------------+----------+\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e show package\n+-------------------------+\n|         PACKAGE         |\n+-------------------------+\n| calculator              |\n| grpc.reflection.v1alpha |\n+-------------------------+\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e package calculator\n\ncalculator@127.0.0.1:50051\u003e show service\n+-------------------+--------------------------+---------------------------------+----------------------------------+\n|      SERVICE      |           RPC            |          REQUEST TYPE           |          RESPONSE TYPE           |\n+-------------------+--------------------------+---------------------------------+----------------------------------+\n| CalculatorService | Sum                      | SumRequest                      | SumResponse                      |\n| CalculatorService | PrimeNumberDecomposition | PrimeNumberDecompositionRequest | PrimeNumberDecompositionResponse |\n| CalculatorService | ComputeAverage           | ComputeAverageRequest           | ComputeAverageResponse           |\n| CalculatorService | FindMaximum              | FindMaximumRequest              | FindMaximumResponse              |\n| CalculatorService | SquareRoot               | SquareRootRequest               | SquareRootResponse               |\n+-------------------+--------------------------+---------------------------------+----------------------------------+\n\ncalculator@127.0.0.1:50051\u003e service CalculatorService\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e call Sum\ndata::first_number (TYPE_INT32) =\u003e 12\ndata::second_number (TYPE_INT32) =\u003e 32\n{\n  \"result\": 44\n}\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e call PrimeNumberDecomposition\nnumber (TYPE_INT64) =\u003e 2343234234\n{\n  \"primeFactor\": \"2\"\n}\n{\n  \"primeFactor\": \"3\"\n}\n{\n  \"primeFactor\": \"11\"\n}\n{\n  \"primeFactor\": \"1171\"\n}\n{\n  \"primeFactor\": \"30319\"\n}\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e call ComputeAverage\nnumber (TYPE_INT32) =\u003e 55\nnumber (TYPE_INT32) =\u003e 32\nnumber (TYPE_INT32) =\u003e 34\nnumber (TYPE_INT32) =\u003e 54\nnumber (TYPE_INT32) =\u003e 89\nnumber (TYPE_INT32) =\u003e 29\nnumber (TYPE_INT32) =\u003e\n{\n  \"average\": 48.833333333333336\n}\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e call FindMaximum\nnumber (TYPE_INT32) =\u003e 8\nnumber (TYPE_INT32) =\u003e {\n  \"maximum\": 8\n}\nnumber (TYPE_INT32) =\u003e 9\nnumber (TYPE_INT32) =\u003e {\n  \"maximum\": 9\n}\nnumber (TYPE_INT32) =\u003e 40\nnumber (TYPE_INT32) =\u003e {\n  \"maximum\": 40\n}\nnumber (TYPE_INT32) =\u003e 38\nnumber (TYPE_INT32) =\u003e 100\nnumber (TYPE_INT32) =\u003e {\n  \"maximum\": 100\n}\nnumber (TYPE_INT32) =\u003e 38\nnumber (TYPE_INT32) =\u003e 203\nnumber (TYPE_INT32) =\u003e {\n  \"maximum\": 203\n}\nnumber (TYPE_INT32) =\u003e\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e call SquareRoot\nnumber (TYPE_INT32) =\u003e 389\n{\n  \"numberRoot\": 19.72308292331602\n}\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e call SquareRoot\nnumber (TYPE_INT32) =\u003e -38\ncommand call: rpc error: code = InvalidArgument desc = Received a negative number: -38\n\ncalculator.CalculatorService@127.0.0.1:50051\u003e\n\n\n```\n\n## evans blog\n\n```shell\n[fahmad@ryzen blog]$ evans -p 50051 -r\n\n  ______\n |  ____|\n | |__    __   __   __ _   _ __    ___\n |  __|   \\ \\ / /  / _. | | '_ \\  / __|\n | |____   \\ V /  | (_| | | | | | \\__ \\\n |______|   \\_/    \\__,_| |_| |_| |___/\n\n more expressive universal gRPC client\n\n\nblog.BlogService@127.0.0.1:50051\u003e show package\n+-------------------------+\n|         PACKAGE         |\n+-------------------------+\n| blog                    |\n| grpc.reflection.v1alpha |\n+-------------------------+\n\nblog.BlogService@127.0.0.1:50051\u003e show service\n+-------------+------------+-------------------+--------------------+\n|   SERVICE   |    RPC     |   REQUEST TYPE    |   RESPONSE TYPE    |\n+-------------+------------+-------------------+--------------------+\n| BlogService | CreateBlog | CreateBlogRequest | CreateBlogResponse |\n| BlogService | ReadBlog   | ReadBlogRequest   | ReadBlogResponse   |\n| BlogService | UpdateBlog | UpdateBlogRequest | UpdateBlogResponse |\n| BlogService | DeleteBlog | DeleteBlogRequest | DeleteBlogResponse |\n| BlogService | ListBlog   | ListBlogRequest   | ListBlogResponse   |\n+-------------+------------+-------------------+--------------------+\n\nblog.BlogService@127.0.0.1:50051\u003e service BlogService\n\nblog.BlogService@127.0.0.1:50051\u003e show service\n+-------------+------------+-------------------+--------------------+\n|   SERVICE   |    RPC     |   REQUEST TYPE    |   RESPONSE TYPE    |\n+-------------+------------+-------------------+--------------------+\n| BlogService | CreateBlog | CreateBlogRequest | CreateBlogResponse |\n| BlogService | ReadBlog   | ReadBlogRequest   | ReadBlogResponse   |\n| BlogService | UpdateBlog | UpdateBlogRequest | UpdateBlogResponse |\n| BlogService | DeleteBlog | DeleteBlogRequest | DeleteBlogResponse |\n| BlogService | ListBlog   | ListBlogRequest   | ListBlogResponse   |\n+-------------+------------+-------------------+--------------------+\n\nblog.BlogService@127.0.0.1:50051\u003e call CreateBlog\nblog::id (TYPE_STRING) =\u003e\nblog::author_id (TYPE_STRING) =\u003e frog\nblog::title (TYPE_STRING) =\u003e blog about grpc\nblog::content (TYPE_STRING) =\u003e created using evans cli\n{\n  \"blog\": {\n    \"authorId\": \"frog\",\n    \"content\": \"created using evans cli\",\n    \"id\": \"6252c793667c98951aa08ca0\",\n    \"title\": \"blog about grpc\"\n  }\n}\n\nblog.BlogService@127.0.0.1:50051\u003e call ListBlog\n{\n  \"blog\": {\n    \"authorId\": \"Fahmi\",\n    \"content\": \"This the content\",\n    \"id\": \"6252acc6214746b1c240a684\",\n    \"title\": \"This the content\"\n  }\n}\n{\n  \"blog\": {\n    \"authorId\": \"Fahmi\",\n    \"content\": \"This the content\",\n    \"id\": \"6252b451bc97cc848e0d8b8c\",\n    \"title\": \"This the content\"\n  }\n}\n{\n  \"blog\": {\n    \"authorId\": \"Fahmi\",\n    \"content\": \"This the content\",\n    \"id\": \"6252b47ebc97cc848e0d8b8d\",\n    \"title\": \"This the content\"\n  }\n}\n{\n  \"blog\": {\n    \"authorId\": \"Changed author\",\n    \"content\": \"This the content, lksdflksoiwer lksjdflskdjf\",\n    \"id\": \"6252c078bedd458d36c81390\",\n    \"title\": \"My Second Blog\"\n  }\n}\n{\n  \"blog\": {\n    \"authorId\": \"frog\",\n    \"content\": \"created using evans cli\",\n    \"id\": \"6252c793667c98951aa08ca0\",\n    \"title\": \"created using evans cli\"\n  }\n}\n\nblog.BlogService@127.0.0.1:50051\u003e call DeleteBlog\nblog_id (TYPE_STRING) =\u003e 6252acc6214746b1c240a684\n{\n  \"blogId\": \"6252acc6214746b1c240a684\"\n}\n\nblog.BlogService@127.0.0.1:50051\u003e call DeleteBlog\nblog_id (TYPE_STRING) =\u003e 6252acc6214746b1c240a684\ncommand call: rpc error: code = NotFound desc = Cannot find blog in MongoDB: \u003cnil\u003e\n\nblog.BlogService@127.0.0.1:50051\u003e call ListBlog\n{\n  \"blog\": {\n    \"authorId\": \"Fahmi\",\n    \"content\": \"This the content\",\n    \"id\": \"6252b451bc97cc848e0d8b8c\",\n    \"title\": \"This the content\"\n  }\n}\n{\n  \"blog\": {\n    \"authorId\": \"Fahmi\",\n    \"content\": \"This the content\",\n    \"id\": \"6252b47ebc97cc848e0d8b8d\",\n    \"title\": \"This the content\"\n  }\n}\n{\n  \"blog\": {\n    \"authorId\": \"Changed author\",\n    \"content\": \"This the content, lksdflksoiwer lksjdflskdjf\",\n    \"id\": \"6252c078bedd458d36c81390\",\n    \"title\": \"My Second Blog\"\n  }\n}\n{\n  \"blog\": {\n    \"authorId\": \"frog\",\n    \"content\": \"created using evans cli\",\n    \"id\": \"6252c793667c98951aa08ca0\",\n    \"title\": \"created using evans cli\"\n  }\n}\n\nblog.BlogService@127.0.0.1:50051\u003e call ReadBlog\nblog_id (TYPE_STRING) =\u003e 6252c793667c98951aa08ca0\n{\n  \"blog\": {\n    \"authorId\": \"frog\",\n    \"content\": \"created using evans cli\",\n    \"id\": \"6252c793667c98951aa08ca0\",\n    \"title\": \"created using evans cli\"\n  }\n}\n\nblog.BlogService@127.0.0.1:50051\u003e call UpdateBlog\nblog::id (TYPE_STRING) =\u003e 6252c793667c98951aa08ca0\nblog::author_id (TYPE_STRING) =\u003e frog 2\nblog::title (TYPE_STRING) =\u003e\nblog::content (TYPE_STRING) =\u003e\n{\n  \"blog\": {\n    \"authorId\": \"frog 2\",\n    \"id\": \"6252c793667c98951aa08ca0\"\n  }\n}\n\nblog.BlogService@127.0.0.1:50051\u003e\n```\n\n## references\n\nhttps://kb.objectrocket.com/mongo-db/how-to-find-a-mongodb-document-by-its-bson-objectid-using-golang-452\n\nhttps://www.mongodb.com/languages/golang\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhofesh%2Fgrpc-in-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhofesh%2Fgrpc-in-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhofesh%2Fgrpc-in-golang/lists"}