Documentation ¶
Index ¶
- type Article
- type ArticleListRequest
- type ArticleRequest
- type AuthRequest
- type CountTagRequest
- type CreateArticleRequest
- type CreateTagRequest
- type DeleteArticleRequest
- type DeleteTagRequest
- type FileInfo
- type Service
- func (svc *Service) CheckAuth(param *AuthRequest) error
- func (svc *Service) CountTag(param *CountTagRequest) (int, error)
- func (svc *Service) CreateArticle(param *CreateArticleRequest) error
- func (svc *Service) CreateTag(param *CreateTagRequest) error
- func (svc *Service) DeleteArticle(param *DeleteArticleRequest) error
- func (svc *Service) DeleteTag(param *DeleteTagRequest) error
- func (svc *Service) GetArticle(param *ArticleRequest) (*Article, error)
- func (svc *Service) GetArticleList(param *ArticleListRequest, pager *app.Pager) ([]*Article, int, error)
- func (svc *Service) GetTagList(param *TagListRequest, pager *app.Pager) ([]*model.Tag, error)
- func (svc *Service) UpdateArticle(param *UpdateArticleRequest) error
- func (svc *Service) UpdateTag(param *UpdateTagRequest) error
- func (svc *Service) UploadFile(fileType upload.FileType, file multipart.File, ...) (*FileInfo, error)
- type TagListRequest
- type UpdateArticleRequest
- type UpdateTagRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleListRequest ¶
type ArticleRequest ¶
type AuthRequest ¶
type CountTagRequest ¶
type CreateArticleRequest ¶
type CreateArticleRequest struct { TagID uint32 `form:"tag_id" binding:"required,gte=1"` Title string `form:"title" binding:"required,min=2,max=100"` Desc string `form:"desc" binding:"required,min=2,max=255"` Content string `form:"content" binding:"required,min=2,max=4294967295"` CoverImageUrl string `form:"cover_image_url" binding:"required,url"` CreatedBy string `form:"created_by" binding:"required,min=2,max=100"` State uint8 `form:"state,default=1" binding:"oneof=0 1"` }
type CreateTagRequest ¶
type DeleteArticleRequest ¶
type DeleteArticleRequest struct {
ID uint32 `form:"id" binding:"required,gte=1"`
}
type DeleteTagRequest ¶
type DeleteTagRequest struct {
ID uint32 `form:"id" binding:"required,gte=1"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CheckAuth ¶
func (svc *Service) CheckAuth(param *AuthRequest) error
func (*Service) CreateArticle ¶
func (svc *Service) CreateArticle(param *CreateArticleRequest) error
func (*Service) CreateTag ¶
func (svc *Service) CreateTag(param *CreateTagRequest) error
func (*Service) DeleteArticle ¶
func (svc *Service) DeleteArticle(param *DeleteArticleRequest) error
func (*Service) DeleteTag ¶
func (svc *Service) DeleteTag(param *DeleteTagRequest) error
func (*Service) GetArticle ¶
func (svc *Service) GetArticle(param *ArticleRequest) (*Article, error)
func (*Service) GetArticleList ¶
func (*Service) GetTagList ¶
func (*Service) UpdateArticle ¶
func (svc *Service) UpdateArticle(param *UpdateArticleRequest) error
func (*Service) UpdateTag ¶
func (svc *Service) UpdateTag(param *UpdateTagRequest) error
type TagListRequest ¶
type UpdateArticleRequest ¶
type UpdateArticleRequest struct { ID uint32 `form:"id" binding:"required,gte=1"` TagID uint32 `form:"tag_id" binding:"required,gte=1"` Title string `form:"title" binding:"min=2,max=100"` Desc string `form:"desc" binding:"min=2,max=255"` Content string `form:"content" binding:"min=2,max=4294967295"` CoverImageUrl string `form:"cover_image_url" binding:"url"` ModifiedBy string `form:"modified_by" binding:"required,min=2,max=100"` State uint8 `form:"state,default=1" binding:"oneof=0 1"` }
Click to show internal directories.
Click to hide internal directories.