article

package
v0.0.0-...-cfa74d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArticleDao = new(dao.ArticleDao)

Functions

This section is empty.

Types

type Article

type Article struct {
	ArticleService
}

type ArticleService

type ArticleService struct {
	// contains filtered or unexported fields
}

func (ArticleService) Article

func (a ArticleService) Article(articleId int) (*response.ArticleDetails, error)

Article @Date 2023-02-20 16:25:22 @Param articleId string @Return *article.Article @Return error @Description: 根据单个id查询文章内容

func (ArticleService) ArticleCommentList

func (a ArticleService) ArticleCommentList(pageInfo request.PageInfo, articleId int) ([]response.ArticleCommentInfo, error)

ArticleCommentList @Date 2023-02-25 15:57:03 @Param pageInfo request.PageInfo @Param articleId int @Return []response.ArticleCommentInfo @Return error @Description: 分页查询一个文章的所有信息列表

func (ArticleService) ArticlePage

func (a ArticleService) ArticlePage(pageInfo request.PageInfo) ([]response.HeadInfo, error)

ArticlePage @Date 2023-02-20 17:36:17 @Param pageInfo sysreq.PageInfo @Return []article.HeadInfo @Return error @Description: 分页查询文章信息列表

func (ArticleService) CreateArticle

func (a ArticleService) CreateArticle(newArticle *request.PostArticle, userId uint) error

CreateArticle @Date 2023-02-20 16:46:19 @Param article *article.Article @Return error @Description: 创建一篇新文章

func (ArticleService) DeleteArticle

func (a ArticleService) DeleteArticle(id int) error

DeleteArticle @Date 2023-02-20 16:51:16 @Param id string @Return error @Description: 删除文章

func (ArticleService) HasArticle

func (a ArticleService) HasArticle(id uint) bool

HasArticle @Date 2023-02-20 16:58:12 @Param id uint @Return bool @Description: 判断文章是否存在

func (ArticleService) UpdateArticle

func (a ArticleService) UpdateArticle(articleOld *model.Article) error

UpdateArticle @Date 2023-02-20 17:00:38 @Param articleOld *article.Article @Return error @Description: 更新文章

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL