mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
36 lines
550 B
Protocol Buffer
36 lines
550 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package comments;
|
|
option go_package = "./proto;comments";
|
|
|
|
service Comments {
|
|
rpc New(NewRequest) returns (NewResponse) {}
|
|
rpc List(ListRequest) returns (ListResponse) {}
|
|
}
|
|
|
|
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 author = 2;
|
|
string message = 3;
|
|
}
|
|
|
|
message NewResponse {}
|
|
|
|
message ListRequest{
|
|
string post = 1;
|
|
}
|
|
|
|
message ListResponse{
|
|
repeated Comment comments = 1;
|
|
}
|