-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
syntax = "proto3"; | ||
package rpc.user; | ||
option go_package = "./src/rpc/user"; | ||
|
||
|
||
message UserRequest { | ||
int64 user_id = 1; // 用户id | ||
int64 actor_id = 2; // 发送请求的用户的id | ||
} | ||
|
||
message UserResponse { | ||
int32 status_code = 1; // 状态码,0-成功,其他值-失败 | ||
string status_msg = 2; // 返回状态描述 | ||
User user = 3; // 用户信息 | ||
} | ||
|
||
message UserExistRequest { | ||
int64 user_id = 1; // 用户id | ||
} | ||
|
||
message UserExistResponse { | ||
int32 status_code = 1; // 状态码,0-成功,其他值-失败 | ||
string status_msg = 2; // 返回状态描述 | ||
bool existed = 3; | ||
} | ||
|
||
message User { | ||
int64 id = 1; // 用户id | ||
string name = 2; // 用户名称 | ||
optional uint32 follow_count = 3; // 关注总数 | ||
optional uint32 follower_count = 4; // 粉丝总数 | ||
bool is_follow = 5; // true-已关注,false-未关注 | ||
optional string avatar = 6; //用户头像 | ||
optional string background_image = 7; //用户个人页顶部大图 | ||
optional string signature = 8; //个人简介 | ||
optional uint32 total_favorited = 9; //获赞数量 | ||
optional uint32 work_count = 10; //作品数量 | ||
optional uint32 favorite_count = 11; //点赞数量 | ||
} | ||
|
||
service UserService{ | ||
rpc GetUserInfo(UserRequest) returns(UserResponse); | ||
|
||
rpc GetUserExistInformation(UserExistRequest) returns(UserExistResponse); | ||
} |