contracts/problem/v1/problem.proto

45 lines
1 KiB
Protocol Buffer
Raw Normal View History

2024-08-16 11:22:41 +00:00
syntax = "proto3";
2024-08-18 06:56:39 +00:00
package problem.v1;
option go_package = "/problem/v1;problemv1";
2024-08-16 11:22:41 +00:00
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
2024-08-18 06:56:39 +00:00
service ProblemService {
2024-10-13 14:03:03 +00:00
rpc CreateProblem (CreateProblemRequest) returns (CreateProblemResponse);
2024-08-16 11:22:41 +00:00
rpc ReadProblem (ReadProblemRequest) returns (ReadProblemResponse);
rpc DeleteProblem (DeleteProblemRequest) returns (google.protobuf.Empty);
}
message CreateProblemRequest {
2024-10-13 14:03:03 +00:00
string title = 1;
2024-08-16 11:22:41 +00:00
}
message CreateProblemResponse {
int32 id = 1;
}
message ReadProblemRequest {
2024-08-20 11:34:43 +00:00
int32 id = 1;
2024-08-16 11:22:41 +00:00
}
message ReadProblemResponse {
message Problem {
int32 id = 1;
2024-10-13 14:03:03 +00:00
string title = 2;
2024-10-16 19:33:09 +00:00
string legend = 3;
string input_format = 4;
string output_format = 5;
string notes = 6;
string tutorial = 7;
string latex_summary = 8;
int32 time_limit = 9;
int32 memory_limit = 10;
google.protobuf.Timestamp created_at = 11;
google.protobuf.Timestamp updated_at = 12;
2024-08-16 11:22:41 +00:00
}
2024-08-20 11:34:43 +00:00
Problem problem = 1;
2024-08-16 11:22:41 +00:00
}
message DeleteProblemRequest {
2024-08-20 11:34:43 +00:00
int32 id = 1;
2024-08-16 11:22:41 +00:00
}