update blog/posts and go mod

This commit is contained in:
Asim Aslam
2021-01-27 14:47:22 +00:00
parent fc7c6e0870
commit 87348d1908
8 changed files with 545 additions and 742 deletions

View File

@@ -1,16 +1,27 @@
syntax = "proto3";
package blog;
option go_package = "proto;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;
}