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: 23 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 define Service struct

func New

func New(c *conf.Config) *Service

New new a Service and return.cdfg

func (*Service) AddGlobalRule

func (s *Service) AddGlobalRule(c context.Context, fType int8, filter string) (res *dm2Mdl.GlobalFilter, err error)

AddGlobalRule add global rule

func (*Service) AddProtectApply

func (s *Service) AddProtectApply(c context.Context, uid, cid int64, dmids []int64) (err error)

AddProtectApply 批量申请保护弹幕

func (*Service) AddReport

func (s *Service) AddReport(c context.Context, cid, dmid, uid int64, reason int8, content string) (id int64, err error)

AddReport add dm report.

func (*Service) AddUserRule

func (s *Service) AddUserRule(c context.Context, fType int8, mid int64, filters []string, comment string) (res []*dm2Mdl.UserFilter, err error)

AddUserRule add user rule

func (*Service) AdvanceState

func (s *Service) AdvanceState(c context.Context, mid, cid int64, mode string) (state *dm2Mdl.AdvState, err error)

AdvanceState 高级弹幕状态

func (*Service) Advances

func (s *Service) Advances(c context.Context, mid int64) (res []*dm2Mdl.Advance, err error)

Advances 高级弹幕申请列表

func (*Service) AssistBanned

func (s *Service) AssistBanned(c context.Context, mid, cid int64, dmids []int64) (err error)

AssistBanned up主屏蔽

func (*Service) AssistBannedUsers

func (s *Service) AssistBannedUsers(c context.Context, mid, aid int64) (hashes []string, err error)

AssistBannedUsers 获取up主屏蔽列表

func (*Service) AssistDelBanned2

func (s *Service) AssistDelBanned2(c context.Context, mid, aid int64, hashes []string) (err error)

AssistDelBanned2 批量撤销up主屏蔽

func (*Service) AssistDeleteDM

func (s *Service) AssistDeleteDM(c context.Context, mid, oid int64, dmids []int64) (err error)

AssistDeleteDM assist delete dm.

func (*Service) AssistUptBanned

func (s *Service) AssistUptBanned(c context.Context, mid int64, hash string, active int8) (err error)

AssistUptBanned 更新up主屏蔽

func (*Service) BuyAdvance

func (s *Service) BuyAdvance(c context.Context, mid, cid int64, mode string) (err error)

BuyAdvance 购买高级弹幕

func (*Service) CancelAdvance

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

CancelAdvance 取消高级弹幕申请

func (*Service) CheckExist

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

CheckExist check exit of up id.

func (*Service) DelGlobalRules

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

DelGlobalRules delete global rules

func (*Service) DelUserRules

func (s *Service) DelUserRules(c context.Context, mid int64, idss []int64) (affect int64, err error)

DelUserRules delete user rules

func (*Service) DenyAdvance

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

DenyAdvance 拒绝高级弹幕申请

func (*Service) EditDMState

func (s *Service) EditDMState(c context.Context, tp int32, oid, mid int64, state int32, source oplog.Source, operatorType oplog.OperatorType, dmids ...int64) (err error)

EditDMState edit dm state used rpc method in dm2.

func (*Service) EditFilter

func (s *Service) EditFilter(c context.Context, cid, mid int64, filter string, fType, state int8) (err error)

EditFilter edit up filter from creative center.

func (*Service) EditReport

func (s *Service) EditReport(c context.Context, tp int32, cid, mid, dmid int64, op int8) (affect int64, err error)

EditReport edit report dm.

func (*Service) FilterList

func (s *Service) FilterList(c context.Context, mid, cid int64) (l *model.UserFilterList, err error)

FilterList get user filter list

func (*Service) GlobalRuleVersion

func (s *Service) GlobalRuleVersion() uint64

GlobalRuleVersion return global rule version

func (*Service) GlobalRules

func (s *Service) GlobalRules(c context.Context) (res []*dm2Mdl.GlobalFilter, err error)

GlobalRules return global rules

func (*Service) MidHash

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

MidHash 弹幕发送者mid hash.

func (*Service) PaVideoLs

func (s *Service) PaVideoLs(c context.Context, uid int64) (res []*model.Video, err error)

PaVideoLs 被申请保护弹幕的视频列表

func (*Service) PassAdvance

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

PassAdvance 通过高级弹幕申请

func (*Service) Ping

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

Ping check server ok

func (*Service) ProtectApplies

func (s *Service) ProtectApplies(c context.Context, uid, aid int64, page int, sort string) (res *model.ApplyListResult, err error)

ProtectApplies 保护弹幕申请列表

func (*Service) Recall

func (s *Service) Recall(c context.Context, mid, cid int64, id int64) (msg string, err error)

Recall 撤回弹幕

func (*Service) ReportArchives

func (s *Service) ReportArchives(c context.Context, mid int64, upOp int8, states []int8, pn, ps int64) (res *model.Archives, err error)

ReportArchives 获取一个用户的所有被举报的稿件

func (*Service) ReportList

func (s *Service) ReportList(c context.Context, mid, aid, page, size int64, upOp int8, states []int64) (res *model.RptSearchs, err error)

ReportList 获取一个用户的所有被举报的弹幕

func (*Service) TransferJob

func (s *Service) TransferJob(c context.Context, mid, fromCid, toCid int64, offset float64) (err error)

TransferJob set task to db

func (*Service) TransferList

func (s *Service) TransferList(c context.Context, cid int64) (hiss []*model.TransferHistory, err error)

TransferList service

func (*Service) TransferRetry

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

TransferRetry change transferjob state

func (*Service) UptPaStatus

func (s *Service) UptPaStatus(c context.Context, mid int64, ids []int64, status int) (err error)

UptPaStatus 审核保护弹幕申请

func (*Service) UptPaSwitch

func (s *Service) UptPaSwitch(c context.Context, uid int64, status int) (err error)

UptPaSwitch 保护弹幕申请开关

func (*Service) UserRules

func (s *Service) UserRules(c context.Context, mid int64) (res []*dm2Mdl.UserFilter, err error)

UserRules return user rules

Jump to

Keyboard shortcuts

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