contracts/problem/v1/problem.proto
Vyacheslav1557 e6de2af416 feat:
2024-10-13 19:03:03 +05:00

42 lines
968 B
Protocol Buffer

syntax = "proto3";
package problem.v1;
option go_package = "/problem/v1;problemv1";
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
service ProblemService {
rpc CreateProblem (CreateProblemRequest) returns (CreateProblemResponse);
rpc ReadProblem (ReadProblemRequest) returns (ReadProblemResponse);
rpc DeleteProblem (DeleteProblemRequest) returns (google.protobuf.Empty);
}
message CreateProblemRequest {
string title = 1;
}
message CreateProblemResponse {
int32 id = 1;
}
message ReadProblemRequest {
int32 id = 1;
}
message ReadProblemResponse {
message Problem {
int32 id = 1;
string title = 2;
string content = 3;
int32 time_limit = 4;
int32 memory_limit = 5;
int32 testing_strategy = 6;
string testing_order = 7;
google.protobuf.Timestamp created_at = 8;
google.protobuf.Timestamp updated_at = 9;
}
Problem problem = 1;
}
message DeleteProblemRequest {
int32 id = 1;
}