{"id":20037570,"url":"https://github.com/mrdulin/grpc-go-cnode","last_synced_at":"2026-05-17T18:02:07.904Z","repository":{"id":98461899,"uuid":"133920813","full_name":"mrdulin/grpc-go-cnode","owner":"mrdulin","description":"A Go gRPC server for CNode community.","archived":false,"fork":false,"pushed_at":"2023-10-26T02:16:50.000Z","size":1507,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-12T18:52:11.765Z","etag":null,"topics":["cnode","go","golang","grpc","grpc-go","grpc-server","protobuf","protocol-buffers"],"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/mrdulin.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,"governance":null}},"created_at":"2018-05-18T07:42:31.000Z","updated_at":"2023-07-06T02:08:05.000Z","dependencies_parsed_at":"2023-06-01T20:15:52.472Z","dependency_job_id":null,"html_url":"https://github.com/mrdulin/grpc-go-cnode","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/mrdulin%2Fgrpc-go-cnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdulin%2Fgrpc-go-cnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdulin%2Fgrpc-go-cnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrdulin%2Fgrpc-go-cnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrdulin","download_url":"https://codeload.github.com/mrdulin/grpc-go-cnode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241467642,"owners_count":19967700,"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":["cnode","go","golang","grpc","grpc-go","grpc-server","protobuf","protocol-buffers"],"created_at":"2024-11-13T10:20:07.754Z","updated_at":"2026-05-17T18:02:07.795Z","avatar_url":"https://github.com/mrdulin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grpc-go-cnode\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/mrdulin/grpc-go-cnode)](https://goreportcard.com/report/github.com/mrdulin/grpc-go-cnode)\n![GitHub](https://img.shields.io/github/license/mrdulin/grpc-go-cnode)\n\nA Go gRPC server for [CNode](https://cnodejs.org) community built on the top of [RESTful API](https://cnodejs.org/api).\n\n*This project is just for teaching, NOT production ready.*\n\nAfter modifying the `.proto` files, need to re-compile protocol buffers.\nIt will generate the service interfaces, models for the server side and service interfaces for client side.\nThen, you can implement the interfaces of the services.\n\nFeatures:\n\n* HTTPs server and gRPC server share same listening address and port\n* Print access logs in unary call interceptor\n* gRPC Health check for entire server based on [GRPC Health Checking Protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md)\n* Per RPC call authentication, check [auth.go](./internal/utils/auth/auth.go)\n* TLS connection with self-signed credentials\n* Support constraint rules and validators for Protocol buffer, check [here](./internal/protobufs/user/service.proto)\n* Server reflection, check [GRPC Server Reflection Protocol](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md)\n* Integration and unit testings\n* Distributed trace with z-pages and stackdriver exporter\n\nCompile protocol buffers:\n\n```bash\nmake compile-protobuf\n```\n\nDon't support read environment variables from OS. Only support read environment variables from `configs/config.yaml`:\n```yaml\nBASE_URL: https://cnodejs.org/api/v1\nPORT: 3000\nACCESS_TOKEN: \u003cYOUR_ACCESS_TOKEN\u003e\nGRPC_GO_LOG_SEVERITY_LEVEL: info\nGRPC_GO_LOG_VERBOSITY_LEVEL: 1\nGOOGLE_CLOUD_PROJECT: \u003cYOUR_GCP_PROJECT_ID\u003e\nTRACE_ADMIN_CREDENTIAL_FILE: \u003cYOUR_TRACE_SERVICE_ACCOUNT_JSON_FILE_PATH\u003e\n\n```\n\nStart the HTTPs server and gRPC server:\n```bash\nmake start\n```\n\nRun integration testings:\n\n1. Run `make start` to start the server\n2. Run `make test-integration`\n\nRun unit testings:\n\n```bash\nmake test-unit\n```\n\nList all gRPC services using [grpcurl](https://github.com/fullstorydev/grpcurl), using `-insecure` flag to skip server certificate and domain verification.\n\n```bash\n☁  grpc-go-cnode [master] grpcurl -insecure localhost:3000 list\ngrpc.health.v1.Health\ngrpc.reflection.v1alpha.ServerReflection\ntopic.TopicService\nuser.UserService\n```\n\nOr using `-cacert` flag to use a file containing trusted root certificates for verifying the server.\n\n```bash\n☁  grpc-go-cnode [master] grpcurl -cacert=./assets/server.crt localhost:3000 list\ngrpc.health.v1.Health\ngrpc.reflection.v1alpha.ServerReflection\ntopic.TopicService\nuser.UserService\n```\n\nYou will see traces and stats exported on the stdout. You can also see the z-pages provided from the server:\n\n- Traces: http://localhost:8081/debug/tracez\n- RPCs: http://localhost:8081/debug/rpcz\n\nE.g. Server side gRPC server traces from z-pages:\n\n![z-pages trace](./assets/z-pages-trace.png)\n\n\nServer side gPRC server trace from stackdriver trace:\n\n![stackdriver trace](./assets/stackdriver-trace.png)\n\nMore info, see [Makefile](./Makefile)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdulin%2Fgrpc-go-cnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrdulin%2Fgrpc-go-cnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrdulin%2Fgrpc-go-cnode/lists"}