package blog import ( "context" "gitlab.com/go-course-project/go17/vblog/utils" ) type Service interface { // 创建博客 CreateBlog(context.Context, *CreateBlogRequest) (*Blog, error) // 博客列表查询 QueryBlog(context.Context, *QueryBlogRequest) (*BlogSet, error) // 博客详情查询 DescribeBlog() // 博客编辑 UpdateBlog() // 发布 PublishBlog() // 删除 DeleteBlog() } type QueryBlogRequest struct { // 分页参数 utils.PageRequest // 文章标题模糊匹配, Golang Keywords string `json:"keywords"` // 状态过滤参数, 作者:nil, 访客: STAGE_PUBLISHED Stage *STAGE `json:"stage"` // 查询某个用户具体的文章: 给作者用的 Username string `json:"username"` // 分类 Category string `json:"category"` // 查询Tag相关的文章 Tags map[string]string `json:"tag"` }