Created
November 3, 2019 13:06
-
-
Save trongdth/339d65d9f8ce1015c619dce05c35b058 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
package protobuf; | |
import "base.proto"; | |
service UserSrv { | |
rpc CreateUser (UserReq) returns (UserRes) {} | |
rpc ReadUser (UserReq) returns (UserRes) {} | |
} | |
// UserReq represents an user query | |
message UserReq { | |
BaseReq req = 1; | |
UserInfo user = 2; | |
} | |
// UserInfo | |
message UserInfo { | |
uint32 id = 1; | |
string fullName = 2; | |
string email = 3; | |
string password = 4; | |
} | |
// UserRes : result + user info | |
message UserRes { | |
bool result = 1; | |
UserInfo user = 2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment