user.proto 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. syntax = "proto3";
  2. package api.user;
  3. import "google/api/annotations.proto";
  4. //import "google/protobuf/struct.proto";
  5. import "google/protobuf/empty.proto";
  6. import "api/chat/chat.proto";
  7. option go_package = "git.ikuban.com/server/pw-protobuf/api/user;user";
  8. option java_multiple_files = true;
  9. option java_package = "api.user";
  10. service User {
  11. rpc DebugLogin (DebugLoginRequest) returns (TokenReply){
  12. option (google.api.http) = {
  13. post: "/api/user/login/debug",
  14. body:"*"
  15. };
  16. };
  17. rpc Authorization (AuthorizationRequest) returns (TokenReply){
  18. option (google.api.http) = {
  19. post: "/api/user/authorization",
  20. body:"*"
  21. };
  22. };
  23. rpc UpdateUserInformation (UpdateUserInformationRequest) returns (google.protobuf.Empty){
  24. option (google.api.http) = {
  25. post: "/api/user/update/information",
  26. body:"*"
  27. };
  28. };
  29. rpc GetUserInfo (google.protobuf.Empty) returns (UserInfo){
  30. option (google.api.http) = {
  31. post: "/api/user/info",
  32. body:"*"
  33. };
  34. };
  35. rpc SendPhoneCode (SendPhoneCodeRequest) returns (google.protobuf.Empty){
  36. option (google.api.http) = {
  37. post: "/api/user/code/send",
  38. body:"*"
  39. };
  40. };
  41. rpc CheckPhoneCode (CheckPhoneCodeRequest) returns (google.protobuf.Empty){
  42. option (google.api.http) = {
  43. post: "/api/user/code/check",
  44. body:"*"
  45. };
  46. };
  47. rpc CheckUserPartnerIsRelationship (CheckUserPartnerIsRelationshipRequest) returns (chat.CheckUserPartnerIsRelationshipReply){
  48. option (google.api.http) = {
  49. post: "/api/user/check/relationship",
  50. body:"*"
  51. };
  52. };
  53. }
  54. message CheckUserPartnerIsRelationshipRequest{
  55. string partnerID = 1;
  56. }
  57. message UserInfo{
  58. string id = 1; // id
  59. string nickname = 2;// 昵称
  60. string avatarUrl =3;// 头像链接
  61. string phone = 4;// 手机号
  62. int64 sex = 5;// 性别
  63. int64 credit = 6;// 积分
  64. }
  65. message UpdateUserInformationRequest {
  66. string Nickname = 1;
  67. string avatarUrl = 2;
  68. int64 sex = 3;
  69. }
  70. message SendPhoneCodeRequest {
  71. string phone = 1;
  72. }
  73. message CheckPhoneCodeRequest {
  74. string phone = 1;
  75. string code = 2;
  76. }
  77. message DebugLoginRequest {
  78. string userId = 1;
  79. string code = 2;
  80. }
  81. message AuthorizationRequest {
  82. string jsCode = 1;
  83. }
  84. message TokenReply {
  85. string token = 1;
  86. }