mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-16 21:14:36 +00:00
Add blog service & follow model changes in tags/posts (#22)
This commit is contained in:
30
blog/handler/blog.go
Normal file
30
blog/handler/blog.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
comments "github.com/micro/services/blog/comments/proto"
|
||||
posts "github.com/micro/services/blog/posts/proto"
|
||||
proto "github.com/micro/services/blog/proto"
|
||||
tags "github.com/micro/services/blog/tags/proto"
|
||||
)
|
||||
|
||||
type Blog struct {
|
||||
ps posts.PostsService
|
||||
cs comments.CommentsService
|
||||
ts tags.TagsService
|
||||
}
|
||||
|
||||
func NewBlog(ps posts.PostsService,
|
||||
cs comments.CommentsService,
|
||||
ts tags.TagsService) *Blog {
|
||||
return &Blog{
|
||||
ps: ps,
|
||||
cs: cs,
|
||||
ts: ts,
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Blog) Latest(ctx context.Context, req *proto.LatestRequest, rsp *proto.LatestResponse) error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user