gamelang-bingo.proto 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. syntax = "proto3";
  2. package gamelang;
  3. option go_package = "/gamelang/bingopb";
  4. message Field {
  5. uint32 id = 1;
  6. string text = 2;
  7. bool checked = 3;
  8. repeated string checker = 4;
  9. }
  10. message FieldMatrix {
  11. message MatrixRow {
  12. repeated Field fields = 1;
  13. }
  14. repeated MatrixRow rows = 1;
  15. }
  16. message Option {
  17. string key = 1;
  18. string value = 2;
  19. enum TypeEnum {
  20. STRING = 0;
  21. BOOL = 1;
  22. INT = 2;
  23. }
  24. TypeEnum type = 3;
  25. bool bool = 4;
  26. uint32 int = 5;
  27. }
  28. message Event {
  29. string type = 1;
  30. string game = 2;
  31. string value = 3;
  32. string gamename = 4;
  33. string username = 5;
  34. repeated string neighborgames = 6;
  35. }
  36. service EventService {
  37. rpc Inform (Event) returns (Event);
  38. }
  39. message Bingo {
  40. uint32 id = 1;
  41. string name = 2;
  42. repeated string textlist = 3;
  43. repeated Option options = 4;
  44. FieldMatrix fields = 5;
  45. bool started = 6;
  46. bool finished = 7;
  47. string winner = 8;
  48. uint32 numrows = 9;
  49. uint32 numcols = 10;
  50. }
  51. service BingoService {
  52. rpc CreateBingo (Bingo) returns (Bingo);
  53. rpc DeleteBingo (Bingo) returns (Bingo);
  54. rpc GetBingo (Bingo) returns (Bingo);
  55. rpc ListBingo (Bingo) returns (stream Bingo);
  56. rpc ModifyBingo (Bingo) returns (Bingo);
  57. }