-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.proto
42 lines (33 loc) · 1004 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
41
42
syntax = "proto3";
option csharp_namespace = "GsServer.Protobufs";
import "gs_protobufs/protos/custom_types/void_value.proto";
import "google/protobuf/wrappers.proto";
package protos.user;
service UserService {
rpc GetPaginatedAsync(GetPaginatedUsersRequest) returns (GetPaginatedUsersResponse);
rpc GetByIdAsync(GetUserByIdRequest) returns (GetUserByIdResponse);
rpc PutAsync(UpdateUserRequest) returns (custom_types.void.VoidValue);
rpc DeleteAsync(DeleteUserRequest) returns (custom_types.void.VoidValue);
}
message GetPaginatedUsersRequest {
google.protobuf.StringValue cursor = 1;
}
message GetPaginatedUsersResponse {
repeated GetUserByIdResponse users = 1;
google.protobuf.StringValue next_cursor = 2;
}
message GetUserByIdRequest {
string user_id = 1;
}
message GetUserByIdResponse {
string user_id = 1;
string email = 2;
string role = 3;
}
message UpdateUserRequest {
string user_id = 1;
string email = 2;
}
message DeleteUserRequest {
string user_id = 1;
}