account.proto 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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/login/authorization",
  20. body:"*"
  21. };
  22. };
  23. rpc GetIdentityByOpenID (OpenIDRequest) returns (IdentityInfo);
  24. }
  25. message OpenIDRequest{
  26. string openId = 1;
  27. }
  28. message IdentityInfo{
  29. string id = 1;
  30. string type = 2;
  31. }
  32. message UserInfoDB{
  33. string id = 1; // id
  34. string nickname = 2;// 昵称
  35. string avatarUrl =3;// 头像链接
  36. string phone = 4;// 手机号
  37. int64 sex = 5;// 性别
  38. int64 credit = 6;// 积分
  39. }
  40. message PartnerInfoDB{
  41. string id = 1; // id
  42. string nickname = 2;// 昵称
  43. string avatarUrl =3;// 头像链接
  44. string phone = 4;// 手机号
  45. int64 sex = 5;// 性别
  46. int64 credit = 6;// 积分
  47. }
  48. message AuthorizationRequest {
  49. string jsCode = 1;
  50. string appId = 2;
  51. string type = 3;
  52. }
  53. message TokenReply {
  54. string token = 1;
  55. }
  56. message DebugLoginRequest {
  57. int64 id = 1;
  58. string code = 2;
  59. }
  60. message LoginToken {
  61. string pid = 1;
  62. string type = 2;
  63. }