Documentation ¶
Index ¶
- func ParseImageURLs(imageURLs, originImageURLs string) (imgs, oimgs []string, err error)
- type Service
- func (s *Service) AIViewInfoc(mid int64, plat int8, build int, itemType, from, buvid string, itemID int64, ...)
- func (s *Service) ActInfo(c context.Context, plat int8) (res *model.ActInfo, err error)
- func (s *Service) AddArtContentCache(c context.Context, aid int64, content string) (err error)
- func (s *Service) AddArtDraft(c context.Context, a *artmdl.Draft) (id int64, err error)
- func (s *Service) AddArticle(c context.Context, a *model.Article, actID, listID int64, ip string) (id int64, err error)
- func (s *Service) AddArticleCache(c context.Context, aid int64) (err error)
- func (s *Service) AddAuthor(c context.Context, mid int64) (err error)
- func (s *Service) AddCacheHotspotArt(c context.Context, art *model.SearchArt) (err error)
- func (s *Service) AddCheatFilter(c context.Context, aid int64, lv int) (err error)
- func (s *Service) AddComplaint(c context.Context, aid, mid, ctype int64, reason, imageUrls, ip string) (err error)
- func (s *Service) AddFavorite(c context.Context, mid, aid, fid int64, ip string) (err error)
- func (s *Service) AddHistory(c context.Context, mid, cvid int64, listID int64, ip string, plat int8, ...) (err error)
- func (s *Service) AddShare(c context.Context, id int64, mid int64, ip string) (err error)
- func (s *Service) AllRecommends(c context.Context, pn, ps int) (count int64, res []*model.Meta, err error)
- func (s *Service) AnniversaryInfo(c context.Context, mid int64) (res *model.AnniversaryInfo, err error)
- func (s *Service) Apply(c context.Context, mid int64, content, category string) (err error)
- func (s *Service) ApplyInfo(c context.Context, mid int64) (res *model.Apply, err error)
- func (s *Service) Archives(c context.Context, aids []int64, ip string) (arcs map[int64]*api.Arc, err error)
- func (s *Service) ArtDraft(c context.Context, aid, mid int64) (res *artmdl.Draft, err error)
- func (s *Service) Article(c context.Context, id int64) (res *artmdl.Article, err error)
- func (s *Service) ArticleCapture(c context.Context, url string) (loc string, size int, err error)
- func (s *Service) ArticleMeta(c context.Context, aid int64) (res *artmdl.Meta, err error)
- func (s *Service) ArticleMetas(c context.Context, ids []int64) (res map[int64]*artmdl.Meta, err error)
- func (s *Service) ArticleRemainCount(c context.Context, mid int64) (num int, err error)
- func (s *Service) ArticleUpCover(c context.Context, fileType string, body []byte) (url string, err error)
- func (s *Service) ArticleVersion(c context.Context, aid int64) (a *model.Article, err error)
- func (s *Service) Authors(c context.Context, mid int64, author int64) (res []*model.AccountCard)
- func (s *Service) Banners(c context.Context, plat int8, build int, t time.Time) (res []*model.Banner, err error)
- func (s *Service) BindTags(c context.Context, mid, aid int64, tags []string, ip string, activityID int64) (err error)
- func (s *Service) CategoryToRoot(cid int64) (res int64, err error)
- func (s *Service) CheckIdentify(identify int) (err error)
- func (s *Service) Close()
- func (s *Service) Coin(c context.Context, mid, aid int64, ip string) (res int64, err error)
- func (s *Service) CreationArticle(c context.Context, aid, mid int64) (a *model.Article, err error)
- func (s *Service) CreationUpperArticlesMeta(c context.Context, mid int64, group, category, sortType, pn, ps int, ip string) (res *model.CreationArts, err error)
- func (s *Service) CreationWithdrawArticle(c context.Context, mid, aid int64) (err error)
- func (s *Service) CreativeAddDraft(c context.Context, mid int64, art *model.ArtParam) (aid int64, err error)
- func (s *Service) CreativeAddList(c context.Context, mid int64, name string, summary, imageURL string) (res *model.List, err error)
- func (s *Service) CreativeArticles(c context.Context, mid int64, pn, ps, sort, group, category int, ip string) (arts *model.CreativeArtList, err error)
- func (s *Service) CreativeCanAddArticles(c context.Context, mid int64) (res []*model.ListArtMeta, err error)
- func (s *Service) CreativeDelList(c context.Context, mid int64, id int64) (err error)
- func (s *Service) CreativeDraft(c context.Context, aid, mid int64, ip string) (res *model.CreativeMeta, err error)
- func (s *Service) CreativeDraftCount(c context.Context, mid int64) (count int)
- func (s *Service) CreativeDrafts(c context.Context, mid int64, pn, ps int, ip string) (dls *model.CreativeDraftList, err error)
- func (s *Service) CreativeListAllArticles(c context.Context, mid, id int64) (list *model.List, arts []*model.ListArtMeta, err error)
- func (s *Service) CreativeSubArticle(c context.Context, mid int64, art *model.ArtParam, ak, ck, ip string) (aid int64, err error)
- func (s *Service) CreativeUpLists(c context.Context, mid int64) (novel bool, lists []*model.CreativeList, err error)
- func (s *Service) CreativeUpdateArticle(c context.Context, mid int64, art *model.ArtParam, ak, ck, ip string) (err error)
- func (s *Service) CreativeUpdateArticleList(c context.Context, mid, aid, listID int64, onlyPass bool) (err error)
- func (s *Service) CreativeUpdateList(c context.Context, id int64, name, imageURL, summary string, ...) (res *model.List, err error)
- func (s *Service) CreativeUpdateListArticles(c context.Context, listID int64, name, imageURL, summary string, onlyList bool, ...) (list *model.List, err error)
- func (s *Service) CreativeView(c context.Context, aid, mid int64, ip string) (res *model.CreativeMeta, err error)
- func (s *Service) DelArtDraft(c context.Context, aid, mid int64) (err error)
- func (s *Service) DelArticle(c context.Context, aid, mid int64) (err error)
- func (s *Service) DelArticleCache(c context.Context, mid, aid int64) (err error)
- func (s *Service) DelCacheHotspotArt(c context.Context, aid int64) (err error)
- func (s *Service) DelCheatFilter(c context.Context, aid int64) (err error)
- func (s *Service) DelFavorite(c context.Context, mid, aid, fid int64, ip string) (err error)
- func (s *Service) DelMediaScore(c context.Context, aid, mediaID, mid int64) (err error)
- func (s *Service) DelRecommendArt(categoryID int64, aid int64)
- func (s *Service) DelRecommendArtCache(c context.Context, aid, cid int64) (err error)
- func (s *Service) EditTimes(c context.Context, id int64) (res int)
- func (s *Service) Favorites(c context.Context, mid, fid int64, pn, ps int, ip string) (favs *favmdl.Favorites, err error)
- func (s *Service) Favs(c context.Context, mid, fid int64, pn, ps int, ip string) (favs []*artmdl.Favorite, page *artmdl.Page, err error)
- func (s *Service) FeedArticleMetas(c context.Context, ids []int64) (res map[int64]*artmdl.Meta, err error)
- func (s *Service) FindCard(c context.Context, idStr string) (res interface{}, err error)
- func (s *Service) FindCards(c context.Context, ids []string) (res map[string]interface{}, err error)
- func (s *Service) HadLikesByMid(c context.Context, mid int64, aids []int64) (res map[int64]int8, err error)
- func (s *Service) HotspotArts(c context.Context, id int64, pn, ps int, lastAids []int64, sort int8, ...) (hotspot *model.Hotspot, res []*model.MetaWithLike, err error)
- func (s *Service) IdentifyInfo(c context.Context, mid int64, phoneOnly int8, ak, ck, ip string) (ret int, err error)
- func (s *Service) IsAuthor(c context.Context, mid int64) (res bool, forbid bool, err error)
- func (s *Service) IsFav(c context.Context, mid, aid int64) (res bool, err error)
- func (s *Service) LevelRequired(c context.Context, mid int64) (ok bool, err error)
- func (s *Service) Like(c context.Context, mid, aid int64, likeType int) (err error)
- func (s *Service) List(c context.Context, id int64) (res *model.List, err error)
- func (s *Service) ListArticles(c context.Context, id, mid int64) (res *model.ListArticles, err error)
- func (s *Service) ListCategories(c context.Context, ip string) (res artmdl.Categories, err error)
- func (s *Service) ListCategoriesMap(c context.Context, ip string) (res map[int64]*artmdl.Category, err error)
- func (s *Service) ListInfo(c context.Context, aid int64) (res *model.ListInfo, err error)
- func (s *Service) Lists(c context.Context, keys []int64) (res map[int64]*model.List, err error)
- func (s *Service) MediaArticle(c context.Context, mediaID, mid int64) (id int64, err error)
- func (s *Service) MediaCategory(c context.Context, mediaID int64, mid int64) (cg *artmdl.Category, err error)
- func (s *Service) MediaIDByID(c context.Context, aid int64) (id int64, err error)
- func (s *Service) MoreArts(c context.Context, aid int64) (res []*artmdl.Meta, err error)
- func (s *Service) Mores(c context.Context, aid, loginMID int64) (res artmdl.MoreArts, err error)
- func (s *Service) NewArticleCount(c context.Context, ptime int64) (res int64, err error)
- func (s *Service) Notice(platform string, build int) (res *artmdl.Notice)
- func (s *Service) ParseDraftParam(c context.Context, ...) (art *model.ArtParam, err error)
- func (s *Service) ParseParam(c context.Context, ...) (art *model.ArtParam, err error)
- func (s *Service) Ping(c context.Context) (err error)
- func (s *Service) RankCategories(c context.Context) (res []*artmdl.RankCategory)
- func (s *Service) Ranks(c context.Context, cid int64, mid int64, ip string) (res []*artmdl.RankMeta, note string, err error)
- func (s *Service) ReadPing(c context.Context, buvid string, aid int64, mid int64, ip string, cur int64, ...) (err error)
- func (s *Service) RebuildAllListReadCount(c context.Context)
- func (s *Service) RebuildListCache(c context.Context, id int64) (err error)
- func (s *Service) RecommendAuthors(c context.Context, platform string, mobiApp string, device string, build int, ...) (res *model.RecommendAuthors, err error)
- func (s *Service) RecommendHome(c context.Context, plat int8, build int, pn, ps int, aids []int64, mid int64, ...) (res *model.RecommendHome, sky *model.SkyHorseResp, err error)
- func (s *Service) RecommendInfoc(mid int64, plat int8, pageType, cid, build int, buvid, ip string, ...)
- func (s *Service) RecommendPlus(c context.Context, cid int64, plat int8, build int, pn, ps int, aids []int64, ...) (res *model.RecommendPlus, sky *model.SkyHorseResp, err error)
- func (s *Service) Recommends(c context.Context, cid int64, pn, ps int, lastAids []int64, sort int) (res []*model.RecommendArt, err error)
- func (s *Service) RecommendsWithLike(c context.Context, cid int64, pn, ps int, lastAids []int64, sort int, ...) (res []*artmdl.RecommendArtWithLike, err error)
- func (s *Service) RefreshList(c context.Context, id int64) (err error)
- func (s *Service) RootCategory(c context.Context, aid int64) (root int64, cid int64, err error)
- func (s *Service) Segment(c context.Context, id int32, content string, withTag int, remarks string) (keywords []string, err error)
- func (s *Service) SendMessage(c context.Context, aid int64, stat *artmdl.Stats) (err error)
- func (s *Service) Sentinel(c context.Context) *conf.Sentinel
- func (s *Service) SetMediaScore(c context.Context, score, aid, mediaID, mid int64) (err error)
- func (s *Service) SetStat(c context.Context, aid int64, stat *artmdl.Stats) (err error)
- func (s *Service) ShowInfoc(ip string, now time.Time, buvid string, mid int64, client int8, ...)
- func (s *Service) SkyHorse(c context.Context, cid int64, pn, ps int, lastAids []int64, sort int, ...) (res []*model.RecommendArtWithLike, sky *model.SkyHorseResp, err error)
- func (s *Service) Tags(c context.Context, aid int64, skipAct bool) (res []*artmdl.Tag, err error)
- func (s *Service) UpArtMetasAndLists(c context.Context, mid int64, pn int, ps int, sortType int) (res model.UpArtMetasLists, err error)
- func (s *Service) UpArticleMetas(c context.Context, mid int64, pn int, ps int, sortType int) (res *artmdl.UpArtMetas, err error)
- func (s *Service) UpLists(c context.Context, mid int64, sortType int8) (res model.UpLists, err error)
- func (s *Service) UpStat(c context.Context, mid int64) (res model.UpStat, err error)
- func (s *Service) UpThirtyDayStat(c context.Context, mid int64) (res []*model.ThirtyDayArticle, err error)
- func (s *Service) UpdateArticle(c context.Context, a *model.Article, actID, listID int64, ip string) (err error)
- func (s *Service) UpdateArticleCache(c context.Context, aid, oldCid int64) (err error)
- func (s *Service) UpdateAuthorCache(c context.Context, mid int64) (err error)
- func (s *Service) UpdateHotspots(force bool) (err error)
- func (s *Service) UpdateRecommends(c context.Context) (err error)
- func (s *Service) UpdateSortCache(c context.Context, aid int64, changed [][2]int64, ip string) (err error)
- func (s *Service) UpdateUserNoticeState(c context.Context, mid int64, typ string) (err error)
- func (s *Service) UpperArtsCount(c context.Context, mid int64) (res int, err error)
- func (s *Service) UpperDrafts(c context.Context, mid int64, pn, ps int) (res *artmdl.Drafts, err error)
- func (s *Service) UpsArticleMetas(c context.Context, mids []int64, start int, end int) (res map[int64][]*artmdl.Meta, err error)
- func (s *Service) UserDisabled(c context.Context, mid int64) (res bool, level int, err error)
- func (s *Service) UserNoticeState(c context.Context, mid int64) (res model.NoticeState, err error)
- func (s *Service) ValidFavs(c context.Context, mid, fid int64, pn, ps int, ip string) (res []*artmdl.Favorite, page *artmdl.Page, err error)
- func (s *Service) ViewInfo(c context.Context, mid, id int64, ip string, cheat *model.CheatInfo, plat int8, ...) (res *model.ViewInfo, err error)
- func (s *Service) ViewInfoc(mid int64, plat int8, build int, itemType, from, buvid string, itemID int64, ...)
- func (s *Service) ViewList(c context.Context, aid int64, buvid string, from string, ip string, build int, ...) (pre int64, next int64)
- func (s *Service) WebListArticles(c context.Context, id, mid int64) (res *model.WebListArticles, 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 { Categories artmdl.Categories RecommendsMap map[int64][][]*artmdl.Recommend RecommendsGroups map[int64]map[int64]bool CheatInfoc *anticheat.AntiCheat // contains filtered or unexported fields }
Service service
func (*Service) AIViewInfoc ¶
func (s *Service) AIViewInfoc(mid int64, plat int8, build int, itemType, from, buvid string, itemID int64, now time.Time, ua string)
AIViewInfoc .
func (*Service) AddArtContentCache ¶
AddArtContentCache add article content cache
func (*Service) AddArtDraft ¶
AddArtDraft add article draft .
func (*Service) AddArticle ¶
func (s *Service) AddArticle(c context.Context, a *model.Article, actID, listID int64, ip string) (id int64, err error)
AddArticle adds article.
func (*Service) AddArticleCache ¶
AddArticleCache adds artmdl.
func (*Service) AddCacheHotspotArt ¶
AddCacheHotspotArt check article in hotspots list and add cache
func (*Service) AddCheatFilter ¶
AddCheatFilter .
func (*Service) AddComplaint ¶
func (s *Service) AddComplaint(c context.Context, aid, mid, ctype int64, reason, imageUrls, ip string) (err error)
AddComplaint add complaint.
func (*Service) AddFavorite ¶
AddFavorite add article favorite .
func (*Service) AddHistory ¶
func (s *Service) AddHistory(c context.Context, mid, cvid int64, listID int64, ip string, plat int8, from string) (err error)
AddHistory .
func (*Service) AllRecommends ¶
func (s *Service) AllRecommends(c context.Context, pn, ps int) (count int64, res []*model.Meta, err error)
AllRecommends all recommends articles
func (*Service) AnniversaryInfo ¶
func (s *Service) AnniversaryInfo(c context.Context, mid int64) (res *model.AnniversaryInfo, err error)
AnniversaryInfo get reader and author info in passed year
func (*Service) ApplyInfo ¶
ApplyInfo get apply info 检查顺序: 是否已通过->拒绝-> 已提交-> 开放申请-> 申请已满 -> 实名认证/封禁状态/绑定手机
func (*Service) Archives ¶
func (s *Service) Archives(c context.Context, aids []int64, ip string) (arcs map[int64]*api.Arc, err error)
Archives gets archives by aids.
func (*Service) ArticleCapture ¶
ArticleCapture capture a new image.
func (*Service) ArticleMeta ¶
ArticleMeta gets article's meta.
func (*Service) ArticleMetas ¶
func (s *Service) ArticleMetas(c context.Context, ids []int64) (res map[int64]*artmdl.Meta, err error)
ArticleMetas get article meta
func (*Service) ArticleRemainCount ¶
ArticleRemainCount returns the number that user could be use to posting new articles.
func (*Service) ArticleUpCover ¶
func (s *Service) ArticleUpCover(c context.Context, fileType string, body []byte) (url string, err error)
ArticleUpCover article upload cover.
func (*Service) ArticleVersion ¶
ArticleVersion .
func (*Service) Banners ¶
func (s *Service) Banners(c context.Context, plat int8, build int, t time.Time) (res []*model.Banner, err error)
Banners get banners
func (*Service) BindTags ¶
func (s *Service) BindTags(c context.Context, mid, aid int64, tags []string, ip string, activityID int64) (err error)
BindTags bind tags with activity
func (*Service) CategoryToRoot ¶
CategoryToRoot 找到一级分区
func (*Service) CheckIdentify ¶
CheckIdentify fn
func (*Service) CreationArticle ¶
CreationArticle .
func (*Service) CreationUpperArticlesMeta ¶
func (s *Service) CreationUpperArticlesMeta(c context.Context, mid int64, group, category, sortType, pn, ps int, ip string) (res *model.CreationArts, err error)
CreationUpperArticlesMeta gets article list by mid.
func (*Service) CreationWithdrawArticle ¶
CreationWithdrawArticle recall the article and add it to draft.
func (*Service) CreativeAddDraft ¶
func (s *Service) CreativeAddDraft(c context.Context, mid int64, art *model.ArtParam) (aid int64, err error)
CreativeAddDraft .
func (*Service) CreativeAddList ¶
func (s *Service) CreativeAddList(c context.Context, mid int64, name string, summary, imageURL string) (res *model.List, err error)
CreativeAddList add list
func (*Service) CreativeArticles ¶
func (s *Service) CreativeArticles(c context.Context, mid int64, pn, ps, sort, group, category int, ip string) (arts *model.CreativeArtList, err error)
CreativeArticles creative articles list
func (*Service) CreativeCanAddArticles ¶
func (s *Service) CreativeCanAddArticles(c context.Context, mid int64) (res []*model.ListArtMeta, err error)
CreativeCanAddArticles can added passed articles
func (*Service) CreativeDelList ¶
CreativeDelList del list
func (*Service) CreativeDraft ¶
func (s *Service) CreativeDraft(c context.Context, aid, mid int64, ip string) (res *model.CreativeMeta, err error)
CreativeDraft get draft.
func (*Service) CreativeDraftCount ¶
CreativeDraftCount count of upper's drafts
func (*Service) CreativeDrafts ¶
func (s *Service) CreativeDrafts(c context.Context, mid int64, pn, ps int, ip string) (dls *model.CreativeDraftList, err error)
CreativeDrafts get draft list.
func (*Service) CreativeListAllArticles ¶
func (s *Service) CreativeListAllArticles(c context.Context, mid, id int64) (list *model.List, arts []*model.ListArtMeta, err error)
CreativeListAllArticles get read list articles
func (*Service) CreativeSubArticle ¶
func (s *Service) CreativeSubArticle(c context.Context, mid int64, art *model.ArtParam, ak, ck, ip string) (aid int64, err error)
CreativeSubArticle submit model.
func (*Service) CreativeUpLists ¶
func (s *Service) CreativeUpLists(c context.Context, mid int64) (novel bool, lists []*model.CreativeList, err error)
CreativeUpLists up list
func (*Service) CreativeUpdateArticle ¶
func (s *Service) CreativeUpdateArticle(c context.Context, mid int64, art *model.ArtParam, ak, ck, ip string) (err error)
CreativeUpdateArticle update model.
func (*Service) CreativeUpdateArticleList ¶
func (s *Service) CreativeUpdateArticleList(c context.Context, mid, aid, listID int64, onlyPass bool) (err error)
CreativeUpdateArticleList update article list
func (*Service) CreativeUpdateList ¶
func (s *Service) CreativeUpdateList(c context.Context, id int64, name, imageURL, summary string, publishTime xtime.Time, words int64) (res *model.List, err error)
CreativeUpdateList update list
func (*Service) CreativeUpdateListArticles ¶
func (s *Service) CreativeUpdateListArticles(c context.Context, listID int64, name, imageURL, summary string, onlyList bool, mid int64, aids []int64) (list *model.List, err error)
CreativeUpdateListArticles update list articles
func (*Service) CreativeView ¶
func (s *Service) CreativeView(c context.Context, aid, mid int64, ip string) (res *model.CreativeMeta, err error)
CreativeView get article detail.
func (*Service) DelArtDraft ¶
DelArtDraft deletes article draft.
func (*Service) DelArticle ¶
DelArticle drops article.
func (*Service) DelArticleCache ¶
DelArticleCache deletes artmdl.
func (*Service) DelCacheHotspotArt ¶
DelCacheHotspotArt delete art from hotspots
func (*Service) DelCheatFilter ¶
DelCheatFilter .
func (*Service) DelFavorite ¶
DelFavorite del article favorite .
func (*Service) DelMediaScore ¶
DelMediaScore get media score.
func (*Service) DelRecommendArt ¶
DelRecommendArt delete recommend article
func (*Service) DelRecommendArtCache ¶
DelRecommendArtCache delete recommend article cache
func (*Service) Favorites ¶
func (s *Service) Favorites(c context.Context, mid, fid int64, pn, ps int, ip string) (favs *favmdl.Favorites, err error)
Favorites article favorites.
func (*Service) Favs ¶
func (s *Service) Favs(c context.Context, mid, fid int64, pn, ps int, ip string) (favs []*artmdl.Favorite, page *artmdl.Page, err error)
Favs gets user favorite article list.
func (*Service) FeedArticleMetas ¶
func (s *Service) FeedArticleMetas(c context.Context, ids []int64) (res map[int64]*artmdl.Meta, err error)
FeedArticleMetas .
func (*Service) FindCards ¶
func (s *Service) FindCards(c context.Context, ids []string) (res map[string]interface{}, err error)
FindCards find cards
func (*Service) HadLikesByMid ¶
func (s *Service) HadLikesByMid(c context.Context, mid int64, aids []int64) (res map[int64]int8, err error)
HadLikesByMid .
func (*Service) HotspotArts ¶
func (s *Service) HotspotArts(c context.Context, id int64, pn, ps int, lastAids []int64, sort int8, mid int64) (hotspot *model.Hotspot, res []*model.MetaWithLike, err error)
HotspotArts get hotspot articles
func (*Service) IdentifyInfo ¶
func (s *Service) IdentifyInfo(c context.Context, mid int64, phoneOnly int8, ak, ck, ip string) (ret int, err error)
IdentifyInfo .
func (*Service) LevelRequired ¶
LevelRequired .
func (*Service) ListArticles ¶
func (s *Service) ListArticles(c context.Context, id, mid int64) (res *model.ListArticles, err error)
ListArticles get list passed articles
func (*Service) ListCategories ¶
ListCategories list categories
func (*Service) ListCategoriesMap ¶
func (s *Service) ListCategoriesMap(c context.Context, ip string) (res map[int64]*artmdl.Category, err error)
ListCategoriesMap list category map
func (*Service) MediaArticle ¶
MediaArticle .
func (*Service) MediaCategory ¶
func (s *Service) MediaCategory(c context.Context, mediaID int64, mid int64) (cg *artmdl.Category, err error)
MediaCategory .
func (*Service) MediaIDByID ¶
MediaIDByID .
func (*Service) NewArticleCount ¶
NewArticleCount get new article count
func (*Service) ParseDraftParam ¶
func (s *Service) ParseDraftParam(c context.Context, categoryStr, reprintStr, tidStr, imageURLs, originImageURLs string) (art *model.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 *model.ArtParam, err error)
ParseParam parse article param which type is int.
func (*Service) RankCategories ¶
func (s *Service) RankCategories(c context.Context) (res []*artmdl.RankCategory)
RankCategories rank categoires
func (*Service) Ranks ¶
func (s *Service) Ranks(c context.Context, cid int64, mid int64, ip string) (res []*artmdl.RankMeta, note string, err error)
Ranks get ranks
func (*Service) ReadPing ¶
func (s *Service) ReadPing(c context.Context, buvid string, aid int64, mid int64, ip string, cur int64, source string) (err error)
ReadPing 处理用户阅读心跳
func (*Service) RebuildAllListReadCount ¶
RebuildAllListReadCount .
func (*Service) RebuildListCache ¶
RebuildListCache rebuild list cache
func (*Service) RecommendAuthors ¶
func (s *Service) RecommendAuthors(c context.Context, platform string, mobiApp string, device string, build int, clientIP string, userID int64, buvid string, mid int64) (res *model.RecommendAuthors, err error)
RecommendAuthors get recommends from search.
func (*Service) RecommendHome ¶
func (s *Service) RecommendHome(c context.Context, plat int8, build int, pn, ps int, aids []int64, mid int64, ip string, t time.Time, buvid string) (res *model.RecommendHome, sky *model.SkyHorseResp, err error)
RecommendHome recommend home
func (*Service) RecommendInfoc ¶
func (s *Service) RecommendInfoc(mid int64, plat int8, pageType, cid, build int, buvid, ip string, metas []*model.Meta, isRcmd bool, now time.Time, pn int64, sky *model.SkyHorseResp)
RecommendInfoc .
func (*Service) RecommendPlus ¶
func (s *Service) RecommendPlus(c context.Context, cid int64, plat int8, build int, pn, ps int, aids []int64, mid int64, t time.Time, sort int, buvid string) (res *model.RecommendPlus, sky *model.SkyHorseResp, err error)
RecommendPlus recommend plus
func (*Service) Recommends ¶
func (s *Service) Recommends(c context.Context, cid int64, pn, ps int, lastAids []int64, sort int) (res []*model.RecommendArt, err error)
Recommends list recommend arts by category id
func (*Service) RecommendsWithLike ¶
func (s *Service) RecommendsWithLike(c context.Context, cid int64, pn, ps int, lastAids []int64, sort int, mid int64) (res []*artmdl.RecommendArtWithLike, err error)
RecommendsWithLike recommends with like state
func (*Service) RefreshList ¶
RefreshList refresh list info and cache use in api
func (*Service) RootCategory ¶
RootCategory 找到一级分区
func (*Service) Segment ¶
func (s *Service) Segment(c context.Context, id int32, content string, withTag int, remarks string) (keywords []string, err error)
Segment .
func (*Service) SendMessage ¶
SendMessage send message to uppper
func (*Service) SetMediaScore ¶
SetMediaScore set media score.
func (*Service) ShowInfoc ¶
func (s *Service) ShowInfoc(ip string, now time.Time, buvid string, mid int64, client int8, pageType string, from string, build string, ua string, referer string)
ShowInfoc .
func (*Service) SkyHorse ¶
func (s *Service) SkyHorse(c context.Context, cid int64, pn, ps int, lastAids []int64, sort int, mid int64, build int, buvid string, plat int8) (res []*model.RecommendArtWithLike, sky *model.SkyHorseResp, err error)
SkyHorse .
func (*Service) UpArtMetasAndLists ¶
func (s *Service) UpArtMetasAndLists(c context.Context, mid int64, pn int, ps int, sortType int) (res model.UpArtMetasLists, err error)
UpArtMetasAndLists .
func (*Service) UpArticleMetas ¶
func (s *Service) UpArticleMetas(c context.Context, mid int64, pn int, ps int, sortType int) (res *artmdl.UpArtMetas, err error)
UpArticleMetas list up article metas
func (*Service) UpLists ¶
func (s *Service) UpLists(c context.Context, mid int64, sortType int8) (res model.UpLists, err error)
UpLists .
func (*Service) UpThirtyDayStat ¶
func (s *Service) UpThirtyDayStat(c context.Context, mid int64) (res []*model.ThirtyDayArticle, err error)
UpThirtyDayStat for 30 days stat.
func (*Service) UpdateArticle ¶
func (s *Service) UpdateArticle(c context.Context, a *model.Article, actID, listID int64, ip string) (err error)
UpdateArticle update article.
func (*Service) UpdateArticleCache ¶
UpdateArticleCache adds artmdl.
func (*Service) UpdateAuthorCache ¶
UpdateAuthorCache update author cache
func (*Service) UpdateHotspots ¶
UpdateHotspots update all hotspots
func (*Service) UpdateRecommends ¶
UpdateRecommends update recommends
func (*Service) UpdateSortCache ¶
func (s *Service) UpdateSortCache(c context.Context, aid int64, changed [][2]int64, ip string) (err error)
UpdateSortCache update sort cache
func (*Service) UpdateUserNoticeState ¶
UpdateUserNoticeState .
func (*Service) UpperArtsCount ¶
UpperArtsCount count upper article
func (*Service) UpperDrafts ¶
func (s *Service) UpperDrafts(c context.Context, mid int64, pn, ps int) (res *artmdl.Drafts, err error)
UpperDrafts batch get draft by mid.
func (*Service) UpsArticleMetas ¶
func (s *Service) UpsArticleMetas(c context.Context, mids []int64, start int, end int) (res map[int64][]*artmdl.Meta, err error)
UpsArticleMetas list up article metas
func (*Service) UserDisabled ¶
UserDisabled check user is disabled
func (*Service) UserNoticeState ¶
UserNoticeState .
func (*Service) ValidFavs ¶
func (s *Service) ValidFavs(c context.Context, mid, fid int64, pn, ps int, ip string) (res []*artmdl.Favorite, page *artmdl.Page, err error)
ValidFavs get valid favorites
func (*Service) ViewInfo ¶
func (s *Service) ViewInfo(c context.Context, mid, id int64, ip string, cheat *model.CheatInfo, plat int8, from string) (res *model.ViewInfo, err error)
ViewInfo get view info
func (*Service) ViewInfoc ¶
func (s *Service) ViewInfoc(mid int64, plat int8, build int, itemType, from, buvid string, itemID int64, now time.Time, ua string)
ViewInfoc .
func (*Service) ViewList ¶
func (s *Service) ViewList(c context.Context, aid int64, buvid string, from string, ip string, build int, plat int8, mid int64) (pre int64, next int64)
ViewList .
func (*Service) WebListArticles ¶
func (s *Service) WebListArticles(c context.Context, id, mid int64) (res *model.WebListArticles, err error)
WebListArticles .
Source Files ¶
- activity.go
- anniversary.go
- apply.go
- archive.go
- article.go
- author.go
- banner.go
- cards.go
- category.go
- coin.go
- creation.go
- creation_check.go
- creative_list.go
- draft.go
- favorite.go
- history.go
- hotspots.go
- infoc.go
- like.go
- list.go
- message.go
- notice.go
- old_creative.go
- rank.go
- read.go
- recommends.go
- search.go
- sentinel.go
- service.go
- setting.go
- share.go
- slide.go
- sort.go
- stat.go
- tag.go
- upper.go
- users.go
- view.go
- xss.go