user/src/modules/users/adapters/primaries/user.proto

35 lines
573 B
Protocol Buffer

syntax = "proto3";
package user;
service UsersService {
rpc FindOneByUuid(UserByUuid) returns (User);
rpc FindAll(UserFilter) returns (Users);
rpc Create(User) returns (User);
rpc Update(User) returns (User);
rpc Delete(UserByUuid) returns (Empty);
}
message UserByUuid {
string uuid = 1;
}
message User {
string uuid = 1;
string firstName = 2;
string lastName = 3;
string email = 4;
}
message UserFilter {
optional int32 page = 1;
optional int32 perPage = 2;
}
message Users {
repeated User data = 1;
int32 total = 2;
}
message Empty {}