syntax = "proto3"; import "google/protobuf/any.proto"; package proto; enum Role { ROLE_UNDEFINED = 0; CLIENT = 1; SERVER = 2; } message Identity { Role role = 1; } message LoginRequest { string username = 1; string password = 2; } message LoginResponse { bool loggedIn = 1; string username = 2; string error = 3; } message GuessRequest { string guess = 1; } enum MatchType { MATCH_UNDEFINED = 0; NO_MATCH = 1; MATCH = 2; EXACT_MATCH = 3; } message GuessResponse { repeated MatchType Result = 1; } message NewWord { string lastWord = 1; } enum MessageType { UNDEFINED = 0; IDENTITY = 1; LOGIN_REQUEST = 2; LOGIN_RESPONSE = 3; GUESS_REQUEST = 4; GUESS_RESPONSE = 5; NEW_WORD = 6; } message Message { MessageType type = 1; google.protobuf.Any msg = 2; } message GameStateStore { repeated string guesses = 1; string word = 2; } message PlayerStore { string username = 1; string hashedPw = 2; GameStateStore state = 3; }