ms-tester/proto/user/v1/user.proto

34 lines
630 B
Protocol Buffer
Raw Normal View History

2024-07-27 07:31:04 +00:00
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;
}