Documentation ¶
Index ¶
- type Service
- func (s *Service) AddBusiness(c context.Context, tp int32, name, appkey, remark, alias string) (id int64, err error)
- func (s *Service) AddChannelCategory(c context.Context, name string, shieldINT int32) (err error)
- func (s *Service) AllChannels(c context.Context) (res []*model.Channel, err error)
- func (s *Service) ArchiveRankList(c context.Context, prid, rid int64, tp int32) (top []*model.RankTop, view []*model.RankTop, filter []*model.RankFilter, ...)
- func (s *Service) CategoryShieldINT(c context.Context, id int64, state int32, uname string) (err error)
- func (s *Service) ChanneList(c context.Context, param *model.ParamChanneList) (res []*model.Channel, total int32, err error)
- func (s *Service) ChannelCategories(c context.Context) (res []*model.ChannelCategory, err error)
- func (s *Service) ChannelInfo(c context.Context, tid int64, tname string) (res *model.ChannelInfo, err error)
- func (s *Service) ChannelRule(c context.Context, tid int64) ([]*model.ChannelRule, error)
- func (s *Service) ChannelRuleCheckIDs(c context.Context, in []int64, notin int64) (res *model.ChannelRule, err error)
- func (s *Service) ChannelRuleCheckNames(c context.Context, in []string, notin string) (res *model.ChannelRule, err error)
- func (s *Service) ChannelShieldINT(c context.Context, tid int64, state int32, uname string) (err error)
- func (s *Service) ChannelsByCategory(c context.Context, id int64, name string) (offline, online []*model.Channel, err error)
- func (s *Service) CheckChannelCategory(name string) (string, error)
- func (s *Service) Close() (err error)
- func (s *Service) DeleteChannel(c context.Context, tid int64, uname string) (err error)
- func (s *Service) DeleteChannelCategory(c context.Context, id int64, name string) (err error)
- func (s *Service) EditChannel(c context.Context, channelInfo *model.ChannelInfo, uname string) (err error)
- func (s *Service) GetBusiness(c context.Context, tp int32) (business *model.Business, err error)
- func (s *Service) LimitUserAdd(c context.Context, mid int64, cname string) (err error)
- func (s *Service) LimitUserDel(c context.Context, mid int64) (err error)
- func (s *Service) LimitUsers(c context.Context, pn, ps int32) (res []*model.LimitUser, total int64, err error)
- func (s *Service) ListBusiness(c context.Context, state int32) (business []*model.Business, err error)
- func (s *Service) MigrateChannel(c context.Context, tid, tp int64, tname, uname string) (err error)
- func (s *Service) MigrateRecommendChannel(c context.Context, tid int64, tname, uname string) (err error)
- func (s *Service) OperateHotTag(c context.Context, tname string) (tag *model.Tag, err error)
- func (s *Service) Ping(c context.Context) (err error)
- func (s *Service) RecommandChannels(c context.Context) (res []*model.Channel, err error)
- func (s *Service) RegionRankList(c context.Context, prid, rid int64, tp int32) (top []*model.RankTop, view []*model.RankResult, filter []*model.RankFilter, ...)
- func (s *Service) RegionTagArcsRefresh(c context.Context, rid int64, tid int64) (err error)
- func (s *Service) RelationAdd(c context.Context, tname string, oid, mid int64, tp int32) (err error)
- func (s *Service) RelationDelete(c context.Context, tid, oid int64, tp int32) (err error)
- func (s *Service) RelationListByOid(c context.Context, oid int64, tp, pn, ps int32) (total int64, res []*model.Resource, err error)
- func (s *Service) RelationListByTag(c context.Context, tname string, pn, ps int32) (total int64, res []*model.Resource, err error)
- func (s *Service) RelationLock(c context.Context, tid, oid int64, tp int32) (err error)
- func (s *Service) RelationUnLock(c context.Context, tid, oid int64, tp int32) (err error)
- func (s *Service) RemoveSynonymSon(c context.Context, ptid int64, tids []int64) (err error)
- func (s *Service) ReportDelete(c context.Context, uname string, uid int64, ids []int64, audit int32) (err error)
- func (s *Service) ReportHandle(c context.Context, uname string, uid, id int64, audit, action int32) (err error)
- func (s *Service) ReportIgnore(c context.Context, uname string, audit int32, ids []int64) (err error)
- func (s *Service) ReportInfo(c context.Context, id int64) (res []*model.ReportDetail, err error)
- func (s *Service) ReportList(c context.Context, param *model.ParamReportList) (res []*model.ReportInfo, total int64, err error)
- func (s *Service) ReportLogInfo(c context.Context, id int64) (res []*model.ReportLog, err error)
- func (s *Service) ReportLogList(c context.Context, oid, tid, mid, rid int64, tp, pn, ps int32, ...) (res []*model.ReportLog, total int64, err error)
- func (s *Service) ReportPunish(c context.Context, uname, remark, note string, ids []int64, ...) (err error)
- func (s *Service) ReportState(c context.Context, id int64, state int32) (err error)
- func (s *Service) ResByOperate(c context.Context, operateState, pn, ps int32) (res []*model.LimitRes, count int64, err error)
- func (s *Service) ResourceByOid(c context.Context, oid int64, tp int32) (res *model.LimitRes, err error)
- func (s *Service) ResourceLogs(c context.Context, oid int64, tp, role, action, pn, ps int32) (res []*model.ResTagLog, total int64, err error)
- func (s *Service) RuleChecks(rules []*model.ChannelRule) (res []*model.ChannelRule, err error)
- func (s *Service) SortChannelCategory(c context.Context, ids []int64) (err error)
- func (s *Service) SortChannels(c context.Context, tp int64, tids []int64) (err error)
- func (s *Service) SortRecommandChannel(c context.Context, tops []int64, recommends []int64) (err error)
- func (s *Service) StateChannel(c context.Context, tid int64, state int32, uname string) (err error)
- func (s *Service) SynonymAdd(c context.Context, uname, tname string, adverb []int64) (err error)
- func (s *Service) SynonymDelete(c context.Context, tid int64) (err error)
- func (s *Service) SynonymInfo(c context.Context, tid int64) (res *model.SynonymInfo, err error)
- func (s *Service) SynonymIsExist(c context.Context, adverb string) (tag *model.Tag, err error)
- func (s *Service) SynonymList(c context.Context, keyWord string, pn, ps int32) (res []*model.SynonymTag, count int64, err error)
- func (s *Service) TagCheck(c context.Context, tid int64, tname string) (res *model.Tag, err error)
- func (s *Service) TagEdit(c context.Context, tid int64, tp int32, tname, content string) (err error)
- func (s *Service) TagInfo(c context.Context, tid int64) (res *model.TagInfo, err error)
- func (s *Service) TagInfoByName(c context.Context, tname string) (res *model.TagInfo, err error)
- func (s *Service) TagList(c context.Context, esTag *model.ESTag) (res *model.MngSearchTagList, err error)
- func (s *Service) TagState(c context.Context, tid int64, state int32) (err error)
- func (s *Service) TagVerify(c context.Context, tid int64) (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) UpdateRank(c context.Context, rank *model.HotRank) (err error)
- func (s *Service) UpdateResLimitState(c context.Context, oid int64, tp, operate int32) (err error)
- func (s *Service) UpdateResLogState(c context.Context, id, oid int64, tp, state int32) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service service struct.
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) AddChannelCategory ¶
AddChannelCategory add channel category.
func (*Service) AllChannels ¶
AllChannels get all channels.
func (*Service) ArchiveRankList ¶
func (s *Service) ArchiveRankList(c context.Context, prid, rid int64, tp int32) (top []*model.RankTop, view []*model.RankTop, filter []*model.RankFilter, checked []*model.BasicTag, tags []*model.BasicTag, err error)
ArchiveRankList ArchiveRankList.
func (*Service) CategoryShieldINT ¶
func (s *Service) CategoryShieldINT(c context.Context, id int64, state int32, uname string) (err error)
CategoryShieldINT .
func (*Service) ChanneList ¶
func (s *Service) ChanneList(c context.Context, param *model.ParamChanneList) (res []*model.Channel, total int32, err error)
ChanneList ChanneList.
func (*Service) ChannelCategories ¶
ChannelCategories channel categories.
func (*Service) ChannelInfo ¶
func (s *Service) ChannelInfo(c context.Context, tid int64, tname string) (res *model.ChannelInfo, err error)
ChannelInfo ChannelInfo.
func (*Service) ChannelRule ¶
ChannelRule ChannelRule.
func (*Service) ChannelRuleCheckIDs ¶
func (s *Service) ChannelRuleCheckIDs(c context.Context, in []int64, notin int64) (res *model.ChannelRule, err error)
ChannelRuleCheckIDs channel rule check.
func (*Service) ChannelRuleCheckNames ¶
func (s *Service) ChannelRuleCheckNames(c context.Context, in []string, notin string) (res *model.ChannelRule, err error)
ChannelRuleCheckNames channel rule check.
func (*Service) ChannelShieldINT ¶
func (s *Service) ChannelShieldINT(c context.Context, tid int64, state int32, uname string) (err error)
ChannelShieldINT channel shild int.
func (*Service) ChannelsByCategory ¶
func (s *Service) ChannelsByCategory(c context.Context, id int64, name string) (offline, online []*model.Channel, err error)
ChannelsByCategory channels by channel_type.
func (*Service) CheckChannelCategory ¶
CheckChannelCategory check channel category.
func (*Service) Close ¶
Close when program have recived SIGQUIT, SIGTERM, SIGSTOP or SIGINT signal, stop and relese all resource.
func (*Service) DeleteChannel ¶
DeleteChannel delete channel.
func (*Service) DeleteChannelCategory ¶
DeleteChannelCategory delete channel category.
func (*Service) EditChannel ¶
func (s *Service) EditChannel(c context.Context, channelInfo *model.ChannelInfo, uname string) (err error)
EditChannel edit channel.
func (*Service) GetBusiness ¶
GetBusiness return a business by type
func (*Service) LimitUserAdd ¶
LimitUserAdd add limit user.
func (*Service) LimitUserDel ¶
LimitUserDel LimitUserDel.
func (*Service) LimitUsers ¶
func (s *Service) LimitUsers(c context.Context, pn, ps int32) (res []*model.LimitUser, total int64, err error)
LimitUsers limit users.
func (*Service) ListBusiness ¶
func (s *Service) ListBusiness(c context.Context, state int32) (business []*model.Business, err error)
ListBusiness return all business
func (*Service) MigrateChannel ¶
MigrateChannel migrate channel from a type to b type.
func (*Service) MigrateRecommendChannel ¶
func (s *Service) MigrateRecommendChannel(c context.Context, tid int64, tname, uname string) (err error)
MigrateRecommendChannel migrate recommend channel.
func (*Service) OperateHotTag ¶
OperateHotTag OperateHotTag.
func (*Service) RecommandChannels ¶
RecommandChannels recommand channels.
func (*Service) RegionRankList ¶
func (s *Service) RegionRankList(c context.Context, prid, rid int64, tp int32) (top []*model.RankTop, view []*model.RankResult, filter []*model.RankFilter, normal []*model.BasicTag, err error)
RegionRankList Region Rank List.
func (*Service) RegionTagArcsRefresh ¶
RegionTagArcsRefresh tag arcs refresh.
func (*Service) RelationAdd ¶
func (s *Service) RelationAdd(c context.Context, tname string, oid, mid int64, tp int32) (err error)
RelationAdd RelationAdd.
func (*Service) RelationDelete ¶
RelationDelete RelationDelete.
func (*Service) RelationListByOid ¶
func (s *Service) RelationListByOid(c context.Context, oid int64, tp, pn, ps int32) (total int64, res []*model.Resource, err error)
RelationListByOid RelationListByOid.
func (*Service) RelationListByTag ¶
func (s *Service) RelationListByTag(c context.Context, tname string, pn, ps int32) (total int64, res []*model.Resource, err error)
RelationListByTag RelationListByTag.
func (*Service) RelationLock ¶
RelationLock RelationLock.
func (*Service) RelationUnLock ¶
RelationUnLock RelationUnLock.
func (*Service) RemoveSynonymSon ¶
RemoveSynonymSon 删除二级子类.
func (*Service) ReportDelete ¶
func (s *Service) ReportDelete(c context.Context, uname string, uid int64, ids []int64, audit int32) (err error)
ReportDelete ReportDelete.
func (*Service) ReportHandle ¶
func (s *Service) ReportHandle(c context.Context, uname string, uid, id int64, audit, action int32) (err error)
ReportHandle ReportHandle.
func (*Service) ReportIgnore ¶
func (s *Service) ReportIgnore(c context.Context, uname string, audit int32, ids []int64) (err error)
ReportIgnore ReportIgnore.
func (*Service) ReportInfo ¶
ReportInfo ReportInfo.
func (*Service) ReportList ¶
func (s *Service) ReportList(c context.Context, param *model.ParamReportList) (res []*model.ReportInfo, total int64, err error)
ReportList ReportList.
func (*Service) ReportLogInfo ¶
ReportLogInfo ReportLogInfo.
func (*Service) ReportLogList ¶
func (s *Service) ReportLogList(c context.Context, oid, tid, mid, rid int64, tp, pn, ps int32, handleType []int64, stime, etime, username string) (res []*model.ReportLog, total int64, err error)
ReportLogList ReportLogList.
func (*Service) ReportPunish ¶
func (s *Service) ReportPunish(c context.Context, uname, remark, note string, ids []int64, reason, moral, isNotify, reasonType, blockTimeLength int32) (err error)
ReportPunish ReportPunish.
func (*Service) ReportState ¶
ReportState ReportState.
func (*Service) ResByOperate ¶
func (s *Service) ResByOperate(c context.Context, operateState, pn, ps int32) (res []*model.LimitRes, count int64, err error)
ResByOperate ResByOperate.
func (*Service) ResourceByOid ¶
func (s *Service) ResourceByOid(c context.Context, oid int64, tp int32) (res *model.LimitRes, err error)
ResourceByOid ResourceByOid.
func (*Service) ResourceLogs ¶
func (s *Service) ResourceLogs(c context.Context, oid int64, tp, role, action, pn, ps int32) (res []*model.ResTagLog, total int64, err error)
ResourceLogs resource log.
func (*Service) RuleChecks ¶
func (s *Service) RuleChecks(rules []*model.ChannelRule) (res []*model.ChannelRule, err error)
RuleChecks RuleChecks.
func (*Service) SortChannelCategory ¶
SortChannelCategory sort channel category.
func (*Service) SortChannels ¶
SortChannels sort channels.
func (*Service) SortRecommandChannel ¶
func (s *Service) SortRecommandChannel(c context.Context, tops []int64, recommends []int64) (err error)
SortRecommandChannel sort recommend channels.
func (*Service) StateChannel ¶
StateChannel .
func (*Service) SynonymAdd ¶
SynonymAdd SynonymAdd.
func (*Service) SynonymDelete ¶
SynonymDelete del synonym.
func (*Service) SynonymInfo ¶
SynonymInfo Synonym info by ID.
func (*Service) SynonymIsExist ¶
SynonymIsExist SynonymIsExist.
func (*Service) SynonymList ¶
func (s *Service) SynonymList(c context.Context, keyWord string, pn, ps int32) (res []*model.SynonymTag, count int64, err error)
SynonymList SynonymList.
func (*Service) TagEdit ¶
func (s *Service) TagEdit(c context.Context, tid int64, tp int32, tname, content string) (err error)
TagEdit tag edit.
func (*Service) TagInfo ¶
TagInfo tag detail info, include tag info and synonym tag infos, used by tid.
func (*Service) TagInfoByName ¶
TagInfoByName TagInfoByName.
func (*Service) TagList ¶
func (s *Service) TagList(c context.Context, esTag *model.ESTag) (res *model.MngSearchTagList, err error)
TagList TagList.
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) UpdateRank ¶
UpdateRank UpdateRank.
func (*Service) UpdateResLimitState ¶
UpdateResLimitState UpdateResLimitState.