Created
May 1, 2023 14:45
-
-
Save gorbak25/ccc23eb2245377f927c52f6cadff2a09 to your computer and use it in GitHub Desktop.
WWW19 Distributed Systems Workshops
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
package zad1; | |
enum MathOperation { | |
ADD = 0; | |
SUB = 1; | |
MUL = 2; | |
} | |
message AstBranch { | |
MathOperation op = 1; | |
Ast left = 2; | |
Ast right = 3; | |
} | |
message Ast { | |
oneof node { | |
int64 value = 1; | |
AstBranch branch = 2; | |
} | |
} | |
message Challenge { | |
uint64 timestamp = 1; | |
bytes signature = 2; | |
uint32 correct_answers = 3; | |
optional Ast chall = 4; | |
} | |
message ChallengeSolution { | |
int64 response = 1; | |
Challenge challenge = 2; | |
} | |
message GetChallengeRequest { | |
optional ChallengeSolution solution = 1; | |
} | |
message RegistrationRequest { | |
string name = 1; | |
string surname = 2; | |
Challenge challenge = 3; | |
} | |
message RegistrationResponse { | |
string result = 1; | |
} | |
service WWW19Registration { | |
rpc GetChallenge(GetChallengeRequest) returns (Challenge); | |
rpc RegisterForWorkshops(RegistrationRequest) returns (RegistrationResponse); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment