Comments service (#21)

This commit is contained in:
Janos Dobronszki
2020-10-30 13:49:03 +01:00
committed by GitHub
parent ab521639d4
commit 3642f7279d
8 changed files with 316 additions and 85 deletions

View File

@@ -3,15 +3,32 @@ syntax = "proto3";
package comments;
service Comments {
rpc Save(Request) returns (Response) {}
rpc New(NewRequest) returns (NewResponse) {}
rpc List(ListRequest) returns (ListResponse) {}
}
message Request {
// post to comment on
string post_id = 1;
message Comment {
string id = 1;
string post = 2;
string author = 3;
string message = 4;
int64 created = 5;
}
message NewRequest {
// post id
string post = 1;
// message to leave
string message = 2;
string author = 2;
string message = 3;
}
message Response {}
message NewResponse {}
message ListRequest{
string post = 1;
}
message ListResponse{
repeated Comment comments = 1;
}