Documentation ¶
Index ¶
- func GetTestMongoClient() (*mongo.Client, error)
- func NewTestBlog() *api.Blog
- type Blog
- type BlogServer
- func (b *BlogServer) CreateBlog(ctx context.Context, request *api.CreateBlogRequest) (*api.CreateBlogResponse, error)
- func (b *BlogServer) DeleteBlog(ctx context.Context, request *api.DeleteBlogRequest) (*api.DeleteBlogResponse, error)
- func (b *BlogServer) ListBlogs(request *api.ListBlogRequest, server api.Blogger_ListBlogsServer) error
- func (b *BlogServer) ReadBlog(ctx context.Context, request *api.ReadBlogRequest) (*api.ReadBlogResponse, error)
- func (b *BlogServer) UpdateBlog(ctx context.Context, request *api.UpdateBlogRequest) (*api.UpdateBlogResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTestMongoClient ¶
func NewTestBlog ¶
Types ¶
type BlogServer ¶
type BlogServer struct { api.UnimplementedBloggerServer // contains filtered or unexported fields }
func CreateTestBlogServer ¶
func CreateTestBlogServer() (*BlogServer, func())
func NewBlogServer ¶
func NewBlogServer(c *mongo.Collection) *BlogServer
func (*BlogServer) CreateBlog ¶
func (b *BlogServer) CreateBlog(ctx context.Context, request *api.CreateBlogRequest) (*api.CreateBlogResponse, error)
func (*BlogServer) DeleteBlog ¶
func (b *BlogServer) DeleteBlog(ctx context.Context, request *api.DeleteBlogRequest) (*api.DeleteBlogResponse, error)
func (*BlogServer) ListBlogs ¶
func (b *BlogServer) ListBlogs(request *api.ListBlogRequest, server api.Blogger_ListBlogsServer) error
func (*BlogServer) ReadBlog ¶
func (b *BlogServer) ReadBlog(ctx context.Context, request *api.ReadBlogRequest) (*api.ReadBlogResponse, error)
func (*BlogServer) UpdateBlog ¶
func (b *BlogServer) UpdateBlog(ctx context.Context, request *api.UpdateBlogRequest) (*api.UpdateBlogResponse, error)
Click to show internal directories.
Click to hide internal directories.