account.proto 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. // 通过openID和appID查询
  24. rpc GetIdentityByOpenIDAndAppID (OpenIDAndAppIDRequest) returns (IdentityInfo);
  25. // 通过原公众号openID和appID查询
  26. rpc GetIdentityByFromOpenIDAndAppID (OpenIDAndAppIDRequest) returns (IdentityInfo);
  27. }
  28. message OpenIDAndAppIDRequest{
  29. string openId = 1;
  30. string appId = 2;
  31. }
  32. message IdentityInfo{
  33. string id = 1;
  34. string type = 2;
  35. }
  36. message UserInfoDB{
  37. string id = 1; // id
  38. string nickname = 2;// 昵称
  39. string avatarUrl =3;// 头像链接
  40. string phone = 4;// 手机号
  41. int64 sex = 5;// 性别
  42. int64 credit = 6;// 积分
  43. }
  44. message PartnerInfoDB{
  45. string id = 1; // id
  46. string nickname = 2;// 昵称
  47. string avatarUrl =3;// 头像链接
  48. string phone = 4;// 手机号
  49. int64 sex = 5;// 性别
  50. int64 credit = 6;// 积分
  51. }
  52. message AuthorizationRequest {
  53. string jsCode = 1;
  54. string appId = 2;
  55. string type = 3;
  56. string fromOpenId = 4;
  57. }
  58. message TokenReply {
  59. string token = 1;
  60. }
  61. message DebugLoginRequest {
  62. int64 id = 1;
  63. string code = 2;
  64. }
  65. message LoginToken {
  66. string pid = 1;
  67. string type = 2;
  68. }