mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
28 lines
492 B
Protocol Buffer
28 lines
492 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package blog;
|
|
|
|
import "github.com/micro/services/posts/proto/posts.proto";
|
|
|
|
service Blog {
|
|
// Latest returns the latest blog post
|
|
rpc Latest(LatestRequest) returns (LatestResponse) {}
|
|
// Posts returns all the posts
|
|
rpc Posts(PostsRequest) returns (PostsResponse) {};
|
|
}
|
|
|
|
message LatestRequest {}
|
|
|
|
message LatestResponse{
|
|
posts.Post latest = 1;
|
|
}
|
|
|
|
message PostsRequest {
|
|
int64 limit = 1;
|
|
int64 offset = 2;
|
|
}
|
|
|
|
message PostsResponse {
|
|
repeated posts.Post posts = 1;
|
|
}
|