-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomment.proto
43 lines (37 loc) · 1.1 KB
/
comment.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 fyreplace.protos;
option csharp_namespace = "Fyreplace.Protos";
option java_generate_equals_and_hash = true;
option java_multiple_files = true;
option java_package = "app.fyreplace.protos";
option objc_class_prefix = "FP";
option swift_prefix = "FP";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "protos/id.proto";
import "protos/pagination.proto";
import "protos/user.proto";
message Comment {
bytes id = 1;
uint32 position = 2;
Profile author = 3;
google.protobuf.Timestamp date_created = 4;
bool is_deleted = 5;
string text = 6;
}
message Comments {
repeated Comment comments = 1;
uint32 count = 2;
}
message CommentCreation {
bytes post_id = 1;
string text = 2;
}
service CommentService {
rpc List (stream Page) returns (stream Comments);
rpc Create (CommentCreation) returns (Id);
rpc Delete (Id) returns (google.protobuf.Empty);
rpc Acknowledge(Id) returns (google.protobuf.Empty);
rpc Report (Id) returns (google.protobuf.Empty);
rpc Absolve (Id) returns (google.protobuf.Empty);
}