-
Notifications
You must be signed in to change notification settings - Fork 0
/
participation.proto
45 lines (34 loc) · 1.01 KB
/
participation.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
syntax = "proto3";
import "commonQuiz.proto";
option java_multiple_files = true;
option java_package = "com.kotlang.quiz";
option java_outer_classname = "ParticipationInternal";
option go_package = "github.com/Kotlang/quizGo/generated";
package quiz;
service ContestParticipation {
rpc SubmitContest(SubmitContestRequest) returns (ContestParticipationDetail) {}
rpc getPlayedContests(PlayedContestsRequest) returns (PlayedContestsResponse) {}
rpc clearSubmissions(ClearSubmissionsRequest) returns (ClearSubmissionsStatus) {}
}
message QuestionResponse {
string questionId = 1;
string answer = 2;
}
message SubmitContestRequest {
string contestId = 1;
repeated QuestionResponse answers = 2;
}
message PlayedContestsRequest {
//optional
//default userId is self taken from jwt
string userId = 1;
}
message ClearSubmissionsRequest {
string contestId = 1;
}
message ClearSubmissionsStatus {
string status = 1;
}
message PlayedContestsResponse {
repeated ContestParticipationDetail playedContests = 1;
}