user.proto 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 (CheckUserPartnerIsRelationshipRequest) returns (chat.CheckUserPartnerIsRelationshipReply){
  50. option (google.api.http) = {
  51. post: "/api/user/check/relationship",
  52. body:"*"
  53. };
  54. };
  55. rpc GetPartnerCircleInfo (partner.GetPartnerCircleInfoReq) returns (partner.PartnerCircleInfo){
  56. option (google.api.http) = {
  57. post: "/api/partner/info/circle",
  58. body:"*"
  59. };
  60. };
  61. }
  62. message CheckUserPartnerIsRelationshipRequest{
  63. string partnerID = 1;
  64. }
  65. message UserInfo{
  66. string id = 1; // id
  67. string nickname = 2;// 昵称
  68. string avatarUrl =3;// 头像链接
  69. string phone = 4;// 手机号
  70. int64 sex = 5;// 性别
  71. int64 credit = 6;// 积分
  72. }
  73. message UpdateUserInformationRequest {
  74. string Nickname = 1;
  75. string avatarUrl = 2;
  76. int64 sex = 3;
  77. }
  78. message SendPhoneCodeRequest {
  79. string phone = 1;
  80. }
  81. message CheckPhoneCodeRequest {
  82. string phone = 1;
  83. string code = 2;
  84. }