Documentation ¶
Index ¶
- Constants
- func Fetch(idReplyMap map[int64]*model.Reply, ids []int64) []*model.Reply
- func InsertInto(ids []int64, id int64, size int, cmp model.Comp) []int64
- func NeedInsertPendingReply(params *model.CursorParams, sub *model.Subject) bool
- func Remove(arr []int64, k int64) []int64
- func RepressEmotions(msg string, emoCodes []string) string
- func Unique(arr []int64) []int64
- type Service
- func (s *Service) AddAction(c context.Context, mid, oid, rpID int64, tp, action int8, ...) (err error)
- func (s *Service) AddFilteredReply(c context.Context, rpID, oid, mid int64, tp, level int8, message string, ...) (err error)
- func (s *Service) AddReply(c context.Context, mid, oid int64, tp, plat int8, ats []int64, ...) (r *reply.Reply, uri string, err error)
- func (s *Service) AddReplyReply(c context.Context, mid, oid, rootID, parentID int64, tp, plat int8, ...) (r *reply.Reply, uri string, err error)
- func (s *Service) AddReport(c context.Context, mid, oid, rpID int64, tp, reason int8, ...) (cd int, err error)
- func (s *Service) AdminAddTop(c context.Context, adid, oid, rpID int64, tp, act int8) (err error)
- func (s *Service) AdminDelete(c context.Context, adid, oid, rpID, ftime int64, tp int8, moral int, ...) (err error)
- func (s *Service) AdminDeleteByReport(c context.Context, adid, oid, rpID, ftime int64, tp int8, moral int, ...) (err error)
- func (s *Service) AdminEdit(c context.Context, adid, oid, rpID int64, tp int8, msg, remark string) (err error)
- func (s *Service) AdminGetSubject(c context.Context, oid int64, tp int8) (sub *reply.Subject, err error)
- func (s *Service) AdminPass(c context.Context, adid, oid, rpID int64, tp int8, remark string) (err error)
- func (s *Service) AdminRecover(c context.Context, adid, oid, rpID int64, tp int8, remark string) (err error)
- func (s *Service) AdminReportIgnore(c context.Context, adid, oid, rpID int64, tp, audit int8, remark string) (err error)
- func (s *Service) AdminReportRecover(c context.Context, adid, oid, rpID int64, tp, audit int8, remark string) (err error)
- func (s *Service) AdminReportStateSet(c context.Context, adid, oid, rpID int64, tp, state int8) (err error)
- func (s *Service) AdminReportTransfer(c context.Context, adid, oid, rpID int64, tp, audit int8) (err error)
- func (s *Service) AdminSubRegist(c context.Context, oid, mid int64, tp, state int8, appkey string) (err error)
- func (s Service) AdminSubjectMid(c context.Context, adid, mid, oid int64, tp int8, remark string) (err error)
- func (s *Service) AdminSubjectState(c context.Context, adid, oid, mid int64, tp, state int8, remark string) (err error)
- func (s *Service) AliasToType(alias string) (t int32, exists bool)
- func (s *Service) Captcha(c context.Context, mid int64) (string, error)
- func (s *Service) CheckAssist(c context.Context, mid, uid int64) (assisted bool, operation bool)
- func (s *Service) Close()
- func (s *Service) ContainUrls(msg string) bool
- func (s *Service) Delete(c context.Context, mid, oid, rpID int64, tp int8, ak, ck, platform string, ...) (err error)
- func (s *Service) Dialog(c context.Context, mid, oid int64, tp int8, root, dialog int64, pn, ps int, ...) (rps []*model.Reply, err error)
- func (s *Service) DialogByCursor(c context.Context, mid, oid int64, tp int8, root, dialog int64, ...) (rps []*model.Reply, dialogCursor *model.DialogCursor, ...)
- func (s *Service) DialogMaxMinFloor(c context.Context, oid int64, tp int8, root, dialog int64) (maxFloor, minFloor int, err error)
- func (s *Service) EmojiReplace(plat int8, build int64, roots ...*model.Reply)
- func (s *Service) EmojiReplaceI(mobiAPP string, build int64, roots ...*model.Reply)
- func (s *Service) Emojis(c context.Context) (emo []*reply.EmojiPackage)
- func (s *Service) FetchFans(c context.Context, uids []int64, mid int64) (fans map[int64]*reply.FansDetail, err error)
- func (s *Service) FilDelReply(rps []*model.Reply) (filtedRps []*model.Reply)
- func (s *Service) FillRootReplies(ctx context.Context, rs []*model.Reply, mid int64, ip string, htmlEscape bool, ...)
- func (s *Service) GetAccountInfoMap(ctx context.Context, mids []int64, ip string) (map[int64]*accmdl.Card, error)
- func (s *Service) GetAssistMap(ctx context.Context, mid int64, ip string) (assistMap map[int64]int, err error)
- func (s *Service) GetBlacklist(c context.Context, mid int64) (blacklistMap map[int64]bool, err error)
- func (s *Service) GetBlacklistMap(ctx context.Context, mid int64, ip string) (map[int64]bool, error)
- func (s *Service) GetChildrenIDsByCursor(ctx context.Context, sub *model.Subject, rootID int64, sort int8, ...) ([]int64, error)
- func (s *Service) GetFansMap(ctx context.Context, uids []int64, mid int64, ip string) (map[int64]*model.FansDetail, error)
- func (s *Service) GetPendingReply(ctx context.Context, mid int64, oid int64, typ int8) (map[int64]*model.Reply, error)
- func (s *Service) GetRelationMap(ctx context.Context, mid int64, targetMids []int64, ip string) (map[int64]*accmdl.RelationReply, error)
- func (s *Service) GetReply(c context.Context, oid, rpID int64, tp int8) (*reply.Reply, error)
- func (s *Service) GetReplyByIDs(ctx context.Context, oid int64, otyp int8, ids []int64) (map[int64]*model.Reply, error)
- func (s *Service) GetReplyCounts(ctx context.Context, oids []int64, otyp int8) (map[int64]*model.Counts, error)
- func (s *Service) GetReplyFromDBByIDs(ctx context.Context, oid int64, otyp int8, ids []int64) ([]*model.Reply, error)
- func (s *Service) GetReplyLogConfig(c context.Context, sub *reply.Subject, category int8) (config *reply.Config, err error)
- func (s *Service) GetRootReply(c context.Context, oid, rpID int64, tp int8) (*reply.Reply, error)
- func (s *Service) GetRootReplyIDs(ctx context.Context, oid int64, otyp int8, sort int8, offset, limit int64) ([]int64, error)
- func (s *Service) GetRootReplyIDsByCursor(ctx context.Context, sub *model.Subject, sort int8, cursor *model.Cursor) ([]int64, error)
- func (s *Service) GetRootReplyListByCursor(ctx context.Context, params *model.CursorParams) (*model.RootReplyList, error)
- func (s *Service) GetRootReplyListHeader(ctx context.Context, sub *model.Subject, params *model.CursorParams) (*model.RootReplyListHeader, error)
- func (s *Service) GetSubReplyListByCursor(ctx context.Context, params *model.CursorParams) (*model.RootReplyList, error)
- func (s *Service) GetSubject(ctx context.Context, oid int64, tp int8) (*model.Subject, error)
- func (s *Service) GetTop(c context.Context, sub *reply.Subject, oid int64, tp int8, top uint32) (r *reply.Reply, err error)
- func (s *Service) GetTopReply(ctx context.Context, oid int64, otyp int8, topType uint32) (*model.Reply, error)
- func (s *Service) Hide(c context.Context, oid, mid, rpID int64, tp int8, ak, ck string) (err error)
- func (s *Service) HotsBatch(c context.Context, tp, size int8, oids []int64, mid int64) (res map[int64][]*reply.Reply, err error)
- func (s *Service) IDReplyMap(ctx context.Context, sub *model.Subject, ...) (map[int64]*model.Reply, error)
- func (s *Service) IsBnj(oid int64, tp int8) bool
- func (s *Service) IsHotReply(c context.Context, tp int8, oid, rpID int64) (isHot bool, err error)
- func (s *Service) IsWhiteAid(aid int64, tp int8) bool
- func (s *Service) JumpReplies(c context.Context, mid, oid, rpID int64, tp int8, ps, sndPs int, escape bool) (roots, hots []*model.Reply, topAdmin, topUpper *model.Reply, ...)
- func (s *Service) ListBusiness(c context.Context) (business []*reply.Business, err error)
- func (s *Service) NewCursorByReplyID(ctx context.Context, oid int64, otyp int8, replyID int64, size int, ...) (*model.Cursor, error)
- func (s *Service) NewSubCursorByReplyID(ctx context.Context, oid int64, otyp int8, replyID int64, size int, ...) (rootID int64, cursor *model.Cursor, err error)
- func (s *Service) PaginateUpperDeletedLogs(c context.Context, oid int64, tp int, curPage, pageSize int) (logs []*adminlog.AdminLog, replyCount, reportCount, pageCount, total int64, ...)
- func (s *Service) ParentChildrenReplyIDRelation(ctx context.Context, sub *model.Subject, parentIDs []int64) (map[int64][]int64, error)
- func (s *Service) Ping(c context.Context) (err error)
- func (s *Service) Records(c context.Context, types []int64, mid, stime, etime int64, order, sort string, ...) (res []*model.Record, total int32, err error)
- func (s *Service) RelationBlocked(c context.Context, srcMid, targetMid int64) bool
- func (s *Service) Reply(c context.Context, oid int64, tp int8, rpID int64) (r *reply.Reply, err error)
- func (s *Service) ReplyContent(c context.Context, oid, rpID int64, tp int8) (r *model.Reply, err error)
- func (s *Service) ReplyCount(c context.Context, oid int64, tp int8) (count int, err error)
- func (s *Service) ReplyCounts(c context.Context, oids []int64, tp int8) (counts map[int64]int, err error)
- func (s *Service) ReplyHots(c context.Context, oid int64, typ int8, pn, ps int) (sub *model.Subject, res []*model.Reply, err error)
- func (s *Service) ReportRelated(c context.Context, mid, oid, rpid int64, tp int8, escape bool) (sub *model.Subject, root *model.Reply, related []*model.Reply, err error)
- func (s *Service) ReportReply(c context.Context, mid, oid, rpid int64, tp int8, pn, ps int, escape bool) (sub *model.Subject, root *model.Reply, seconds []*model.Reply, err error)
- func (s *Service) ResetFloor(rps ...*model.Reply)
- func (s *Service) RootFoldedReply(ctx context.Context, req *xmodel.RootFolderReq) (res *xmodel.RootFolderRes, err error)
- func (s *Service) RootReplies(c context.Context, params *model.PageParams) (page *model.PageResult, err error)
- func (s *Service) RootReplyListByCursor(ctx context.Context, sub *model.Subject, params *model.CursorParams) ([]*model.Reply, error)
- func (s *Service) RplyNotice(c context.Context, plat int8, build int64, app, buvid string) (n *model.Notice)
- func (s *Service) SecondReplies(c context.Context, mid, oid, rootID, jumpID int64, tp int8, pn, ps int, ...) (seconds []*model.Reply, root *model.Reply, upMid int64, toPn int, err error)
- func (s *Service) Show(c context.Context, oid, mid, rpID int64, tp int8, ak, ck string) (err error)
- func (s *Service) ShowFloor(oid int64, tp int8) bool
- func (s *Service) SubFoldedReply(ctx context.Context, req *xmodel.SubFolderReq) (res *xmodel.SubFolderRes, err error)
- func (s *Service) Subject(c context.Context, oid int64, tp int8) (*reply.Subject, error)
- func (s *Service) SuperviseReply(c context.Context, mid int64, ak, ck string, tp int8) (err error)
- func (s *Service) TitleLink(c context.Context, oid int64, typ int8) (title, link string, typeId int32, err error)
- func (s *Service) Topics(c context.Context, mid int64, oid int64, typ int8, msg string) (topics []string, err error)
- func (s *Service) TypeToAlias(t int32) (alias string, exists bool)
- func (s *Service) UpperAddTop(c context.Context, mid, oid, rpID int64, tp, act int8, platform string, ...) (err error)
- func (s *Service) UseBigdata(c context.Context, b bool, per int64) bool
- func (s *Service) UserBlockStatus(c context.Context, mid int64) (int, error)
- func (s *Service) ValidUserAction(c context.Context, profile *accmdl.Profile) (err error)
- func (s *Service) ValidUserStatus(c context.Context, profile *accmdl.Profile, isUpper bool) (err error)
- func (s *Service) VerifyCaptcha(c context.Context, captcha string, mid int64) error
- func (s *Service) Xreply(ctx context.Context, req *xmodel.ReplyReq) (res *xmodel.ReplyRes, err error)
Constants ¶
const ( StatusNormal = 1 StatusNeedContest = 2 StatusForbidden = 3 )
status
Variables ¶
This section is empty.
Functions ¶
func InsertInto ¶
InsertInto insert `id` into sorted list(order by `cmp`) `ids` after insertion if the total length > `size`, truncate the extra element
func NeedInsertPendingReply ¶
func NeedInsertPendingReply(params *model.CursorParams, sub *model.Subject) bool
NeedInsertPendingReply NeedInsertPendingReply
func RepressEmotions ¶
RepressEmotions RepressEmotions
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is reply service
func (*Service) AddAction ¶
func (s *Service) AddAction(c context.Context, mid, oid, rpID int64, tp, action int8, ak, ck, op, platform, buvid string, build int64) (err error)
AddAction do act or cancel act for a reply.
func (*Service) AddFilteredReply ¶
func (s *Service) AddFilteredReply(c context.Context, rpID, oid, mid int64, tp, level int8, message string, now time.Time) (err error)
AddFilteredReply AddFilteredReply
func (*Service) AddReply ¶
func (s *Service) AddReply(c context.Context, mid, oid int64, tp, plat int8, ats []int64, accessKey, cookie, captcha, msg, dev, ver, platform string, build int64, buvid string) (r *reply.Reply, uri string, err error)
AddReply add a reply.
func (*Service) AddReplyReply ¶
func (s *Service) AddReplyReply(c context.Context, mid, oid, rootID, parentID int64, tp, plat int8, ats []int64, accessKey, cookie, captcha, msg, dev, ver, platform string, build int64, buvid string) (r *reply.Reply, uri string, err error)
AddReplyReply add reply to a root reply.
func (*Service) AddReport ¶
func (s *Service) AddReport(c context.Context, mid, oid, rpID int64, tp, reason int8, cont, platform string, build int64, buvid string) (cd int, err error)
AddReport report a reply.
func (*Service) AdminAddTop ¶
AdminAddTop add top reply by admin
func (*Service) AdminDelete ¶
func (s *Service) AdminDelete(c context.Context, adid, oid, rpID, ftime int64, tp int8, moral int, notify bool, adname, remark string, reason, freason int8) (err error)
AdminDelete delete reply by admin.
func (*Service) AdminDeleteByReport ¶
func (s *Service) AdminDeleteByReport(c context.Context, adid, oid, rpID, ftime int64, tp int8, moral int, notify bool, adname, remark string, audit int8, reason int8, content string, freason int8) (err error)
AdminDeleteByReport delete report reply by admin.
func (*Service) AdminEdit ¶
func (s *Service) AdminEdit(c context.Context, adid, oid, rpID int64, tp int8, msg, remark string) (err error)
AdminEdit edit reply content by admin.
func (*Service) AdminGetSubject ¶
func (s *Service) AdminGetSubject(c context.Context, oid int64, tp int8) (sub *reply.Subject, err error)
AdminGetSubject get subject state
func (*Service) AdminPass ¶
func (s *Service) AdminPass(c context.Context, adid, oid, rpID int64, tp int8, remark string) (err error)
AdminPass recover reply by admin.
func (*Service) AdminRecover ¶
func (s *Service) AdminRecover(c context.Context, adid, oid, rpID int64, tp int8, remark string) (err error)
AdminRecover recover reply by admin.
func (*Service) AdminReportIgnore ¶
func (s *Service) AdminReportIgnore(c context.Context, adid, oid, rpID int64, tp, audit int8, remark string) (err error)
AdminReportIgnore ignore report by admin.
func (*Service) AdminReportRecover ¶
func (s *Service) AdminReportRecover(c context.Context, adid, oid, rpID int64, tp, audit int8, remark string) (err error)
AdminReportRecover recover report by admin.
func (*Service) AdminReportStateSet ¶
func (s *Service) AdminReportStateSet(c context.Context, adid, oid, rpID int64, tp, state int8) (err error)
AdminReportStateSet set report state by admin.
func (*Service) AdminReportTransfer ¶
func (s *Service) AdminReportTransfer(c context.Context, adid, oid, rpID int64, tp, audit int8) (err error)
AdminReportTransfer transfer report by admin.
func (*Service) AdminSubRegist ¶
func (s *Service) AdminSubRegist(c context.Context, oid, mid int64, tp, state int8, appkey string) (err error)
AdminSubRegist register subject of new archive
func (Service) AdminSubjectMid ¶
func (s Service) AdminSubjectMid(c context.Context, adid, mid, oid int64, tp int8, remark string) (err error)
AdminSubjectMid set the subject mid info.
func (*Service) AdminSubjectState ¶
func (s *Service) AdminSubjectState(c context.Context, adid, oid, mid int64, tp, state int8, remark string) (err error)
AdminSubjectState change subject state by admin.
func (*Service) AliasToType ¶
AliasToType map alias to type
func (*Service) CheckAssist ¶
CheckAssist check whether upper grant the supervision permission for user
func (*Service) ContainUrls ¶
ContainUrls ContainUrls
func (*Service) Delete ¶
func (s *Service) Delete(c context.Context, mid, oid, rpID int64, tp int8, ak, ck, platform string, build int64, buvid string) (err error)
Delete delete reply by upper or self.
func (*Service) Dialog ¶
func (s *Service) Dialog(c context.Context, mid, oid int64, tp int8, root, dialog int64, pn, ps int, escape bool) (rps []*model.Reply, err error)
Dialog ...
func (*Service) DialogByCursor ¶
func (s *Service) DialogByCursor(c context.Context, mid, oid int64, tp int8, root, dialog int64, cursor *model.Cursor) (rps []*model.Reply, dialogCursor *model.DialogCursor, dialogMeta *model.DialogMeta, err error)
DialogByCursor ...
func (*Service) DialogMaxMinFloor ¶
func (s *Service) DialogMaxMinFloor(c context.Context, oid int64, tp int8, root, dialog int64) (maxFloor, minFloor int, err error)
DialogMaxMinFloor return max and min floor in dialog
func (*Service) EmojiReplace ¶
EmojiReplace EmojiReplace
func (*Service) EmojiReplaceI ¶
EmojiReplaceI EmojiReplace international
func (*Service) Emojis ¶
func (s *Service) Emojis(c context.Context) (emo []*reply.EmojiPackage)
Emojis get vip emojis
func (*Service) FetchFans ¶
func (s *Service) FetchFans(c context.Context, uids []int64, mid int64) (fans map[int64]*reply.FansDetail, err error)
FetchFans fetching a fans relation array between upper(mid) and the users(uids)
func (*Service) FilDelReply ¶
FilDelReply delete reply which is deleted
func (*Service) FillRootReplies ¶
func (s *Service) FillRootReplies(ctx context.Context, rs []*model.Reply, mid int64, ip string, htmlEscape bool, sub *model.Subject)
FillRootReplies FillRootReplies
func (*Service) GetAccountInfoMap ¶
func (s *Service) GetAccountInfoMap(ctx context.Context, mids []int64, ip string) (map[int64]*accmdl.Card, error)
GetAccountInfoMap fn
func (*Service) GetAssistMap ¶
func (s *Service) GetAssistMap(ctx context.Context, mid int64, ip string) (assistMap map[int64]int, err error)
GetAssistMap fn
func (*Service) GetBlacklist ¶
func (s *Service) GetBlacklist(c context.Context, mid int64) (blacklistMap map[int64]bool, err error)
GetBlacklist get account infos of mids
func (*Service) GetBlacklistMap ¶
func (s *Service) GetBlacklistMap(ctx context.Context, mid int64, ip string) (map[int64]bool, error)
GetBlacklistMap GetBlacklistMap
func (*Service) GetChildrenIDsByCursor ¶
func (s *Service) GetChildrenIDsByCursor(ctx context.Context, sub *model.Subject, rootID int64, sort int8, cursor *model.Cursor) ([]int64, error)
GetChildrenIDsByCursor GetChildrenIDsByCursor
func (*Service) GetFansMap ¶
func (s *Service) GetFansMap(ctx context.Context, uids []int64, mid int64, ip string) (map[int64]*model.FansDetail, error)
GetFansMap fn
func (*Service) GetPendingReply ¶
func (s *Service) GetPendingReply(ctx context.Context, mid int64, oid int64, typ int8) (map[int64]*model.Reply, error)
GetPendingReply GetPendingReply
func (*Service) GetRelationMap ¶
func (s *Service) GetRelationMap(ctx context.Context, mid int64, targetMids []int64, ip string) (map[int64]*accmdl.RelationReply, error)
GetRelationMap GetRelationMap
func (*Service) GetReplyByIDs ¶
func (s *Service) GetReplyByIDs(ctx context.Context, oid int64, otyp int8, ids []int64) (map[int64]*model.Reply, error)
GetReplyByIDs GetReplyByIDs
func (*Service) GetReplyCounts ¶
func (s *Service) GetReplyCounts(ctx context.Context, oids []int64, otyp int8) (map[int64]*model.Counts, error)
GetReplyCounts get reply counts.
func (*Service) GetReplyFromDBByIDs ¶
func (s *Service) GetReplyFromDBByIDs(ctx context.Context, oid int64, otyp int8, ids []int64) ([]*model.Reply, error)
GetReplyFromDBByIDs GetReplyFromDBByIDs
func (*Service) GetReplyLogConfig ¶
func (s *Service) GetReplyLogConfig(c context.Context, sub *reply.Subject, category int8) (config *reply.Config, err error)
GetReplyLogConfig get reply configuration from memocached or load a record from database by oid, type, category
func (*Service) GetRootReply ¶
GetRootReply GetRootReply
func (*Service) GetRootReplyIDs ¶
func (s *Service) GetRootReplyIDs(ctx context.Context, oid int64, otyp int8, sort int8, offset, limit int64) ([]int64, error)
GetRootReplyIDs GetRootReplyIDs
func (*Service) GetRootReplyIDsByCursor ¶
func (s *Service) GetRootReplyIDsByCursor(ctx context.Context, sub *model.Subject, sort int8, cursor *model.Cursor) ([]int64, error)
GetRootReplyIDsByCursor GetRootReplyIDsByCursor
func (*Service) GetRootReplyListByCursor ¶
func (s *Service) GetRootReplyListByCursor(ctx context.Context, params *model.CursorParams) (*model.RootReplyList, error)
GetRootReplyListByCursor GetRootReplyListByCursor
func (*Service) GetRootReplyListHeader ¶
func (s *Service) GetRootReplyListHeader(ctx context.Context, sub *model.Subject, params *model.CursorParams) (*model.RootReplyListHeader, error)
GetRootReplyListHeader GetRootReplyListHeader
func (*Service) GetSubReplyListByCursor ¶
func (s *Service) GetSubReplyListByCursor(ctx context.Context, params *model.CursorParams) (*model.RootReplyList, error)
GetSubReplyListByCursor GetSubReplyListByCursor
func (*Service) GetSubject ¶
GetSubject GetSubject
func (*Service) GetTop ¶
func (s *Service) GetTop(c context.Context, sub *reply.Subject, oid int64, tp int8, top uint32) (r *reply.Reply, err error)
GetTop get upperTop reply from cache or db.
func (*Service) GetTopReply ¶
func (s *Service) GetTopReply(ctx context.Context, oid int64, otyp int8, topType uint32) (*model.Reply, error)
GetTopReply GetTopReply
func (*Service) HotsBatch ¶
func (s *Service) HotsBatch(c context.Context, tp, size int8, oids []int64, mid int64) (res map[int64][]*reply.Reply, err error)
HotsBatch return HotsBatch
func (*Service) IDReplyMap ¶
func (s *Service) IDReplyMap(ctx context.Context, sub *model.Subject, parentChildrenIDRelation map[int64][]int64) (map[int64]*model.Reply, error)
IDReplyMap IDReplyMap
func (*Service) IsHotReply ¶
IsHotReply IsHotReply
func (*Service) IsWhiteAid ¶
IsWhiteAid IsWhiteAid
func (*Service) JumpReplies ¶
func (s *Service) JumpReplies(c context.Context, mid, oid, rpID int64, tp int8, ps, sndPs int, escape bool) (roots, hots []*model.Reply, topAdmin, topUpper *model.Reply, sub *model.Subject, pn, sndPn, total int, err error)
JumpReplies jump to page by reply id.
func (*Service) ListBusiness ¶
ListBusiness return all non-deleted business record.
func (*Service) NewCursorByReplyID ¶
func (s *Service) NewCursorByReplyID(ctx context.Context, oid int64, otyp int8, replyID int64, size int, cmp model.Comp) (*model.Cursor, error)
NewCursorByReplyID NewCursorByReplyID
func (*Service) NewSubCursorByReplyID ¶
func (s *Service) NewSubCursorByReplyID(ctx context.Context, oid int64, otyp int8, replyID int64, size int, cmp model.Comp) (rootID int64, cursor *model.Cursor, err error)
NewSubCursorByReplyID NewSubCursorByReplyID
func (*Service) PaginateUpperDeletedLogs ¶
func (s *Service) PaginateUpperDeletedLogs(c context.Context, oid int64, tp int, curPage, pageSize int) (logs []*adminlog.AdminLog, replyCount, reportCount, pageCount, total int64, err error)
PaginateUpperDeletedLogs paginating the admin logs for size of 'pageSize', and returning the number of reporting, the number of admin logs delete by administrator
func (*Service) ParentChildrenReplyIDRelation ¶
func (s *Service) ParentChildrenReplyIDRelation(ctx context.Context, sub *model.Subject, parentIDs []int64) (map[int64][]int64, error)
ParentChildrenReplyIDRelation ParentChildrenReplyIDRelation
func (*Service) Records ¶
func (s *Service) Records(c context.Context, types []int64, mid, stime, etime int64, order, sort string, pn, ps int32) (res []*model.Record, total int32, err error)
Records return reply record from es.
func (*Service) RelationBlocked ¶
RelationBlocked RelationBlocked
func (*Service) Reply ¶
func (s *Service) Reply(c context.Context, oid int64, tp int8, rpID int64) (r *reply.Reply, err error)
Reply get reply from cache or db. NOTE old php api call TODO mobile jump
func (*Service) ReplyContent ¶
func (s *Service) ReplyContent(c context.Context, oid, rpID int64, tp int8) (r *model.Reply, err error)
ReplyContent get reply and content.
func (*Service) ReplyCount ¶
ReplyCount get all reply count.
func (*Service) ReplyCounts ¶
func (s *Service) ReplyCounts(c context.Context, oids []int64, tp int8) (counts map[int64]int, err error)
ReplyCounts get all reply count.
func (*Service) ReplyHots ¶
func (s *Service) ReplyHots(c context.Context, oid int64, typ int8, pn, ps int) (sub *model.Subject, res []*model.Reply, err error)
ReplyHots return the hot replies.
func (*Service) ReportRelated ¶
func (s *Service) ReportRelated(c context.Context, mid, oid, rpid int64, tp int8, escape bool) (sub *model.Subject, root *model.Reply, related []*model.Reply, err error)
ReportRelated get related replies of report.
func (*Service) ReportReply ¶
func (s *Service) ReportReply(c context.Context, mid, oid, rpid int64, tp int8, pn, ps int, escape bool) (sub *model.Subject, root *model.Reply, seconds []*model.Reply, err error)
ReportReply get report reply.
func (*Service) RootFoldedReply ¶
func (s *Service) RootFoldedReply(ctx context.Context, req *xmodel.RootFolderReq) (res *xmodel.RootFolderRes, err error)
RootFoldedReply ...
func (*Service) RootReplies ¶
func (s *Service) RootReplies(c context.Context, params *model.PageParams) (page *model.PageResult, err error)
RootReplies return a page list of reply.
func (*Service) RootReplyListByCursor ¶
func (s *Service) RootReplyListByCursor(ctx context.Context, sub *model.Subject, params *model.CursorParams) ([]*model.Reply, error)
RootReplyListByCursor RootReplyListByCursor
func (*Service) RplyNotice ¶
func (s *Service) RplyNotice(c context.Context, plat int8, build int64, app, buvid string) (n *model.Notice)
RplyNotice return a reply notice from memory.
func (*Service) SecondReplies ¶
func (s *Service) SecondReplies(c context.Context, mid, oid, rootID, jumpID int64, tp int8, pn, ps int, escape bool) (seconds []*model.Reply, root *model.Reply, upMid int64, toPn int, err error)
SecondReplies return second replies.
func (*Service) SubFoldedReply ¶
func (s *Service) SubFoldedReply(ctx context.Context, req *xmodel.SubFolderReq) (res *xmodel.SubFolderRes, err error)
SubFoldedReply ...
func (*Service) SuperviseReply ¶
SuperviseReply Supervise Reply
func (*Service) TitleLink ¶
func (s *Service) TitleLink(c context.Context, oid int64, typ int8) (title, link string, typeId int32, err error)
TitleLink TitleLink
func (*Service) Topics ¶
func (s *Service) Topics(c context.Context, mid int64, oid int64, typ int8, msg string) (topics []string, err error)
Topics return topics
func (*Service) TypeToAlias ¶
TypeToAlias map type to alias
func (*Service) UpperAddTop ¶
func (s *Service) UpperAddTop(c context.Context, mid, oid, rpID int64, tp, act int8, platform string, build int64, buvid string) (err error)
UpperAddTop add top reply by upper
func (*Service) UseBigdata ¶
UseBigdata use bigdata switch
func (*Service) UserBlockStatus ¶
UserBlockStatus UserBlockStatus
func (*Service) ValidUserAction ¶
ValidUserAction validate reply user status for like/hate action.
func (*Service) ValidUserStatus ¶
func (s *Service) ValidUserStatus(c context.Context, profile *accmdl.Profile, isUpper bool) (err error)
ValidUserStatus validate reply user status
func (*Service) VerifyCaptcha ¶
VerifyCaptcha VerifyCaptcha