user.proto 2.4 KB

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