Skip to content

Instantly share code, notes, and snippets.

@asim
Created November 16, 2020 07:39
Show Gist options
  • Save asim/31628c6faf61b392b31bcefc79daa289 to your computer and use it in GitHub Desktop.
Save asim/31628c6faf61b392b31bcefc79daa289 to your computer and use it in GitHub Desktop.
syntax = "proto3";
package posts;
service Posts {
rpc Save(SaveRequest) returns (SaveResponse) {}
rpc Query(QueryRequest) returns (QueryResponse) {}
rpc Delete(DeleteRequest) returns (DeleteResponse) {}
}
message SaveRequest {
string id = 1;
string title = 2;
string slug = 3;
string content = 4;
int64 timestamp = 5;
repeated string tags = 6;
}
message SaveResponse {
string id = 1;
}
message Post {
string id = 1;
string title = 2;
string slug = 3;
string content = 4;
int64 created = 5;
int64 updated = 6;
string author = 7;
repeated string tags = 8;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment