{"id":20766164,"url":"https://github.com/navono/proto-compile-example","last_synced_at":"2026-05-25T06:04:59.212Z","repository":{"id":41789432,"uuid":"189184091","full_name":"navono/proto-compile-example","owner":"navono","description":"Compile proto file with batch, shell or Docker","archived":false,"fork":false,"pushed_at":"2022-12-03T13:28:08.000Z","size":443,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T18:47:45.161Z","etag":null,"topics":["docker","protobuf","protobuf3"],"latest_commit_sha":null,"homepage":"","language":"Starlark","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/navono.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}},"created_at":"2019-05-29T08:32:34.000Z","updated_at":"2021-01-22T09:36:36.000Z","dependencies_parsed_at":"2023-01-23T05:01:22.466Z","dependency_job_id":null,"html_url":"https://github.com/navono/proto-compile-example","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/navono/proto-compile-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navono%2Fproto-compile-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navono%2Fproto-compile-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navono%2Fproto-compile-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navono%2Fproto-compile-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/navono","download_url":"https://codeload.github.com/navono/proto-compile-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navono%2Fproto-compile-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33462501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T02:24:28.008Z","status":"ssl_error","status_checked_at":"2026-05-25T02:23:23.339Z","response_time":57,"last_error":"SSL_read: 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":["docker","protobuf","protobuf3"],"created_at":"2024-11-17T11:21:43.783Z","updated_at":"2026-05-25T06:04:59.195Z","avatar_url":"https://github.com/navono.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# proto_compile_example\n\n`proto` 文件编译示例。\n\n## Prerequisite\n\n### 本地主机编译\n\n- Install `Golang`\n- Install `Nodejs` and `Yarn`\n- Install `bazel` (可选)\n- Download `protoc` from [Github](https://github.com/protocolbuffers/protobuf/releases)\n- Install plugins\n  \u003e go get -u -v github.com/ckaznocha/protoc-gen-lint\n  \u003e\n  \u003e go get -d -u github.com/golang/protobuf/protoc-gen-go\n  \u003e\n  \u003e go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway\n  \u003e\n  \u003e go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger\n  \u003e\n  \u003e yarn\n\n### Docker 编译\n\n安装 `Docker`，同时连接网络。运行：\n\u003e ./dockerBuild.cmd\n\n## 文件布局\n\n使用 `API` 的工程默认为 `Go` 工程，同时使用 `Go Module` 进行模块管理。因此此处 `API` 的根目录应该与 `Go` 工程的模块名相同，否则会导致在 `Go` 工程在编译时，无法正确加载 `API` 相关的模块。例如：\n\u003e `are` 项目的接口统一放置在此目录下的一个名为 `are` 的目录的 `api` 文件夹内。`proto` 文件编译后，`Go` 的导入也就是这样：\n\u003e\u003e import (\n\tv1alpha \"are/api/core/v1alpha\"\n)\n\u003e\n\u003e 因此要将在 `generated` 下的 `are\\api` 整个文件夹拷贝到模块名为 `are` 的工程中。\n\u003e\n\n\n## build\n\u003e ./build.sh\n\n## note\n\n注意，`googleapis` 的 `proto` 文件和 `Go` 相应的在 `@go_googleapis` 包下面。由 `@io_bazel_rules_go` 的 `go_rules_dependencies` 进行注册。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavono%2Fproto-compile-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavono%2Fproto-compile-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavono%2Fproto-compile-example/lists"}