mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-24 00:15:29 +00:00
update blog/posts and go mod
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user