Documentation ¶
Index ¶
- Variables
- func InSliceIface(v interface{}, sl []interface{}) bool
- func Slice2Interface(slice []string) (uniqueslice []interface{})
- func Slice2String(slice []interface{}) (uniqueslice []string)
- func SliceUnique(slice []interface{}) (uniqueslice []interface{})
- func StringHandler(s1 string, s2 string, delimiter string, subtraction bool) string
- type Service
- func (s *Service) AITrack(c context.Context, aid []int64) (aids string, err error)
- func (s *Service) AddPolicies(c *bm.Context, uid, gid int64, items []*oversea.PolicyParams) (err error)
- func (s *Service) AddPolicyGroup(c *bm.Context, group *oversea.PolicyGroup) (err error)
- func (s *Service) AddWeightConf(c context.Context, cfg *archive.WeightConf, uid int64, uname string) (err error)
- func (s *Service) AllEditHistory(c context.Context, aid int64) (hs []*archive.EditHistory, err error)
- func (s *Service) ArchiveGroups(c *bm.Context, aid int64) (groups []*oversea.PolicyGroup, err error)
- func (s *Service) BatchArchive(c context.Context, aps []*archive.ArcParam, action string) (err error)
- func (s *Service) BatchUpTag(c context.Context, uid int64, pm *archive.BatchTagParam) (warning string, err error)
- func (s *Service) BatchVideo(c context.Context, vps []*archive.VideoParam, action string) (err error)
- func (s *Service) ChangeIndex(c context.Context, lo *archive.IndexParam) (err error)
- func (s *Service) ChannelNamesByAids(c context.Context, aids []int64) (aidMap map[int64][]string)
- func (s *Service) CheckArchive(aps []*archive.ArcParam) bool
- func (s *Service) CheckGroup(c context.Context, uid int64) (role int8, err error)
- func (s *Service) CheckOnline(c context.Context, uid int64) (on bool)
- func (s *Service) CheckOwner(c context.Context, tid, uid int64) (err error)
- func (s *Service) CheckStaff(vps []*archive.StaffParam) bool
- func (s *Service) CheckVideo(vps []*archive.VideoParam) bool
- func (s *Service) Close()
- func (s *Service) DelPolices(c *bm.Context, uid, gid int64, ids []int64) (err error)
- func (s *Service) DelVideo(c context.Context, vp *archive.VideoParam) (err error)
- func (s *Service) DelWeightConf(c context.Context, id int64) (err error)
- func (s *Service) Delay(c context.Context, id, uid int64, reason string) (err error)
- func (s *Service) EditHistory(c context.Context, hid int64) (h *archive.EditHistory, err error)
- func (s *Service) Free(c context.Context, uid int64) (rows int64)
- func (s *Service) GetChannelInfo(c context.Context, aids []int64) (info map[int64]*archive.ChannelInfo, err error)
- func (s *Service) GetUID(c context.Context, name string) (uid int64, err error)
- func (s *Service) HandsOff(c context.Context, uid int64, fuid int64) (err error)
- func (s *Service) HandsUp(c context.Context, uid int64, uname string) (err error)
- func (s *Service) HitFlowGroups(c context.Context, oid int64, includePools []int8) (res map[string]int, err error)
- func (s *Service) InOutList(c context.Context, unames string, bt, et string) (l []*archive.InQuit, err error)
- func (s *Service) Info(c context.Context, tid int64) (task *archive.Task, err error)
- func (s *Service) KneadArchiveResult(c *bm.Context, result *search.ArchiveResultData, p *search.ArchiveParams, ...) (err error)
- func (s *Service) List(c context.Context, uid int64, pn, ps int, ltype, leader int8) (tasks []*archive.Task, err error)
- func (s *Service) ListWeightConf(c context.Context, v *archive.Confs) (cfg []*archive.WCItem, err error)
- func (s *Service) ListWeightLogs(c context.Context, taskid int64, page int) (cfg []*archive.TaskWeightLog, items int64, err error)
- func (s *Service) LockByPGC(c context.Context, aid int64) (err error)
- func (s *Service) MaxWeight(c context.Context) (max int64, err error)
- func (s *Service) ModifyByPGC(c context.Context, aid int64, gid int64, attrs map[uint]int32, ...) (err error)
- func (s *Service) MoniStayOids(c context.Context, tp, bid int8, id int64) (total int, oidMap map[int64]int, qualiKeys []string, err error)
- func (s *Service) MonitorCheckVideoStatus(c context.Context, tp int8, id int64) (err error)
- func (s *Service) MonitorNotifyResult(c context.Context) (res []*monitor.RuleResultData, err error)
- func (s *Service) MonitorResult(c context.Context, p *monitor.RuleResultParams) (res []*monitor.RuleResultData, err error)
- func (s *Service) MonitorRuleUpdate(c context.Context, rule *monitor.Rule) (err error)
- func (s *Service) MonitorStats(c context.Context, rule *monitor.Rule) (stats *monitor.Stats, err error)
- func (s *Service) MonitorStayOids(c context.Context, id int64) (oidMap map[int64]int, err error)
- func (s *Service) Next(c context.Context, uid int64) (task *archive.Task, err error)
- func (s *Service) Online(c context.Context) (cms []*archive.Consumers, err error)
- func (s *Service) PGCListLogic(c *bm.Context, lnStr string, pState string, froms []int8, ...) (err error)
- func (s *Service) PGCWhite(mid int64) bool
- func (s *Service) PassByPGC(c context.Context, aid int64, gid int64, attrs map[uint]int32, ...) (err error)
- func (s *Service) Ping(c context.Context) (err error)
- func (s *Service) PolicyGroups(c *bm.Context, uid, groupID int64, gType, state int8, count, page int64, ...) (data *oversea.PolicyGroupData, err error)
- func (s *Service) PolicyItems(c *bm.Context, gid int64) (items []*oversea.PolicyItem, err error)
- func (s *Service) RuleQualifiedKeys(c context.Context, rule *monitor.Rule) (qualiKeys []string, err error)
- func (s *Service) SearchArchive(c *bm.Context, p *search.ArchiveParams) (result *search.ArchiveResultData, err error)
- func (s *Service) SearchCopyright(c context.Context, kw string) (result *search.CopyrightResultData, err error)
- func (s *Service) SearchVideo(c context.Context, p *search.VideoParams) (result *search.VideoResultData, err error)
- func (s *Service) SendMusicLog(c *bm.Context, clientType int, ap *music.LogParam) (err error)
- func (s *Service) SetWeightVC(c context.Context, wvc *archive.WeightVC) (err error)
- func (s *Service) ShowWeightVC(c context.Context) (wvc *archive.WeightVC, err error)
- func (s *Service) SplitInts(str string) ([]int64, error)
- func (s *Service) StaffApplyBatchSubmit(c context.Context, ap *archive.StaffBatchParam) (err error)
- func (s *Service) Staffs(c context.Context, aid int64) (data []*archive.Staff, err error)
- func (s *Service) StatsPoints(c context.Context, stime, etime time.Time, typeInt int8) (points []*archive.StatsPoint, err error)
- func (s *Service) Submit(c context.Context, ap *archive.ArcParam) (err error)
- func (s *Service) TaskSubmit(c context.Context, id int64, uid int64, status int64) (err error)
- func (s *Service) TaskTooksByHalfHour(c context.Context, stime, etime time.Time) (tooks []*archive.TaskTook, err error)
- func (s *Service) TrackArchive(c context.Context, aid int64) (archive []*track.Archive, err error)
- func (s *Service) TrackArchiveInfo(c context.Context, aid int64) (info *track.ArcTrackInfo, err error)
- func (s *Service) TrackHistoryDetail(c context.Context, hid int64) (h *archive.EditHistory, err error)
- func (s *Service) TrackVideo(c context.Context, filename string, aid int64) (video []*track.Video, err error)
- func (s *Service) TxUpArchiveAttr(c context.Context, tx *sql.Tx, a *archive.Archive, aid, uid int64, ...) (conts []string, err error)
- func (s *Service) TxUpPorder(tx *sql.Tx, ap *archive.ArcParam) (err error)
- func (s *Service) TypeTopParent(tid int16) (tp *archive.Type, err error)
- func (s *Service) UpAccess(c context.Context, ap *archive.ArcParam) (err error)
- func (s *Service) UpArcDtime(c context.Context, aid int64, dtime time.Time) (err error)
- func (s *Service) UpArcTag(c context.Context, uid int64, pm *archive.TagParam) (err error)
- func (s *Service) UpArchiveAttr(c context.Context, aid, uid int64, attrs map[uint]int32, ...) (err error)
- func (s *Service) UpAuther(c context.Context, ap *archive.ArcParam) (err error)
- func (s *Service) UpVideo(c context.Context, vp *archive.VideoParam) (err error)
- func (s *Service) UpWebLink(c context.Context, vp *archive.VideoParam) (err error)
- func (s *Service) UpdatePolicyGroup(c *bm.Context, id int64, attrs map[string]interface{}) (err error)
- func (s *Service) UpdatePolicyGroups(c *bm.Context, ids []int64, attrs map[string]interface{}) (err error)
- func (s *Service) VideoAudit(c context.Context, vp *archive.VideoParam, attrs map[uint]int32) (err error)
Constants ¶
This section is empty.
Variables ¶
var (
ErrRPCEmpty = errors.New("rpc reply empty")
)
ERROR
Functions ¶
func InSliceIface ¶
func InSliceIface(v interface{}, sl []interface{}) bool
InSliceIface checks given interface in interface slice.
func Slice2Interface ¶
func Slice2Interface(slice []string) (uniqueslice []interface{})
Slice2Interface convert slice to interface
func Slice2String ¶
func Slice2String(slice []interface{}) (uniqueslice []string)
Slice2String convert slice to string
func SliceUnique ¶
func SliceUnique(slice []interface{}) (uniqueslice []interface{})
SliceUnique cleans repeated values in slice.
Types ¶
type Service ¶
Service is service.
func (*Service) AddPolicies ¶
func (s *Service) AddPolicies(c *bm.Context, uid, gid int64, items []*oversea.PolicyParams) (err error)
AddPolicies add policies
func (*Service) AddPolicyGroup ¶
AddPolicyGroup add policy group
func (*Service) AddWeightConf ¶
func (s *Service) AddWeightConf(c context.Context, cfg *archive.WeightConf, uid int64, uname string) (err error)
AddWeightConf 配置权重
func (*Service) AllEditHistory ¶
func (s *Service) AllEditHistory(c context.Context, aid int64) (hs []*archive.EditHistory, err error)
AllEditHistory 根据aid获取 其所有的用户编辑历史
func (*Service) ArchiveGroups ¶
func (s *Service) ArchiveGroups(c *bm.Context, aid int64) (groups []*oversea.PolicyGroup, err error)
ArchiveGroups get policy group by archive id
func (*Service) BatchArchive ¶
func (s *Service) BatchArchive(c context.Context, aps []*archive.ArcParam, action string) (err error)
BatchArchive batch async archive audit.
func (*Service) BatchUpTag ¶
func (s *Service) BatchUpTag(c context.Context, uid int64, pm *archive.BatchTagParam) (warning string, err error)
BatchUpTag batch update archive tag
func (*Service) BatchVideo ¶
func (s *Service) BatchVideo(c context.Context, vps []*archive.VideoParam, action string) (err error)
BatchVideo batch async video audit.
func (*Service) ChangeIndex ¶
ChangeIndex change archive_video index.
func (*Service) ChannelNamesByAids ¶
ChannelNamesByAids .
func (*Service) CheckArchive ¶
CheckArchive check typeid
func (*Service) CheckGroup ¶
CheckGroup 检查用户组权限
func (*Service) CheckOnline ¶
CheckOnline 检查在线状态
func (*Service) CheckOwner ¶
CheckOwner 检查任务状态修改权限
func (*Service) CheckStaff ¶
func (s *Service) CheckStaff(vps []*archive.StaffParam) bool
CheckStaff check
func (*Service) CheckVideo ¶
func (s *Service) CheckVideo(vps []*archive.VideoParam) bool
CheckVideo check video
func (*Service) DelPolices ¶
DelPolices soft delete policies
func (*Service) DelWeightConf ¶
DelWeightConf 删除配置项
func (*Service) EditHistory ¶
EditHistory 根据稿件的某条编辑历史id,获取当时完整的稿件、分p视频编辑历史
func (*Service) GetChannelInfo ¶
func (s *Service) GetChannelInfo(c context.Context, aids []int64) (info map[int64]*archive.ChannelInfo, err error)
GetChannelInfo get channel info & hit_rules & need review
func (*Service) HitFlowGroups ¶
func (s *Service) HitFlowGroups(c context.Context, oid int64, includePools []int8) (res map[string]int, err error)
HitFlowGroups 命中哪些指定的流量套餐
func (*Service) InOutList ¶
func (s *Service) InOutList(c context.Context, unames string, bt, et string) (l []*archive.InQuit, err error)
InOutList 用户登入登出历史
func (*Service) KneadArchiveResult ¶
func (s *Service) KneadArchiveResult(c *bm.Context, result *search.ArchiveResultData, p *search.ArchiveParams, additMap map[int64]*archive.Addit) (err error)
KneadArchiveResult 拼接稿件数据
func (*Service) List ¶
func (s *Service) List(c context.Context, uid int64, pn, ps int, ltype, leader int8) (tasks []*archive.Task, err error)
List 查看任务列表
func (*Service) ListWeightConf ¶
func (s *Service) ListWeightConf(c context.Context, v *archive.Confs) (cfg []*archive.WCItem, err error)
ListWeightConf 列出配置
func (*Service) ListWeightLogs ¶
func (s *Service) ListWeightLogs(c context.Context, taskid int64, page int) (cfg []*archive.TaskWeightLog, items int64, err error)
ListWeightLogs 权重变更日志
func (*Service) ModifyByPGC ¶
func (s *Service) ModifyByPGC(c context.Context, aid int64, gid int64, attrs map[uint]int32, redirectURL string) (err error)
ModifyByPGC update pgc archive attributes.
func (*Service) MoniStayOids ¶
func (s *Service) MoniStayOids(c context.Context, tp, bid int8, id int64) (total int, oidMap map[int64]int, qualiKeys []string, err error)
MoniStayOids 获取监控范围内,滞留的oids
func (*Service) MonitorCheckVideoStatus ¶
MonitorCheckVideoStatus 检查视频的稿件状态,如果是-100则剔除SortedSet的数据
func (*Service) MonitorNotifyResult ¶
MonitorNotifyResult 获取达到了报警阀值的数据
func (*Service) MonitorResult ¶
func (s *Service) MonitorResult(c context.Context, p *monitor.RuleResultParams) (res []*monitor.RuleResultData, err error)
MonitorResult 获取监控业务的统计结果列表
func (*Service) MonitorRuleUpdate ¶
MonitorRuleUpdate 更新监控规则
func (*Service) MonitorStats ¶
func (s *Service) MonitorStats(c context.Context, rule *monitor.Rule) (stats *monitor.Stats, err error)
MonitorStats 根据business和rule获取统计结果
func (*Service) MonitorStayOids ¶
MonitorStayOids 获取监控范围内,滞留的oids
func (*Service) PGCListLogic ¶
func (s *Service) PGCListLogic(c *bm.Context, lnStr string, pState string, froms []int8, eReq *elastic.Request) (err error)
PGCListLogic PGC列表查询相关逻辑
func (*Service) PassByPGC ¶
func (s *Service) PassByPGC(c context.Context, aid int64, gid int64, attrs map[uint]int32, redirectURL string, now time.Time) (err error)
PassByPGC update pgc archive state to StateOpen.
func (*Service) PolicyGroups ¶
func (s *Service) PolicyGroups(c *bm.Context, uid, groupID int64, gType, state int8, count, page int64, order, sort string) (data *oversea.PolicyGroupData, err error)
PolicyGroups get policy group
func (*Service) PolicyItems ¶
PolicyItems get polices by group id
func (*Service) RuleQualifiedKeys ¶
func (s *Service) RuleQualifiedKeys(c context.Context, rule *monitor.Rule) (qualiKeys []string, err error)
RuleQualifiedKeys 获取监控业务中符合监控条件的Redis key
func (*Service) SearchArchive ¶
func (s *Service) SearchArchive(c *bm.Context, p *search.ArchiveParams) (result *search.ArchiveResultData, err error)
SearchArchive 稿件搜索列表
func (*Service) SearchCopyright ¶
func (s *Service) SearchCopyright(c context.Context, kw string) (result *search.CopyrightResultData, err error)
SearchCopyright search video copyright
func (*Service) SearchVideo ¶
func (s *Service) SearchVideo(c context.Context, p *search.VideoParams) (result *search.VideoResultData, err error)
SearchVideo search video
func (*Service) SendMusicLog ¶
SendMusicLog send to log archive music
func (*Service) SetWeightVC ¶
SetWeightVC 设置权重配置
func (*Service) ShowWeightVC ¶
ShowWeightVC 展示权重配置值
func (*Service) StaffApplyBatchSubmit ¶
StaffApplyBatchSubmit func
func (*Service) StatsPoints ¶
func (s *Service) StatsPoints(c context.Context, stime, etime time.Time, typeInt int8) (points []*archive.StatsPoint, err error)
StatsPoints get stats point
func (*Service) TaskSubmit ¶
TaskSubmit 提交审核结果
func (*Service) TaskTooksByHalfHour ¶
func (s *Service) TaskTooksByHalfHour(c context.Context, stime, etime time.Time) (tooks []*archive.TaskTook, err error)
TaskTooksByHalfHour get task books by ctime
func (*Service) TrackArchive ¶
TrackArchive get archive list.
func (*Service) TrackArchiveInfo ¶
func (s *Service) TrackArchiveInfo(c context.Context, aid int64) (info *track.ArcTrackInfo, err error)
TrackArchiveInfo 稿件信息追踪
func (*Service) TrackHistoryDetail ¶
func (s *Service) TrackHistoryDetail(c context.Context, hid int64) (h *archive.EditHistory, err error)
TrackHistoryDetail 稿件某条编辑历史的详细情况
func (*Service) TrackVideo ¶
func (s *Service) TrackVideo(c context.Context, filename string, aid int64) (video []*track.Video, err error)
TrackVideo get video process.
func (*Service) TxUpArchiveAttr ¶
func (s *Service) TxUpArchiveAttr(c context.Context, tx *sql.Tx, a *archive.Archive, aid, uid int64, attrs map[uint]int32, forbidAttrs map[string]map[uint]int32, redirectURL string) (conts []string, err error)
TxUpArchiveAttr update archive attr by aid.
func (*Service) TxUpPorder ¶
TxUpPorder .
func (*Service) TypeTopParent ¶
TypeTopParent get archive type's first level type
func (*Service) UpArcDtime ¶
UpArcDtime update archive dtime by aid.
func (*Service) UpArchiveAttr ¶
func (s *Service) UpArchiveAttr(c context.Context, aid, uid int64, attrs map[uint]int32, forbidAttrs map[string]map[uint]int32, redirectURL string) (err error)
UpArchiveAttr update archive attr by aid.
func (*Service) UpdatePolicyGroup ¶
func (s *Service) UpdatePolicyGroup(c *bm.Context, id int64, attrs map[string]interface{}) (err error)
UpdatePolicyGroup update policy group
func (*Service) UpdatePolicyGroups ¶
func (s *Service) UpdatePolicyGroups(c *bm.Context, ids []int64, attrs map[string]interface{}) (err error)
UpdatePolicyGroups multi update policy group
func (*Service) VideoAudit ¶
func (s *Service) VideoAudit(c context.Context, vp *archive.VideoParam, attrs map[uint]int32) (err error)
VideoAudit upload first_round info.