-
Notifications
You must be signed in to change notification settings - Fork 44
/
rpc.proto
48 lines (39 loc) · 1.11 KB
/
rpc.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
44
45
46
47
48
syntax = "proto3";
package comment.pb;
import "google/api/annotations.proto";
import "modules/comment/pb/message.proto";
option go_package = "github.com/NTHU-LSALAB/NTHU-Distributed-System/modules/comment/pb";
service Comment {
rpc Healthz(HealthzRequest) returns (HealthzResponse) {
option (google.api.http) = {
get: "/"
};
}
rpc ListComment(ListCommentRequest) returns (ListCommentResponse) {
option (google.api.http) = {
get: "/v1/comments/{video_id}"
response_body: "*"
};
}
rpc CreateComment(CreateCommentRequest) returns (CreateCommentResponse) {
option (google.api.http) = {
post: "/v1/comments"
body: "*"
response_body: "*"
};
}
rpc UpdateComment(UpdateCommentRequest) returns (UpdateCommentResponse) {
option (google.api.http) = {
put: "/v1/comments/{id}"
body: "*"
response_body: "comment"
};
}
rpc DeleteComment(DeleteCommentRequest) returns (DeleteCommentResponse) {
option (google.api.http) = {
delete: "/v1/comments/{id}"
response_body: "*"
};
}
rpc DeleteCommentByVideoID(DeleteCommentByVideoIDRequest) returns (DeleteCommentByVideoIDResponse) {}
}