mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-13 01:40:00 +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:
29
tools/goctl/rpc/example/02-import-sibling/user.proto
Normal file
29
tools/goctl/rpc/example/02-import-sibling/user.proto
Normal file
@@ -0,0 +1,29 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package usersvc;
|
||||
|
||||
option go_package = "example.com/demo/pb";
|
||||
|
||||
import "types.proto";
|
||||
|
||||
message GetUserReq {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetUserReply {
|
||||
types.User user = 1;
|
||||
}
|
||||
|
||||
message CreateUserReq {
|
||||
string name = 1;
|
||||
int32 age = 2;
|
||||
}
|
||||
|
||||
message CreateUserReply {
|
||||
types.User user = 1;
|
||||
}
|
||||
|
||||
service UserService {
|
||||
rpc GetUser(GetUserReq) returns (GetUserReply);
|
||||
rpc CreateUser(CreateUserReq) returns (CreateUserReply);
|
||||
}
|
||||
Reference in New Issue
Block a user