account.proto 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. syntax = "proto3";
  2. package api.account;
  3. import "google/api/annotations.proto";
  4. import "api/base/base.proto";
  5. //import "google/protobuf/struct.proto";
  6. //import "google/protobuf/empty.proto";
  7. option go_package = "git.ikuban.com/server/pw-protobuf/api/account;account";
  8. option java_multiple_files = true;
  9. option java_package = "api.account";
  10. service Account {
  11. rpc DebugLogin (DebugLoginRequest) returns (TokenReply){
  12. option (google.api.http) = {
  13. post: "/api/login/debug",
  14. body:"*"
  15. };
  16. };
  17. rpc Authorization (AuthorizationRequest) returns (TokenReply){
  18. option (google.api.http) = {
  19. post: "/api/authorization",
  20. body:"*"
  21. };
  22. };
  23. rpc GetUserInfoDB (base.UserIDParam) returns (UserInfoDB);
  24. rpc GetPartnerInfoDB (base.PartnerIDParam) returns (PartnerInfoDB);
  25. }
  26. message UserInfoDB{
  27. string id = 1; // id
  28. string nickname = 2;// 昵称
  29. string avatarUrl =3;// 头像链接
  30. string phone = 4;// 手机号
  31. int64 sex = 5;// 性别
  32. int64 credit = 6;// 积分
  33. }
  34. message PartnerInfoDB{
  35. string id = 1; // id
  36. string nickname = 2;// 昵称
  37. string avatarUrl =3;// 头像链接
  38. string phone = 4;// 手机号
  39. int64 sex = 5;// 性别
  40. int64 credit = 6;// 积分
  41. }
  42. message AuthorizationRequest {
  43. string jsCode = 1;
  44. string appId = 2;
  45. string type = 3;
  46. }
  47. message TokenReply {
  48. string token = 1;
  49. }
  50. message DebugLoginRequest {
  51. int64 id = 1;
  52. string code = 2;
  53. }
  54. message LoginToken {
  55. string pid = 1;
  56. string type = 2;
  57. }