gamelang.proto 814 B

123456789101112131415161718192021222324252627282930313233343536
  1. syntax = "proto3";
  2. package gamelang;
  3. option go_package = "/gamelang/gamelangpb";
  4. message User {
  5. uint32 id = 1;
  6. string name = 2;
  7. bytes password = 3;
  8. bool admin = 4;
  9. }
  10. service UserService {
  11. rpc CreateUser (User) returns (User);
  12. rpc DeleteUser (User) returns (User);
  13. rpc GetUser (User) returns (User);
  14. rpc ListUser (User) returns (stream User);
  15. rpc CheckUser (User) returns (User);
  16. }
  17. message World {
  18. uint32 id = 1;
  19. string name = 2;
  20. repeated User users = 3;
  21. repeated string games = 4;
  22. }
  23. service WorldService {
  24. rpc CreateWorld (World) returns (World);
  25. rpc DeleteWorld (World) returns (World);
  26. rpc GetWorld (World) returns (World);
  27. rpc ListWorld (World) returns (stream World);
  28. rpc JoinWorld (World) returns (World);
  29. rpc AddGameWorld (World) returns (World);
  30. }