mirror of
https://github.com/MeiK2333/river.git
synced 2025-11-04 14:49:40 +08:00
63 lines
1.1 KiB
Protocol Buffer
63 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
package river;
|
|
|
|
service River {
|
|
rpc Judge(stream JudgeRequest) returns (stream JudgeResponse) {}
|
|
}
|
|
|
|
message JudgeRequest {
|
|
enum Language {
|
|
C = 0;
|
|
Cpp = 1;
|
|
Python = 2;
|
|
Rust = 3;
|
|
Node = 4;
|
|
TypeScript = 5;
|
|
Go = 6;
|
|
}
|
|
Language language = 1;
|
|
|
|
string code = 2;
|
|
|
|
enum JudgeType {
|
|
Standard = 0;
|
|
// Special = 1;
|
|
}
|
|
JudgeType judge_type = 3;
|
|
|
|
string in_data = 4;
|
|
string out_data = 5;
|
|
|
|
int32 time_limit = 6;
|
|
int32 memory_limit = 7;
|
|
}
|
|
|
|
message JudgeResponse {
|
|
int64 time_used = 1;
|
|
int64 memory_used = 2;
|
|
enum JudgeResult {
|
|
Accepted = 0;
|
|
WrongAnswer = 1;
|
|
TimeLimitExceeded = 2;
|
|
MemoryLimitExceeded = 3;
|
|
RuntimeError = 4;
|
|
OutputLimitExceeded = 5;
|
|
CompileError = 6;
|
|
PresentationError = 7;
|
|
SystemError = 8;
|
|
}
|
|
JudgeResult result = 3;
|
|
// int32 errno = 4;
|
|
// int32 exit_code = 5;
|
|
// string stdout = 6;
|
|
// string stderr = 7;
|
|
string errmsg = 8;
|
|
enum JudgeStatus {
|
|
Pending = 0;
|
|
Compiling = 1;
|
|
Running = 2;
|
|
Ended = 3;
|
|
}
|
|
JudgeStatus status = 9;
|
|
}
|