-
Notifications
You must be signed in to change notification settings - Fork 17
/
publish.proto
43 lines (35 loc) · 1.23 KB
/
publish.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
syntax = "proto3";
package douyin.publish;
option go_package = "douyin/publish";
import "feed.proto";
message CreateVideoRequest {
uint32 actor_id = 1; // 用户id
bytes data = 2; // 视频数据
string title = 3; // 视频标题
}
message CreateVideoResponse {
uint32 status_code = 1 [json_name = "status_code"]; // 状态码,0-成功,其他值-失败
string status_msg = 2 [json_name = "status_msg"]; // 返回状态描述
}
message ListVideoRequest{
uint32 user_id = 1; // 用户id
uint32 actor_id = 2; // 发送请求的用户的id
}
message ListVideoResponse{
uint32 status_code = 1; // 状态码,0-成功,其他值-失败
optional string status_msg = 2; // 返回状态描述
repeated feed.Video video_list = 3; // 视频列表
}
message CountVideoRequest{
uint32 user_id = 1; // 用户id
}
message CountVideoResponse{
uint32 status_code = 1; // 状态码,0-成功,其他值-失败
optional string status_msg = 2; // 返回状态描述
uint32 count = 3; // 视频数量
}
service PublishService {
rpc CreateVideo(CreateVideoRequest) returns (CreateVideoResponse) {}
rpc ListVideo(ListVideoRequest) returns (ListVideoResponse) {}
rpc CountVideo(CountVideoRequest) returns (CountVideoResponse) {}
}