mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-15 04:24:44 +00:00
add Posts.Index
This commit is contained in:
@@ -3,6 +3,8 @@ syntax = "proto3";
|
||||
package posts;
|
||||
|
||||
service Posts {
|
||||
// Index returns the posts index without content
|
||||
rpc Index(IndexRequest) returns (IndexResponse) {}
|
||||
// Query currently only supports read by slug or timestamp, no listing.
|
||||
rpc Query(QueryRequest) returns (QueryResponse) {}
|
||||
rpc Save(SaveRequest) returns (SaveResponse) {}
|
||||
@@ -22,6 +24,15 @@ message Post {
|
||||
string image = 19;
|
||||
}
|
||||
|
||||
message IndexRequest {
|
||||
int64 limit = 1;
|
||||
int64 offset = 2;
|
||||
}
|
||||
|
||||
message IndexResponse {
|
||||
repeated Post posts = 1;
|
||||
}
|
||||
|
||||
// Query posts. Acts as a listing when no id or slug provided.
|
||||
// Gets a single post by id or slug if any of them provided.
|
||||
message QueryRequest {
|
||||
|
||||
Reference in New Issue
Block a user