Documentation ¶
Index ¶
- type ReplyAdminLog
- type Service
- func (s *Service) ActionCount(c context.Context, rpID, oid, adminID int64, typ int32) (like, hate int32, err error)
- func (s *Service) AddBusiness(c context.Context, tp int32, name, appkey, remark, alias string) (id int64, err error)
- func (s *Service) AddReplyConfig(c context.Context, m *model.Config) (id int64, err error)
- func (s *Service) AddTop(c context.Context, adid int64, adName string, oid, rpID int64, typ int32, ...) (err error)
- func (s *Service) AdminDeleteReply(c context.Context, adminID int64, oids, rpIDs []int64, ftime int64, typ int32, ...) (err error)
- func (s *Service) AdminEditReply(c context.Context, adminID int64, adName string, oid, rpID int64, tp int32, ...) (err error)
- func (s *Service) AdminPassReply(c context.Context, adid int64, adName string, oids, rpIDs []int64, typ int32, ...) (err error)
- func (s *Service) AdminRecoverReply(c context.Context, adminID int64, adName string, oid, rpID int64, typ int32, ...) (err error)
- func (s *Service) CallbackDeleteReply(ctx context.Context, adminID int64, oid, rpID int64, ftime int64, typ int32, ...) (err error)
- func (s *Service) CreateEmoji(c context.Context, pid int64, name string, url string, sort int32, state int32, ...) (id int64, err error)
- func (s *Service) CreateEmojiPackage(c context.Context, name string, url string, sort int32, remark string, ...) (id int64, err error)
- func (s *Service) CreateNotice(c context.Context, nt *model.Notice) (lastID int64, err error)
- func (s *Service) DeleteNotice(c context.Context, id uint32) (err error)
- func (s *Service) EmojiByName(c context.Context, name string) (err error)
- func (s *Service) EmojiList(c context.Context, pid int64) (emojis []*model.Emoji, err error)
- func (s *Service) EmojiPackageList(c context.Context) (resp []*model.EmojiPackage, err error)
- func (s *Service) ExportReply(c context.Context, oid, mid int64, tp int8, state string, ...) (data [][]string, err error)
- func (s *Service) FoldReplies(ctx context.Context, oids, tps, rpIDs []int64) (err error)
- func (s *Service) FreezeSub(c context.Context, adid int64, adName string, oids []int64, typ int32, ...) (fails map[int64]string, err error)
- func (s *Service) GetBusiness(c context.Context, tp int32) (business *model.Business, err error)
- func (s *Service) GetNotice(c context.Context, id uint32) (nt *model.Notice, err error)
- func (s *Service) ListBusiness(c context.Context, state int32) (business []*model.Business, err error)
- func (s *Service) ListNotice(c context.Context, page, pageSize int64) (nts []*model.Notice, total int64, err error)
- func (s *Service) LoadReplyConfig(c context.Context, typ, category int32, oid int64) (m *model.Config, err error)
- func (s *Service) LogsByRpID(c context.Context, rpID int64) (res []ReplyAdminLog, err error)
- func (s *Service) MarkAsSpam(c context.Context, oids, rpIDs []int64, adminID int64, ...) (err error)
- func (s *Service) ModifySubState(c context.Context, adid int64, adName string, oids []int64, typ int32, ...) (fails map[int64]string, err error)
- func (s *Service) MointorLog(c context.Context, sp model.LogSearchParam) (result *model.MonitorLogResult, err error)
- func (s *Service) MonitorSearch(c context.Context, sp *model.SearchMonitorParams, page, pageSize int64) (res *model.SearchMonitorResult, err error)
- func (s *Service) MonitorStats(c context.Context, mode, page, pageSize int64, ...) (res *model.StatsMonitorResult, err error)
- func (s *Service) NotifyTroll(c context.Context, mid int64) (err error)
- func (s *Service) PaginateReplyConfig(c context.Context, typ, category int32, oid int64, operator string, ...) (configs []*model.Config, totalCount, pages int64, err error)
- func (s *Service) Ping(c context.Context) (err error)
- func (s *Service) RenewReplyConfig(c context.Context, id int64) (result bool, err error)
- func (s *Service) ReplyList(c context.Context, oids, rpids []int64) (res map[int64]*model.ReplyEx, err error)
- func (s *Service) ReplySearch(c context.Context, sp *model.SearchParams, page, pageSize int64) (res *model.SearchResult, err error)
- func (s *Service) ReplyTopLog(c context.Context, sp model.LogSearchParam) (result *model.ReplyTopLogResult, err error)
- func (s *Service) ReportDel(c context.Context, oids, rpIDs []int64, adminID, ftime int64, ...) (err error)
- func (s *Service) ReportIgnore(c context.Context, oids, rpIDs []int64, adminID int64, adName string, ...) (err error)
- func (s *Service) ReportRecover(c context.Context, oids, rpIDs []int64, adminID int64, typ, audit int32, ...) (err error)
- func (s *Service) ReportSearch(c context.Context, sp *model.SearchReportParams, page, pageSize int64) (res *model.SearchReportResult, err error)
- func (s *Service) ReportStateSet(c context.Context, oids, rpIDs []int64, adminID int64, adname string, ...) (err error)
- func (s *Service) ReportTransfer(c context.Context, oids, rpIDs []int64, adminID int64, adName string, ...) (err error)
- func (s *Service) Subject(c context.Context, oid int64, typ int32) (sub *model.Subject, err error)
- func (s *Service) SubjectLog(c context.Context, sp model.LogSearchParam) (res *model.SubjectLogRes, err error)
- func (s *Service) TitleLink(c context.Context, oid int64, typ int32) (title, link string, err error)
- func (s *Service) TopChildReply(c context.Context, rootID, childID, oid int64) (err error)
- func (s *Service) UpActionHate(c context.Context, rpID, oid, adminID int64, typ, count int32, remark string) (err error)
- func (s *Service) UpActionLike(c context.Context, rpID, oid, adminID int64, typ, count int32, remark string) (err error)
- func (s *Service) UpBusiness(c context.Context, name, appkey, remark, alias string, tp int32) (id int64, err error)
- func (s *Service) UpBusinessState(c context.Context, state, tp int32) (id int64, err error)
- func (s *Service) UpEmoji(c context.Context, name string, remark string, url string, id int64) (idx int64, err error)
- func (s *Service) UpEmojiPackage(c context.Context, name string, url string, remark string, state int32, ...) (idx int64, err error)
- func (s *Service) UpEmojiPackageSort(c context.Context, ids string) (err error)
- func (s *Service) UpEmojiSort(c context.Context, ids string) (err error)
- func (s *Service) UpEmojiState(c context.Context, state int32, id int64) (idx int64, err error)
- func (s *Service) UpMonitorState(c context.Context, adminID int64, adName string, oid int64, typ, state int32, ...) (err error)
- func (s *Service) UpdateNotice(c context.Context, nt *model.Notice) (err error)
- func (s *Service) UpdateNoticeStatus(c context.Context, status model.NoticeStatus, id uint32) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReplyAdminLog ¶
ReplyAdminLog ReplyAdminLog
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a service.
func (*Service) ActionCount ¶
func (s *Service) ActionCount(c context.Context, rpID, oid, adminID int64, typ int32) (like, hate int32, err error)
ActionCount return action exact count.
func (*Service) AddBusiness ¶
func (s *Service) AddBusiness(c context.Context, tp int32, name, appkey, remark, alias string) (id int64, err error)
AddBusiness add a business
func (*Service) AddReplyConfig ¶
AddReplyConfig create a new administrator configuration for reply business
func (*Service) AddTop ¶
func (s *Service) AddTop(c context.Context, adid int64, adName string, oid, rpID int64, typ int32, act uint32) (err error)
AddTop add a top reply.
func (*Service) AdminDeleteReply ¶
func (s *Service) AdminDeleteReply(c context.Context, adminID int64, oids, rpIDs []int64, ftime int64, typ int32, moral int32, notify bool, adminName, remark string, reason, freason int32) (err error)
AdminDeleteReply delete reply by admin.
func (*Service) AdminEditReply ¶
func (s *Service) AdminEditReply(c context.Context, adminID int64, adName string, oid, rpID int64, tp int32, msg, remark string) (err error)
AdminEditReply edit reply content by admin.
func (*Service) AdminPassReply ¶
func (s *Service) AdminPassReply(c context.Context, adid int64, adName string, oids, rpIDs []int64, typ int32, remark string) (err error)
AdminPassReply recover reply by admin.
func (*Service) AdminRecoverReply ¶
func (s *Service) AdminRecoverReply(c context.Context, adminID int64, adName string, oid, rpID int64, typ int32, remark string) (err error)
AdminRecoverReply recover reply by admin.
func (*Service) CallbackDeleteReply ¶
func (s *Service) CallbackDeleteReply(ctx context.Context, adminID int64, oid, rpID int64, ftime int64, typ int32, moral int32, adminName, remark string, reason, freason int32) (err error)
CallbackDeleteReply delete reply by admin.
func (*Service) CreateEmoji ¶
func (s *Service) CreateEmoji(c context.Context, pid int64, name string, url string, sort int32, state int32, remark string) (id int64, err error)
CreateEmoji CreateEmoji
func (*Service) CreateEmojiPackage ¶
func (s *Service) CreateEmojiPackage(c context.Context, name string, url string, sort int32, remark string, state int32) (id int64, err error)
CreateEmojiPackage CreateEmojiPackage
func (*Service) CreateNotice ¶
CreateNotice CreateNotice
func (*Service) DeleteNotice ¶
DeleteNotice DeleteNotice
func (*Service) EmojiByName ¶
EmojiByName EmojiByName
func (*Service) EmojiPackageList ¶
EmojiPackageList return all emojipackages and emojis
func (*Service) ExportReply ¶
func (s *Service) ExportReply(c context.Context, oid, mid int64, tp int8, state string, startTime, endTime time.Time) (data [][]string, err error)
ExportReply get exported replies by query
func (*Service) FoldReplies ¶
FoldReplies ...
func (*Service) FreezeSub ¶
func (s *Service) FreezeSub(c context.Context, adid int64, adName string, oids []int64, typ int32, freeze int32, remark string) (fails map[int64]string, err error)
FreezeSub freeze or unfreeze subject
func (*Service) GetBusiness ¶
GetBusiness return a business by type
func (*Service) ListBusiness ¶
func (s *Service) ListBusiness(c context.Context, state int32) (business []*model.Business, err error)
ListBusiness return all business
func (*Service) ListNotice ¶
func (s *Service) ListNotice(c context.Context, page, pageSize int64) (nts []*model.Notice, total int64, err error)
ListNotice ListNotice
func (*Service) LoadReplyConfig ¶
func (s *Service) LoadReplyConfig(c context.Context, typ, category int32, oid int64) (m *model.Config, err error)
LoadReplyConfig load a configuration record of reply business.
func (*Service) LogsByRpID ¶
LogsByRpID get log by reply id.
func (*Service) MarkAsSpam ¶
func (s *Service) MarkAsSpam(c context.Context, oids, rpIDs []int64, adminID int64, adminName, remark string) (err error)
MarkAsSpam mark a reply(normal state) as spam.
func (*Service) ModifySubState ¶
func (s *Service) ModifySubState(c context.Context, adid int64, adName string, oids []int64, typ int32, state int32, remark string) (fails map[int64]string, err error)
ModifySubState modify subject state
func (*Service) MointorLog ¶
func (s *Service) MointorLog(c context.Context, sp model.LogSearchParam) (result *model.MonitorLogResult, err error)
MointorLog MointorLog
func (*Service) MonitorSearch ¶
func (s *Service) MonitorSearch(c context.Context, sp *model.SearchMonitorParams, page, pageSize int64) (res *model.SearchMonitorResult, err error)
MonitorSearch return monitor result from search.
func (*Service) MonitorStats ¶
func (s *Service) MonitorStats(c context.Context, mode, page, pageSize int64, adminIDs, sort, order, startTime, endTime string) (res *model.StatsMonitorResult, err error)
MonitorStats return monitor stats.
func (*Service) NotifyTroll ¶
专门给喷子,带狗发送的消息通知, 20181206 针对大忽悠事件
func (*Service) PaginateReplyConfig ¶
func (s *Service) PaginateReplyConfig(c context.Context, typ, category int32, oid int64, operator string, offset, count int) (configs []*model.Config, totalCount, pages int64, err error)
PaginateReplyConfig paginate configuration list of records indexing from start to end, and a total count of records
func (*Service) RenewReplyConfig ¶
RenewReplyConfig reset reply configuration by default, with deleting the detail configurations from db
func (*Service) ReplyList ¶
func (s *Service) ReplyList(c context.Context, oids, rpids []int64) (res map[int64]*model.ReplyEx, err error)
ReplyList ReplyList
func (*Service) ReplySearch ¶
func (s *Service) ReplySearch(c context.Context, sp *model.SearchParams, page, pageSize int64) (res *model.SearchResult, err error)
ReplySearch return reply result from search.
func (*Service) ReplyTopLog ¶
func (s *Service) ReplyTopLog(c context.Context, sp model.LogSearchParam) (result *model.ReplyTopLogResult, err error)
ReplyTopLog ReplyTopLog
func (*Service) ReportDel ¶
func (s *Service) ReportDel(c context.Context, oids, rpIDs []int64, adminID, ftime int64, typ, audit, moral, reason, freason int32, notify bool, adminName, remark, content string) (err error)
ReportDel delete reply by report.
func (*Service) ReportIgnore ¶
func (s *Service) ReportIgnore(c context.Context, oids, rpIDs []int64, adminID int64, adName string, typ, audit int32, remark string, delReport bool) (err error)
ReportIgnore ignore a report.
func (*Service) ReportRecover ¶
func (s *Service) ReportRecover(c context.Context, oids, rpIDs []int64, adminID int64, typ, audit int32, remark string) (err error)
ReportRecover recover a report reply.
func (*Service) ReportSearch ¶
func (s *Service) ReportSearch(c context.Context, sp *model.SearchReportParams, page, pageSize int64) (res *model.SearchReportResult, err error)
ReportSearch return report result from search.
func (*Service) ReportStateSet ¶
func (s *Service) ReportStateSet(c context.Context, oids, rpIDs []int64, adminID int64, adname string, typ, state int32, remark string, delReport bool) (err error)
ReportStateSet transfer a report.
func (*Service) ReportTransfer ¶
func (s *Service) ReportTransfer(c context.Context, oids, rpIDs []int64, adminID int64, adName string, typ, audit int32, remark string) (err error)
ReportTransfer transfer a report.
func (*Service) SubjectLog ¶
func (s *Service) SubjectLog(c context.Context, sp model.LogSearchParam) (res *model.SubjectLogRes, err error)
SubjectLog returns operation logs by query parameters
func (*Service) TitleLink ¶
func (s *Service) TitleLink(c context.Context, oid int64, typ int32) (title, link string, err error)
TitleLink TitleLink
func (*Service) TopChildReply ¶
TopChildReply ...
func (*Service) UpActionHate ¶
func (s *Service) UpActionHate(c context.Context, rpID, oid, adminID int64, typ, count int32, remark string) (err error)
UpActionHate update action hate.
func (*Service) UpActionLike ¶
func (s *Service) UpActionLike(c context.Context, rpID, oid, adminID int64, typ, count int32, remark string) (err error)
UpActionLike update action like.
func (*Service) UpBusiness ¶
func (s *Service) UpBusiness(c context.Context, name, appkey, remark, alias string, tp int32) (id int64, err error)
UpBusiness update a business's name appkey and remark
func (*Service) UpBusinessState ¶
UpBusinessState update a business's state
func (*Service) UpEmoji ¶
func (s *Service) UpEmoji(c context.Context, name string, remark string, url string, id int64) (idx int64, err error)
UpEmoji UpEmoji
func (*Service) UpEmojiPackage ¶
func (s *Service) UpEmojiPackage(c context.Context, name string, url string, remark string, state int32, id int64) (idx int64, err error)
UpEmojiPackage UpEmojiPackage
func (*Service) UpEmojiPackageSort ¶
UpEmojiPackageSort UpEmojiPackageSort
func (*Service) UpEmojiSort ¶
UpEmojiSort UpEmojiSort
func (*Service) UpEmojiState ¶
UpEmojiState UpEmojiState
func (*Service) UpMonitorState ¶
func (s *Service) UpMonitorState(c context.Context, adminID int64, adName string, oid int64, typ, state int32, remark string) (err error)
UpMonitorState set monitor state into subject attr.
func (*Service) UpdateNotice ¶
UpdateNotice UpdateNotice
func (*Service) UpdateNoticeStatus ¶
func (s *Service) UpdateNoticeStatus(c context.Context, status model.NoticeStatus, id uint32) (err error)
UpdateNoticeStatus UpdateNoticeStatus