service

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

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 New

func New(c *conf.Config) (s *Service)

New new a service and return.

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

func (s *Service) AddChannelCategory(c context.Context, name string, shieldINT int32) (err error)

AddChannelCategory add channel category.

func (*Service) AllChannels

func (s *Service) AllChannels(c context.Context) (res []*model.Channel, err error)

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

func (s *Service) ChannelCategories(c context.Context) (res []*model.ChannelCategory, err error)

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

func (s *Service) ChannelRule(c context.Context, tid int64) ([]*model.ChannelRule, error)

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

func (s *Service) CheckChannelCategory(name string) (string, error)

CheckChannelCategory check channel category.

func (*Service) Close

func (s *Service) Close() (err error)

Close when program have recived SIGQUIT, SIGTERM, SIGSTOP or SIGINT signal, stop and relese all resource.

func (*Service) DeleteChannel

func (s *Service) DeleteChannel(c context.Context, tid int64, uname string) (err error)

DeleteChannel delete channel.

func (*Service) DeleteChannelCategory

func (s *Service) DeleteChannelCategory(c context.Context, id int64, name string) (err error)

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

func (s *Service) GetBusiness(c context.Context, tp int32) (business *model.Business, err error)

GetBusiness return a business by type

func (*Service) LimitUserAdd

func (s *Service) LimitUserAdd(c context.Context, mid int64, cname string) (err error)

LimitUserAdd add limit user.

func (*Service) LimitUserDel

func (s *Service) LimitUserDel(c context.Context, mid int64) (err error)

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

func (s *Service) MigrateChannel(c context.Context, tid, tp int64, tname, uname string) (err error)

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

func (s *Service) OperateHotTag(c context.Context, tname string) (tag *model.Tag, err error)

OperateHotTag OperateHotTag.

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping check the service health.

func (*Service) RecommandChannels

func (s *Service) RecommandChannels(c context.Context) (res []*model.Channel, err error)

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

func (s *Service) RegionTagArcsRefresh(c context.Context, rid int64, tid int64) (err error)

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

func (s *Service) RelationDelete(c context.Context, tid, oid int64, tp int32) (err error)

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

func (s *Service) RelationLock(c context.Context, tid, oid int64, tp int32) (err error)

RelationLock RelationLock.

func (*Service) RelationUnLock

func (s *Service) RelationUnLock(c context.Context, tid, oid int64, tp int32) (err error)

RelationUnLock RelationUnLock.

func (*Service) RemoveSynonymSon

func (s *Service) RemoveSynonymSon(c context.Context, ptid int64, tids []int64) (err error)

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

func (s *Service) ReportInfo(c context.Context, id int64) (res []*model.ReportDetail, err error)

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

func (s *Service) ReportLogInfo(c context.Context, id int64) (res []*model.ReportLog, err error)

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

func (s *Service) ReportState(c context.Context, id int64, state int32) (err error)

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

func (s *Service) SortChannelCategory(c context.Context, ids []int64) (err error)

SortChannelCategory sort channel category.

func (*Service) SortChannels

func (s *Service) SortChannels(c context.Context, tp int64, tids []int64) (err error)

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

func (s *Service) StateChannel(c context.Context, tid int64, state int32, uname string) (err error)

StateChannel .

func (*Service) SynonymAdd

func (s *Service) SynonymAdd(c context.Context, uname, tname string, adverb []int64) (err error)

SynonymAdd SynonymAdd.

func (*Service) SynonymDelete

func (s *Service) SynonymDelete(c context.Context, tid int64) (err error)

SynonymDelete del synonym.

func (*Service) SynonymInfo

func (s *Service) SynonymInfo(c context.Context, tid int64) (res *model.SynonymInfo, err error)

SynonymInfo Synonym info by ID.

func (*Service) SynonymIsExist

func (s *Service) SynonymIsExist(c context.Context, adverb string) (tag *model.Tag, err error)

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) TagCheck

func (s *Service) TagCheck(c context.Context, tid int64, tname string) (res *model.Tag, err error)

TagCheck tag check.

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

func (s *Service) TagInfo(c context.Context, tid int64) (res *model.TagInfo, err error)

TagInfo tag detail info, include tag info and synonym tag infos, used by tid.

func (*Service) TagInfoByName

func (s *Service) TagInfoByName(c context.Context, tname string) (res *model.TagInfo, err error)

TagInfoByName TagInfoByName.

func (*Service) TagList

func (s *Service) TagList(c context.Context, esTag *model.ESTag) (res *model.MngSearchTagList, err error)

TagList TagList.

func (*Service) TagState

func (s *Service) TagState(c context.Context, tid int64, state int32) (err error)

TagState tag state.

func (*Service) TagVerify

func (s *Service) TagVerify(c context.Context, tid int64) (err error)

TagVerify TagVerify.

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

func (s *Service) UpBusinessState(c context.Context, state, tp int32) (id int64, err error)

UpBusinessState update a business's state

func (*Service) UpdateRank

func (s *Service) UpdateRank(c context.Context, rank *model.HotRank) (err error)

UpdateRank UpdateRank.

func (*Service) UpdateResLimitState

func (s *Service) UpdateResLimitState(c context.Context, oid int64, tp, operate int32) (err error)

UpdateResLimitState UpdateResLimitState.

func (*Service) UpdateResLogState

func (s *Service) UpdateResLogState(c context.Context, id, oid int64, tp, state int32) (err error)

UpdateResLogState UpdateResLogState.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL