2022-12-13 17:00:07 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package user;
|
|
|
|
|
|
|
|
service UsersService {
|
|
|
|
rpc FindOneByUuid(UserByUuid) returns (User);
|
|
|
|
rpc FindAll(UserFilter) returns (Users);
|
2022-12-14 10:37:13 +00:00
|
|
|
rpc Create(User) returns (User);
|
|
|
|
rpc Update(User) returns (User);
|
2022-12-14 11:49:43 +00:00
|
|
|
rpc Delete(UserByUuid) returns (Empty);
|
2022-12-13 17:00:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message UserByUuid {
|
|
|
|
string uuid = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message User {
|
|
|
|
string uuid = 1;
|
|
|
|
string firstName = 2;
|
|
|
|
string lastName = 3;
|
|
|
|
string email = 4;
|
2022-12-21 15:15:57 +00:00
|
|
|
string phone = 5;
|
2022-12-13 17:00:07 +00:00
|
|
|
}
|
|
|
|
|
2022-12-14 14:08:01 +00:00
|
|
|
message UserFilter {
|
|
|
|
optional int32 page = 1;
|
|
|
|
optional int32 perPage = 2;
|
|
|
|
}
|
2022-12-13 17:00:07 +00:00
|
|
|
|
|
|
|
message Users {
|
2022-12-14 14:08:01 +00:00
|
|
|
repeated User data = 1;
|
|
|
|
int32 total = 2;
|
2022-12-13 17:00:07 +00:00
|
|
|
}
|
2022-12-14 11:49:43 +00:00
|
|
|
|
|
|
|
message Empty {}
|