Comments (3)
go-zero 目前应该是不支持你想要的效果。目前我推荐的方式是这样的。比如一个 user.proto, 一个 role.proto 文件。可以使用多个 goctl 命令进行生成,但是会产生一些多余的 etc 配置文件,多余的 main 文件等。在 shell 脚本中进行删除,并在注册 grpc 服务的地方手动注册进去进行了。如果觉得麻烦,可以考虑 Jzero。一个对 go-zero 的封装,可以一键创建项目,一键生成代码。支持多 proto 分组等特性。项目地址:https://github.com/jaronnie/jzero
from go-zero.
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
go-zero currently probably does not support the effect you want. The way I currently recommend is this. For example, a user.proto, a role.proto file. Multiple goctl commands can be used for generation, but some redundant etc configuration files, redundant main files, etc. will be generated. Delete it in the shell script and manually register it where the grpc service is registered. If you find it troublesome, you can consider Jzero. A package of go-zero that can create projects and generate code with one click. Supports features such as multi-proto grouping. Project address: https://github.com/jaronnie/jzero
from go-zero.
The message of rpc service must be defined in the same proto file as the service. Importing from outside is not supported. Please refer to the documentation https://go-zero.dev/docs/tutorials/cli/rpc#goctl-rpc-protoc
from go-zero.
Related Issues (20)
- The tokenlimit with redis may work incorrectly due to network latency HOT 4
- gateway how to config cors function
- grpc error management like kratos error generator HOT 3
- Add a flag to whether to generate pb file HOT 1
- API Import generate questions HOT 6
- Need a customized.tpl file which includes all the template Execute variables. HOT 1
- I want to print log to file. But I already want to see it in console. HOT 6
- Any plan to support rocketmq? HOT 2
- Use gateway server.AddRoute(), The limit(MaxConns) of this route does not take effect HOT 3
- how to exec my own middleware before build-in jwt? HOT 1
- How to make gracefulStop waiting? HOT 8
- 'circuit breaker is open','last resolver error: produced zero addresses' HOT 3
- Suggest to add option to disable parameter validation HOT 1
- I've got a problem when I call httpx.Parse() HOT 7
- How to set the part of request params nil ? HOT 1
- Error: sh: goctl-swagger: command not found HOT 1
- How to report trace data to the Monitor of jaeger?
- bug on sql concatenation HOT 2
- Is it possible to support interface in goctl? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-zero.