Initial commit
This commit is contained in:
commit
2fa110e760
28 changed files with 2346 additions and 0 deletions
33
proto/user/v1/user.proto
Normal file
33
proto/user/v1/user.proto
Normal file
|
@ -0,0 +1,33 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package proto.user.v1;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
service UserService {
|
||||
rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
|
||||
}
|
||||
|
||||
enum Role {
|
||||
ROLE_SPECTATOR_UNSPECIFIED = 0;
|
||||
ROLE_PARTICIPANT = 1;
|
||||
ROLE_MODERATOR = 2;
|
||||
ROLE_ADMIN = 3;
|
||||
}
|
||||
|
||||
message CreateUserRequest {
|
||||
message User {
|
||||
string username = 1;
|
||||
string password = 2;
|
||||
optional string email = 3;
|
||||
optional google.protobuf.Timestamp expires_at = 4;
|
||||
optional Role role = 5;
|
||||
}
|
||||
|
||||
string token = 1;
|
||||
User user = 2;
|
||||
}
|
||||
message CreateUserResponse {
|
||||
int32 id = 1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue