feat:
This commit is contained in:
parent
33856fdad2
commit
e6de2af416
3 changed files with 75 additions and 40 deletions
|
@ -7,27 +7,13 @@ import "google/protobuf/timestamp.proto";
|
|||
import "google/protobuf/empty.proto";
|
||||
|
||||
service ProblemService {
|
||||
rpc CreateProblem (stream CreateProblemRequest) returns (CreateProblemResponse);
|
||||
rpc CreateProblem (CreateProblemRequest) returns (CreateProblemResponse);
|
||||
rpc ReadProblem (ReadProblemRequest) returns (ReadProblemResponse);
|
||||
// rpc UpdateProblem (UpdateProblemRequest) returns (google.protobuf.Empty);
|
||||
rpc DeleteProblem (DeleteProblemRequest) returns (google.protobuf.Empty);
|
||||
}
|
||||
|
||||
message CreateProblemRequest {
|
||||
message Problem {
|
||||
string name = 1;
|
||||
string description = 2;
|
||||
int32 time_limit = 3;
|
||||
int32 memory_limit = 4;
|
||||
}
|
||||
message Test {
|
||||
bytes chunk = 1;
|
||||
}
|
||||
|
||||
oneof msg {
|
||||
Problem problem = 1;
|
||||
Test test = 2;
|
||||
}
|
||||
string title = 1;
|
||||
}
|
||||
message CreateProblemResponse {
|
||||
int32 id = 1;
|
||||
|
@ -39,28 +25,18 @@ message ReadProblemRequest {
|
|||
message ReadProblemResponse {
|
||||
message Problem {
|
||||
int32 id = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
string title = 2;
|
||||
string content = 3;
|
||||
int32 time_limit = 4;
|
||||
int32 memory_limit = 5;
|
||||
google.protobuf.Timestamp created_at = 6;
|
||||
google.protobuf.Timestamp updated_at = 7;
|
||||
int32 testing_strategy = 6;
|
||||
string testing_order = 7;
|
||||
google.protobuf.Timestamp created_at = 8;
|
||||
google.protobuf.Timestamp updated_at = 9;
|
||||
}
|
||||
Problem problem = 1;
|
||||
}
|
||||
|
||||
//message UpdateProblemRequest {
|
||||
// message Problem {
|
||||
// int32 id = 1;
|
||||
// optional string name = 2;
|
||||
// optional string description = 3;
|
||||
// optional int32 time_limit = 4;
|
||||
// optional int32 memory_limit = 5;
|
||||
// }
|
||||
// string token = 1;
|
||||
// Problem problem = 2;
|
||||
//}
|
||||
|
||||
message DeleteProblemRequest {
|
||||
int32 id = 1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue