Documentation ¶
Index ¶
- func New(s *service.Service) (svr *rpc.Server)
- type RPC
- func (r *RPC) AddArtDraft(c context.Context, arg *model.ArgArticle, res *int64) (err error)
- func (r *RPC) AddArticle(c context.Context, arg *model.ArgArticle, res *int64) (err error)
- func (r *RPC) AddArticleCache(c context.Context, arg *model.ArgAid, res *struct{}) (err error)
- func (r *RPC) ArtDraft(c context.Context, arg *model.ArgAidMid, res *model.Draft) (err error)
- func (r *RPC) ArticleMetas(c context.Context, arg *model.ArgAids, res *map[int64]*model.Meta) (err error)
- func (r *RPC) ArticleRemainCount(c context.Context, arg *model.ArgMid, res *int) (err error)
- func (r *RPC) Auth(c context.Context, arg *rpc.Auth, res *struct{}) (err error)
- func (r *RPC) Categories(c context.Context, arg *model.ArgIP, res *model.Categories) (err error)
- func (r *RPC) CategoriesMap(c context.Context, arg *model.ArgIP, res *map[int64]*model.Category) (err error)
- func (r *RPC) CreationArticle(c context.Context, arg *model.ArgAidMid, res *model.Article) (err error)
- func (r *RPC) CreationUpStat(c context.Context, arg *model.ArgMid, res *model.UpStat) (err error)
- func (r *RPC) CreationUpThirtyDayStat(c context.Context, arg *model.ArgMid, res *[]*model.ThirtyDayArticle) (err error)
- func (r *RPC) CreationUpperArticles(c context.Context, arg *model.ArgCreationArts, res *model.CreationArts) (err error)
- func (r *RPC) CreationWithdrawArticle(c context.Context, arg *model.ArgAidMid, res *struct{}) (err error)
- func (r *RPC) DelArtDraft(c context.Context, arg *model.ArgAidMid, res *struct{}) (err error)
- func (r *RPC) DelArticle(c context.Context, arg *model.ArgAidMid, res *struct{}) error
- func (r *RPC) DelArticleCache(c context.Context, arg *model.ArgAidMid, res *struct{}) (err error)
- func (r *RPC) DelRecommendArtCache(c context.Context, arg *model.ArgAidCid, res *struct{}) (err error)
- func (r *RPC) Favorites(c context.Context, arg *model.ArgFav, res *[]*model.Favorite) (err error)
- func (r *RPC) HadLikesByMid(c context.Context, arg *model.ArgMidAids, res *map[int64]int8) (err error)
- func (r *RPC) IsAuthor(c context.Context, arg *model.ArgMid, res *bool) (err error)
- func (r *RPC) NewArticleCount(c context.Context, arg *model.ArgNewArt, res *int64) (err error)
- func (r *RPC) Ping(c context.Context, arg *struct{}, res *struct{}) (err error)
- func (r *RPC) RebuildAllListReadCount(c context.Context, arg *struct{}, res *struct{}) (err error)
- func (r *RPC) Recommends(c context.Context, arg *model.ArgRecommends, res *[]*model.Meta) (err error)
- func (r *RPC) SetStat(c context.Context, arg *model.ArgStats, res *struct{}) (err error)
- func (r *RPC) UpArtMetas(c context.Context, arg *model.ArgUpArts, res *model.UpArtMetas) (err error)
- func (r *RPC) UpLists(c context.Context, arg *model.ArgMid, res *model.UpLists) (err error)
- func (r *RPC) UpMoreArts(c context.Context, arg *model.ArgAid, res *[]*model.Meta) (err error)
- func (r *RPC) UpdateArticle(c context.Context, arg *model.ArgArticle, res *struct{}) (err error)
- func (r *RPC) UpdateArticleCache(c context.Context, arg *model.ArgAidCid, res *struct{}) (err error)
- func (r *RPC) UpdateAuthorCache(c context.Context, arg *model.ArgAuthor, res *struct{}) (err error)
- func (r *RPC) UpdateHotspots(c context.Context, arg *model.ArgForce, res *struct{}) (err error)
- func (r *RPC) UpdateRecommends(c context.Context, arg *model.ArgIP, res *struct{}) (err error)
- func (r *RPC) UpdateSortCache(c context.Context, arg *model.ArgSort, res *struct{}) (err error)
- func (r *RPC) UpperDrafts(c context.Context, arg *model.ArgUpDraft, res *model.Drafts) (err error)
- func (r *RPC) UpsArtMetas(c context.Context, arg *model.ArgUpsArts, res *map[int64][]*model.Meta) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RPC ¶
type RPC struct {
// contains filtered or unexported fields
}
RPC .
func (*RPC) AddArtDraft ¶
AddArtDraft adds or updates draft.
func (*RPC) AddArticle ¶
AddArticle adds article when article passed. purge cache.
func (*RPC) AddArticleCache ¶
AddArticleCache adds article cache.
func (*RPC) ArticleMetas ¶
func (r *RPC) ArticleMetas(c context.Context, arg *model.ArgAids, res *map[int64]*model.Meta) (err error)
ArticleMetas list article metas
func (*RPC) ArticleRemainCount ¶
ArticleRemainCount returns the number that user could be use to posting new articles.
func (*RPC) Categories ¶
Categories list article categories
func (*RPC) CategoriesMap ¶
func (r *RPC) CategoriesMap(c context.Context, arg *model.ArgIP, res *map[int64]*model.Category) (err error)
CategoriesMap list article categories map
func (*RPC) CreationArticle ¶
func (r *RPC) CreationArticle(c context.Context, arg *model.ArgAidMid, res *model.Article) (err error)
CreationArticle gets article info.
func (*RPC) CreationUpStat ¶
CreationUpStat creation up stat
func (*RPC) CreationUpThirtyDayStat ¶
func (r *RPC) CreationUpThirtyDayStat(c context.Context, arg *model.ArgMid, res *[]*model.ThirtyDayArticle) (err error)
CreationUpThirtyDayStat creation up thirty day stat
func (*RPC) CreationUpperArticles ¶
func (r *RPC) CreationUpperArticles(c context.Context, arg *model.ArgCreationArts, res *model.CreationArts) (err error)
CreationUpperArticles gets upper's article list for creation center.
func (*RPC) CreationWithdrawArticle ¶
func (r *RPC) CreationWithdrawArticle(c context.Context, arg *model.ArgAidMid, res *struct{}) (err error)
CreationWithdrawArticle author withdraw model.
func (*RPC) DelArtDraft ¶
DelArtDraft .
func (*RPC) DelArticle ¶
DelArticle drops article when article not passed. purge cache.
func (*RPC) DelArticleCache ¶
DelArticleCache adds article cache.
func (*RPC) DelRecommendArtCache ¶
func (r *RPC) DelRecommendArtCache(c context.Context, arg *model.ArgAidCid, res *struct{}) (err error)
DelRecommendArtCache del recommend article cache
func (*RPC) HadLikesByMid ¶
func (r *RPC) HadLikesByMid(c context.Context, arg *model.ArgMidAids, res *map[int64]int8) (err error)
HadLikesByMid check user if has liked articles
func (*RPC) NewArticleCount ¶
NewArticleCount get new article count since given pubtime
func (*RPC) RebuildAllListReadCount ¶
RebuildAllListReadCount rebuild all list read count
func (*RPC) Recommends ¶
func (r *RPC) Recommends(c context.Context, arg *model.ArgRecommends, res *[]*model.Meta) (err error)
Recommends list recommend articles
func (*RPC) UpArtMetas ¶
func (r *RPC) UpArtMetas(c context.Context, arg *model.ArgUpArts, res *model.UpArtMetas) (err error)
UpArtMetas list up article metas
func (*RPC) UpMoreArts ¶
UpMoreArts get upper more arts
func (*RPC) UpdateArticle ¶
UpdateArticle updates article when article passed. purge cache.
func (*RPC) UpdateArticleCache ¶
func (r *RPC) UpdateArticleCache(c context.Context, arg *model.ArgAidCid, res *struct{}) (err error)
UpdateArticleCache adds article cache.
func (*RPC) UpdateAuthorCache ¶
UpdateAuthorCache update author cache
func (*RPC) UpdateHotspots ¶
UpdateHotspots update hotspots
func (*RPC) UpdateRecommends ¶
UpdateRecommends refresh recommend data.
func (*RPC) UpdateSortCache ¶
UpdateSortCache update sort cache
func (*RPC) UpperDrafts ¶
UpperDrafts get article drafts by mid