{"id":24269974,"url":"https://github.com/blaxberry333/venomous_app_protobuf","last_synced_at":"2025-03-05T05:18:11.705Z","repository":{"id":272106393,"uuid":"785011569","full_name":"BlaxBerry333/venomous_app_protobuf","owner":"BlaxBerry333","description":"Developing...","archived":false,"fork":false,"pushed_at":"2025-02-04T12:45:31.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T13:37:42.670Z","etag":null,"topics":["protocol-buffer"],"latest_commit_sha":null,"homepage":"","language":"Protocol Buffer","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/BlaxBerry333.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":"2024-04-11T02:23:21.000Z","updated_at":"2025-02-04T12:45:34.000Z","dependencies_parsed_at":"2025-01-12T07:22:00.101Z","dependency_job_id":"1d1c355f-c2a4-476b-a5c6-281fcf3d80ba","html_url":"https://github.com/BlaxBerry333/venomous_app_protobuf","commit_stats":null,"previous_names":["blaxberry333/venomous_app_protobuf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlaxBerry333%2Fvenomous_app_protobuf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlaxBerry333%2Fvenomous_app_protobuf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlaxBerry333%2Fvenomous_app_protobuf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlaxBerry333%2Fvenomous_app_protobuf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlaxBerry333","download_url":"https://codeload.github.com/BlaxBerry333/venomous_app_protobuf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241967328,"owners_count":20050357,"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":["protocol-buffer"],"created_at":"2025-01-15T15:33:22.481Z","updated_at":"2025-03-05T05:18:11.693Z","avatar_url":"https://github.com/BlaxBerry333.png","language":"Protocol Buffer","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Venomous Apps' Protocol Buffers \u0026 Code Generator\n\n|          | Main Skills                                                                                                                                                                                                                                                                                                                   |          Topic          | Supported Languages |\n| :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------: | :-----------------: |\n| Protobuf | \u003cimg src=\"https://github.com/BlaxBerry333/programming-notes/blob/main/docs/public/static/skill-icons/web-backend--protobuf.png?raw=true\" style=\"width:48px;\" /\u003e \u003cimg src=\"https://github.com/BlaxBerry333/programming-notes/blob/main/docs/public/static/skill-icons/dev-tools--makefile.png?raw=true\" style=\"width:48px;\" /\u003e | Type Code Serialization | Golang、TypeScript  |\n\n## 🚀 Local Setup\n\n\u003cdetails\u003e\n    \u003csummary\u003e\n       0. setup environments\n    \u003c/summary\u003e\n\n- Goalng\n- Python\n- Node.js\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\n        1. install protobuf for using \u003ccode\u003eprotoc\u003c/code\u003e command\n    \u003c/summary\u003e\n\n```shell\n# 1. install protobuf compiler\nbrew install protobuf\n\n# 2. check version\nprotoc --version\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\n        2. install pkg \u003ccode\u003eprotoc-gen-go\u003c/code\u003e for generating Golang code, then add to \u003ccode\u003e$PATH\u003c/code\u003e \n    \u003c/summary\u003e\n\n```shell\n# 1. install pkg\ngo install google.golang.org/protobuf/cmd/protoc-gen-go@latest\n\n# 2. add path\nexport PATH=\"$PATH:$(go env GOPATH)/bin\" \u003e\u003e ~/.zshrc\nsource ~/.zshrc\n\n# 3. check pkg's position \u0026 version\nwhich protoc-gen-go\nprotoc-gen-go --version\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\n        3. install pkg \u003ccode\u003ets-proto\u003c/code\u003e for generating Typescript code\n    \u003c/summary\u003e\n\n```shell\n% npm install ts-proto\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\n        4. install all pkgs  \n    \u003c/summary\u003e\n\n```shell\n% npm install\n```\n\n\u003c/details\u003e\n\n## 🛠 Commands\n\n```shell\n% make gen-all      # generate all\n% make gen-go       # only generate Golang code\n% make gen-ts       # only generate Typescript code\n% make gen-py       # only generate Python code\n```\n\n## 🤔 How to use\n\n### TypeScript\n\n\u003cdetails\u003e\n    \u003csummary\u003e\n        1. install pkg inside project\n    \u003c/summary\u003e\n\n```shell\ncd \u003cproject\u003e\n\nyarn add git+https://github.com/BlaxBerry333/venomous_app_protobuf.git\nyarn add -D google-protobuf @types/google-protobuf\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\n        2. import type then use\n    \u003c/summary\u003e\n\n```tsx\nimport type { MessageNode, HTMLNode } from \"venomous_app_protobuf/ts/workflow\";\nimport type { ChatBotData } from \"venomous_app_protobuf/ts/chat\";\nimport type { NoteData } from \"venomous_app_protobuf/ts/notes\";\n```\n\n\u003c/details\u003e\n\n### Golang\n\n\u003cdetails\u003e\n    \u003csummary\u003e\n       1. get pkg\n    \u003c/summary\u003e\n\n```shell\ncd \u003cproject\u003e\n\ngo get github.com/BlaxBerry333/venomous_app_protobuf/go/scenario@main\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\n       2. import pkg then use\n    \u003c/summary\u003e\n\n```go\nimport (\n    \"fmt\"\n\n    workflow \"github.com/BlaxBerry333/venomous_app_protobuf/go/workflow\"\n)\n\nvar MockMessageNode = \u0026workflow.MessageNode{\n\tId:    11,\n\tTitle: \"xxx\",\n\tText:  \"yyy\",\n}\n\nvar MockHTMLNode = \u0026workflow.HTMLNode{\n\tId:    22,\n\tTitle: \"xxx\",\n\tText:  \"yyy\",\n}\n\nfunc main() {\n    fmt.Println(MockMessageNode.Id)\n    fmt.Println(MockMessageNode.Title)\n    fmt.Println(MockMessageNode.Text)\n}\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaxberry333%2Fvenomous_app_protobuf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblaxberry333%2Fvenomous_app_protobuf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaxberry333%2Fvenomous_app_protobuf/lists"}