-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.proto
40 lines (32 loc) · 781 Bytes
/
user.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
syntax = "proto3";
package ap.user.v1;
option go_package = "github.com/jaime/go-user-api/pkg/proto;user_pb";
// compile options properly, do not remove
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.gogoproto_import) = false;
service UserService {
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
rpc GetUser(GetUserRequest) returns (GetUserResponse);
}
message User {
string id = 1;
string first_name = 2;
string last_name = 3;
string email = 4;
bool admin = 5;
}
message CreateUserRequest {
string first_name = 1;
string last_name = 2;
string email = 3;
bool admin = 4;
}
message CreateUserResponse {
User user = 1;
}
message GetUserRequest{
string id = 1;
}
message GetUserResponse{
User user = 1;
}