Documentation ¶
Index ¶
- func DoCreateBlog(c blogpb.BlogServiceClient)
- func DoDeleteBlog(c blogpb.BlogServiceClient)
- func DoListBlog(c blogpb.BlogServiceClient)
- func DoReadBlog(c blogpb.BlogServiceClient)
- func DoUpdateBlog(c blogpb.BlogServiceClient)
- type Item
- type Server
- func (s *Server) CreateBlog(_ context.Context, req *blogpb.CreateBlogRequest) (*blogpb.CreateBlogResponse, error)
- func (s *Server) DeleteBlog(_ context.Context, req *blogpb.DeleteBlogRequest) (*blogpb.DeleteBlogResponse, error)
- func (s *Server) ListBlog(req *blogpb.ListBlogRequest, stream blogpb.BlogService_ListBlogServer) error
- func (s *Server) ReadBlog(_ context.Context, req *blogpb.ReadBlogRequest) (*blogpb.ReadBlogResponse, error)
- func (s *Server) UpdateBlog(_ context.Context, req *blogpb.UpdateBlogRequest) (*blogpb.UpdateBlogResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Item ¶
type Item struct { ID primitive.ObjectID `bson:"_id,omitempty"` AuthorID string `bson:"author_id"` Title string `bson:"title"` Content string `bson:"content"` }
Item -
type Server ¶
type Server struct {
Coll *mongo.Collection
}
Server defines the blog server
func (*Server) CreateBlog ¶
func (s *Server) CreateBlog(_ context.Context, req *blogpb.CreateBlogRequest) (*blogpb.CreateBlogResponse, error)
CreateBlog -
func (*Server) DeleteBlog ¶
func (s *Server) DeleteBlog(_ context.Context, req *blogpb.DeleteBlogRequest) (*blogpb.DeleteBlogResponse, error)
DeleteBlog -
func (*Server) ListBlog ¶
func (s *Server) ListBlog(req *blogpb.ListBlogRequest, stream blogpb.BlogService_ListBlogServer) error
ListBlog -
func (*Server) ReadBlog ¶
func (s *Server) ReadBlog(_ context.Context, req *blogpb.ReadBlogRequest) (*blogpb.ReadBlogResponse, error)
ReadBlog -
func (*Server) UpdateBlog ¶
func (s *Server) UpdateBlog(_ context.Context, req *blogpb.UpdateBlogRequest) (*blogpb.UpdateBlogResponse, error)
UpdateBlog -
Click to show internal directories.
Click to hide internal directories.