auth.proto 596 B

12345678910111213141516171819202122232425262728293031323334353637
  1. syntax = "proto3";
  2. option go_package = "./pb";
  3. package pb;
  4. import "google/protobuf/struct.proto";
  5. message AuthReq{
  6. google.protobuf.Struct data = 1;
  7. }
  8. message PlayerAuthReq{
  9. string player_id = 1;
  10. string game_id = 2;
  11. }
  12. message CsAuthReq{
  13. string uname = 1;
  14. string password = 2;
  15. }
  16. message CheckAuthReq{
  17. string token = 1;
  18. }
  19. message AuthResp{
  20. int64 code = 1;
  21. string msg = 2;
  22. google.protobuf.Struct data = 3;
  23. }
  24. service Auth{
  25. rpc playerAuth (PlayerAuthReq) returns (AuthResp);
  26. rpc csAuth (CsAuthReq) returns (AuthResp);
  27. rpc checkAuth (CheckAuthReq) returns (AuthResp);
  28. }