Documentation ¶
Index ¶
- func ParseImageURLs(imageURLs, originImageURLs string) (imgs, oimgs []string, err error)
- type Service
- func (s *Service) AddDraft(c context.Context, mid int64, art *artMdl.ArtParam) (aid int64, err error)
- func (s *Service) ArticleCapture(c context.Context, url string) (loc string, size int, err error)
- func (s *Service) ArticleStat(c context.Context, mid int64, ip string) (stat article.UpStat, err error)
- func (s *Service) ArticleUpCover(c context.Context, fileType string, body []byte) (url string, err error)
- func (s *Service) Articles(c context.Context, mid int64, pn, ps, sort, group, category int, ip string) (arts *artMdl.ArtList, err error)
- func (s *Service) Categories(c context.Context) (*article.Categories, error)
- func (s *Service) DelArticle(c context.Context, aid, mid int64, ip string) (err error)
- func (s *Service) DelDraft(c context.Context, aid, mid int64, ip string) (err error)
- func (s *Service) Draft(c context.Context, aid, mid int64, ip string) (res *artMdl.Meta, err error)
- func (s *Service) Drafts(c context.Context, mid int64, pn, ps int, ip string) (dls *artMdl.DraftList, err error)
- func (s *Service) IsAuthor(c context.Context, mid int64, ip string) (ok bool, err error)
- func (s *Service) ParseDraftParam(c context.Context, ...) (art *artMdl.ArtParam, err error)
- func (s *Service) ParseParam(c context.Context, ...) (art *artMdl.ArtParam, err error)
- func (s *Service) RemainCount(c context.Context, mid int64, ip string) (rc int, err error)
- func (s *Service) SubArticle(c context.Context, mid int64, art *artMdl.ArtParam, ak, ck, ip string) (aid int64, err error)
- func (s *Service) UpdateArticle(c context.Context, mid int64, art *artMdl.ArtParam, ak, ck, ip string) (err error)
- func (s *Service) View(c context.Context, aid, mid int64, ip string) (res *artMdl.Meta, err error)
- func (s *Service) WithDrawArticle(c context.Context, aid, mid int64, ip string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseImageURLs ¶
ParseImageURLs parse img urls to []string.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service struct.
func (*Service) AddDraft ¶
func (s *Service) AddDraft(c context.Context, mid int64, art *artMdl.ArtParam) (aid int64, err error)
AddDraft add draft.
func (*Service) ArticleCapture ¶
ArticleCapture article capture.
func (*Service) ArticleStat ¶
func (s *Service) ArticleStat(c context.Context, mid int64, ip string) (stat article.UpStat, err error)
ArticleStat get article base data.
func (*Service) ArticleUpCover ¶
func (s *Service) ArticleUpCover(c context.Context, fileType string, body []byte) (url string, err error)
ArticleUpCover article upload cover.
func (*Service) Articles ¶
func (s *Service) Articles(c context.Context, mid int64, pn, ps, sort, group, category int, ip string) (arts *artMdl.ArtList, err error)
Articles get article list.
func (*Service) Categories ¶
Categories get article category.
func (*Service) DelArticle ¶
DelArticle delete article.
func (*Service) Drafts ¶
func (s *Service) Drafts(c context.Context, mid int64, pn, ps int, ip string) (dls *artMdl.DraftList, err error)
Drafts get draft list.
func (*Service) ParseDraftParam ¶
func (s *Service) ParseDraftParam(c context.Context, categoryStr, reprintStr, tidStr, imageURLs, originImageURLs string) (art *artMdl.ArtParam, err error)
ParseDraftParam parse draft param which type is int.
func (*Service) ParseParam ¶
func (s *Service) ParseParam(c context.Context, categoryStr, reprintStr, tidStr, imageURLs, originImageURLs string) (art *artMdl.ArtParam, err error)
ParseParam parse article param which type is int.
func (*Service) RemainCount ¶
RemainCount article up limit.
func (*Service) SubArticle ¶
func (s *Service) SubArticle(c context.Context, mid int64, art *artMdl.ArtParam, ak, ck, ip string) (aid int64, err error)
SubArticle submit article.
func (*Service) UpdateArticle ¶
func (s *Service) UpdateArticle(c context.Context, mid int64, art *artMdl.ArtParam, ak, ck, ip string) (err error)
UpdateArticle update article.
Click to show internal directories.
Click to hide internal directories.