mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-10 08:29:58 +08:00
feat(goctl/rpc): support external proto imports with cross-package ty… (#5472)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
33
tools/goctl/rpc/example/05-multiple-services/multi.proto
Normal file
33
tools/goctl/rpc/example/05-multiple-services/multi.proto
Normal file
@@ -0,0 +1,33 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package multisvc;
|
||||
|
||||
option go_package = "example.com/demo/pb";
|
||||
|
||||
import "shared.proto";
|
||||
|
||||
message SearchReq {
|
||||
shared.Meta meta = 1;
|
||||
string keyword = 2;
|
||||
}
|
||||
|
||||
message SearchReply {
|
||||
repeated string items = 1;
|
||||
}
|
||||
|
||||
message NotifyReq {
|
||||
shared.Meta meta = 1;
|
||||
string message = 2;
|
||||
}
|
||||
|
||||
message NotifyReply {
|
||||
bool ok = 1;
|
||||
}
|
||||
|
||||
service SearchService {
|
||||
rpc Search(SearchReq) returns (SearchReply);
|
||||
}
|
||||
|
||||
service NotifyService {
|
||||
rpc Notify(NotifyReq) returns (NotifyReply);
|
||||
}
|
||||
Reference in New Issue
Block a user