Documentation ¶
Overview ¶
Package model is a generated protocol buffer package.
It is generated from these files:
app/job/main/dm2/model/dm.proto
It has these top-level messages:
DM Content ContentSpecial Elem DMSeg
Index ¶
- Constants
- Variables
- func ConvertStime(t time.Time) stime
- func SegmentPoint(num, duration int64) (ps, pe int64)
- type Action
- type Archive
- type BinlogMsg
- type BnjLiveConfig
- type Content
- func (*Content) Descriptor() ([]byte, []int)
- func (m *Content) Marshal() (dAtA []byte, err error)
- func (m *Content) MarshalTo(dAtA []byte) (int, error)
- func (*Content) ProtoMessage()
- func (m *Content) Reset()
- func (m *Content) Size() (n int)
- func (m *Content) String() string
- func (m *Content) Unmarshal(dAtA []byte) error
- type ContentSpecial
- func (*ContentSpecial) Descriptor() ([]byte, []int)
- func (m *ContentSpecial) Marshal() (dAtA []byte, err error)
- func (m *ContentSpecial) MarshalTo(dAtA []byte) (int, error)
- func (*ContentSpecial) ProtoMessage()
- func (m *ContentSpecial) Reset()
- func (m *ContentSpecial) Size() (n int)
- func (m *ContentSpecial) String() string
- func (m *ContentSpecial) Unmarshal(dAtA []byte) error
- type DM
- func (d *DM) AttrSet(v int32, bit uint)
- func (d *DM) AttrVal(bit uint) int32
- func (*DM) Descriptor() ([]byte, []int)
- func (d *DM) GetSpecialSeg() (msg string)
- func (m *DM) Marshal() (dAtA []byte, err error)
- func (m *DM) MarshalTo(dAtA []byte) (int, error)
- func (d *DM) NeedDisplay() bool
- func (d *DM) NeedUpdateSpecial(old *DM) bool
- func (*DM) ProtoMessage()
- func (m *DM) Reset()
- func (m *DM) Size() (n int)
- func (m *DM) String() string
- func (d *DM) ToElem() (e *Elem)
- func (d *DM) ToXML(realname bool) (s string)
- func (d *DM) ToXMLSeg() (s string)
- func (m *DM) Unmarshal(dAtA []byte) error
- type DMSeg
- func (*DMSeg) Descriptor() ([]byte, []int)
- func (m *DMSeg) Marshal() (dAtA []byte, err error)
- func (m *DMSeg) MarshalTo(dAtA []byte) (int, error)
- func (*DMSeg) ProtoMessage()
- func (m *DMSeg) Reset()
- func (m *DMSeg) Size() (n int)
- func (m *DMSeg) String() string
- func (m *DMSeg) Unmarshal(dAtA []byte) error
- type DMSlice
- type DmSpecial
- type DmSpecialContent
- type Elem
- type Flush
- type FlushDMSeg
- type LiveDanmu
- type Page
- type RankRecentRegion
- type RankRecentResp
- type ReportAction
- type Segment
- type SubTask
- type Subject
- type Subtitle
- type SubtitleAuditMsg
- type SubtitleBody
- type SubtitleItem
- type SubtitlePub
- type SubtitleStatus
- type TaskInfo
- type Transfer
- type Video
- type VideoupMsg
Constants ¶
const ( ActFlushDM = "flush" // 刷新弹幕缓存 ActReportDel = "report_del" // 删除举报弹幕 ActAddDM = "dm_add" // 新增弹幕 ActFlushDMSeg = "dm_seg_flush" // 刷新分段弹幕缓存 )
action from DMAction-T
const ( SpamBlack = 52001 SpamOverflow = 52002 SpamRestrict = 52005 LiveDanmuMsgTypeNormal = 0 )
Spam .
const ( AttrNo = int32(0) // 属性位为0 AttrYes = int32(1) // 属性位为1 AttrProtect = uint(0) // 保护弹幕 StateNormal = int32(0) // 普通状态 StateDelete = int32(1) // 删除状态 StateHide = int32(2) // 隐藏状态 StateBlock = int32(3) // 屏蔽状态 StateFilter = int32(4) // 过滤状态 StateMonitorBefore = int32(5) // 先审后发 StateMonitorAfter = int32(6) // 先发后审 StateSystemFilter = int32(7) // 敏感词过滤 StateReportDelete = int32(8) // 举报删除 StateAdminDelete = int32(9) // 弹幕管理删除 StateUserDelete = int32(10) // 用户删除 StateScriptDelete = int32(11) // 举报脚本删除 StateTaskDel = int32(12) //弹幕任务删除 // 弹幕模式 ModeRolling = int32(1) ModeBottom = int32(4) ModeTop = int32(5) ModeReverse = int32(6) ModeSpecial = int32(7) ModeCode = int32(8) ModeBAS = int32(9) PoolNormal = int32(0) // 普通弹幕池 PoolSubtitle = int32(1) // 字幕弹幕池 PoolSpecial = int32(2) // 特殊弹幕池 MaskPriorityHgih = int32(1) // 弹幕蒙版优先级高 MaskPriorityLow = int32(0) // 弹幕蒙版优先级低 NotFound = int64(-1) )
All const variable use in job
const ( // DefaultVideoEnd 当视频时长不存在或者为0时的默认视频结尾时间点 DefaultVideoEnd = 10 * 60 * 60 * 1000 // DefaultPageSize 默认分段长度 DefaultPageSize = 60 * 6 * 1000 )
const variable
const ( SubTypeVideo = int32(1) // 主题类型 SubStateOpen = int32(0) // 主题打开 SubStateClosed = int32(1) // 主题关闭 AttrSubGuest = uint(0) // 允许游客弹幕 AttrSubSpolier = uint(1) // 允许剧透弹幕 AttrSubMission = uint(2) // 允许活动弹幕 AttrSubAdvance = uint(3) // 允许高级弹幕 AttrSubMonitorBefore = uint(4) // 弹幕先审后发 AttrSubMonitorAfter = uint(5) // 弹幕先发后审 AttrSubMaskOpen = uint(6) // 开启蒙版 AttrSubMaskReady = uint(7) // 蒙版生产完成 MaskPlatWeb int8 = 0 // web端 MaskPlatMbl int8 = 1 // 移动端 MaskPlatAll int8 = 100 //全部端 )
All const variable used in job
const ( TaskStateSearch = int32(2) //查询执行中 TaskStateDelDM = int32(3) //删除执行中 TaskStateFail = int32(4) //执行失败 TaskStatePause = int32(5) //任务中断 TaskStateSuc = int32(6) //执行成功 TaskStateDel = int32(8) //任务被删除 TaskStateWait = int32(9) //等待执行删除 // 数据平台返回的弹幕任务查询状态 TaskSearchSuc = int32(1) // 查询完成 TaskSearchFail = int32(2) // 查询失败 // 企业微信通知 TaskNoticeTitle = "弹幕任务删除过多告警" TaskNoticeContent = "弹幕任务(id:%d, title:%s)已删除%d条弹幕,已经被暂停,请前往管理后台查看" )
const var
const ( StatInit = 0 StatFinished = 1 StatFailed = 2 StatTransfing = 3 )
dm transfer state
const ( // RouteSecondRound 稿件二审消息 RouteSecondRound = "second_round" // RouteAutoOpen = 稿件自动开放浏览 RouteAutoOpen = "auto_open" // RouteForceSync 稿件强制同步 RouteForceSync = "force_sync" // RouteDelayOpen 稿件定时开放浏览 RouteDelayOpen = "delay_open" // VideoStatusOpen 视频开放浏览 VideoStatusOpen = int32(0) //VideoXcodeHDFinish 高清转码完成 VideoXcodeHDFinish = int32(4) //VideoXcodeFinish 视频转码 VideoXcodeFinish = int32(2) )
Variables ¶
var ( ErrInvalidLengthDm = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDm = fmt.Errorf("proto: integer overflow") )
var ( // DefaultPage default page info DefaultPage = &Page{Num: 1, Size: DefaultVideoEnd, Total: 1} )
Functions ¶
func SegmentPoint ¶
SegmentPoint 根据当前段数和视频总时长计算分段的起始时间点
Types ¶
type Action ¶
type Action struct { Action string `json:"action"` Data json.RawMessage `json:"data"` }
Action action message
type BinlogMsg ¶
type BinlogMsg struct { Action string `json:"action"` Table string `json:"table"` New json.RawMessage `json:"new"` Old json.RawMessage `json:"old"` }
BinlogMsg binlog msg produced by canal
type BnjLiveConfig ¶
type BnjLiveConfig struct { DanmuDtarTime string `json:"danmu_start_time"` CommentID int64 `json:"comment_id"` RoomID int64 `json:"room_id"` }
BnjLiveConfig .
type Content ¶
type Content struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"id"` FontSize int32 `protobuf:"varint,2,opt,name=FontSize,proto3" json:"fontsize"` Color int64 `protobuf:"varint,3,opt,name=Color,proto3" json:"color"` Mode int32 `protobuf:"varint,4,opt,name=Mode,proto3" json:"mode"` IP int64 `protobuf:"varint,5,opt,name=IP,proto3" json:"ip"` Plat int32 `protobuf:"varint,6,opt,name=Plat,proto3" json:"plat"` Msg string `protobuf:"bytes,7,opt,name=Msg,proto3" json:"msg"` Ctime go_common_library_time.Time `protobuf:"varint,8,opt,name=Ctime,proto3,casttype=go-common/library/time.Time" json:"ctime"` Mtime go_common_library_time.Time `protobuf:"varint,9,opt,name=Mtime,proto3,casttype=go-common/library/time.Time" json:"mtime"` }
func (*Content) Descriptor ¶
func (*Content) ProtoMessage ¶
func (*Content) ProtoMessage()
type ContentSpecial ¶
type ContentSpecial struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"id"` Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"msg"` Ctime go_common_library_time.Time `protobuf:"varint,3,opt,name=Ctime,proto3,casttype=go-common/library/time.Time" json:"ctime"` Mtime go_common_library_time.Time `protobuf:"varint,4,opt,name=Mtime,proto3,casttype=go-common/library/time.Time" json:"mtime"` }
func (*ContentSpecial) Descriptor ¶
func (*ContentSpecial) Descriptor() ([]byte, []int)
func (*ContentSpecial) Marshal ¶
func (m *ContentSpecial) Marshal() (dAtA []byte, err error)
func (*ContentSpecial) ProtoMessage ¶
func (*ContentSpecial) ProtoMessage()
func (*ContentSpecial) Reset ¶
func (m *ContentSpecial) Reset()
func (*ContentSpecial) Size ¶
func (m *ContentSpecial) Size() (n int)
func (*ContentSpecial) String ¶
func (m *ContentSpecial) String() string
func (*ContentSpecial) Unmarshal ¶
func (m *ContentSpecial) Unmarshal(dAtA []byte) error
type DM ¶
type DM struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"id"` Type int32 `protobuf:"varint,2,opt,name=Type,proto3" json:"type"` Oid int64 `protobuf:"varint,3,opt,name=Oid,proto3" json:"oid"` Mid int64 `protobuf:"varint,4,opt,name=Mid,proto3" json:"mid"` Progress int32 `protobuf:"varint,5,opt,name=Progress,proto3" json:"progress"` Pool int32 `protobuf:"varint,6,opt,name=Pool,proto3" json:"pool"` Attr int32 `protobuf:"varint,7,opt,name=Attr,proto3" json:"attr"` State int32 `protobuf:"varint,8,opt,name=State,proto3" json:"state"` Ctime stime `protobuf:"varint,9,opt,name=Ctime,proto3,casttype=stime" json:"ctime"` Mtime stime `protobuf:"varint,10,opt,name=Mtime,proto3,casttype=stime" json:"mtime"` Content *Content `protobuf:"bytes,11,opt,name=Content" json:"content,omitempty"` ContentSpe *ContentSpecial `protobuf:"bytes,12,opt,name=ContentSpe" json:"content_special,omitempty"` }
func (*DM) Descriptor ¶
func (*DM) ProtoMessage ¶
func (*DM) ProtoMessage()
type DMSeg ¶
type DMSeg struct { Elems []*Elem `protobuf:"bytes,1,rep,name=Elems" json:"dms"` SpecialURL []string `protobuf:"bytes,2,rep,name=SpecialURL" json:"special_url,omitempty"` }
func (*DMSeg) Descriptor ¶
func (*DMSeg) ProtoMessage ¶
func (*DMSeg) ProtoMessage()
type DmSpecialContent ¶
DmSpecialContent .
type Elem ¶
type Elem struct { Attribute string `protobuf:"bytes,1,opt,name=Attribute,proto3" json:"attribute,omitempty"` Content string `protobuf:"bytes,2,opt,name=Content,proto3" json:"content,omitempty"` }
func (*Elem) Descriptor ¶
func (*Elem) ProtoMessage ¶
func (*Elem) ProtoMessage()
type FlushDMSeg ¶
type FlushDMSeg struct { Type int32 `json:"type"` Oid int64 `json:"oid"` Force bool `json:"force"` Page *Page `json:"page"` }
FlushDMSeg flush segment dm cache
type LiveDanmu ¶
type LiveDanmu struct { RoomID int64 `json:"room_id"` UID int64 `json:"uid"` UName string `json:"uname"` UserLevel int32 `json:"user_level"` Color int32 `json:"color"` Content string `json:"content"` Time int64 `json:"time"` MsgType int32 `json:"msg_type"` }
LiveDanmu .
type RankRecentRegion ¶
type RankRecentRegion struct { Aid int64 `json:"aid"` Mid int64 `json:"mid"` Others []*RankRecentRegion `json:"others"` }
RankRecentRegion 分区排行榜
type RankRecentResp ¶
type RankRecentResp struct { Code int32 `json:"code"` List []*RankRecentRegion `json:"list"` Num int32 `json:"num"` }
RankRecentResp .
type ReportAction ¶
type ReportAction struct { Cid int64 `json:"cid"` // 视频id Did int64 `json:"dmid"` // 弹幕id HideTime int64 `json:"hide_time"` // 弹幕隐截止j时间 }
ReportAction report message
type Segment ¶
type Segment struct { Start int64 `json:"ps"` // 分段起始时间 End int64 `json:"pe"` // 分段结束时间 Cnt int64 `json:"cnt"` // 总分段数 Num int64 `json:"num"` // 当前第几段 Duration int64 `json:"duration"` // 视频总时长 }
Segment dm segment struct
func SegmentInfo ¶
SegmentInfo get segment info by start time and video duration.
type SubTask ¶
type SubTask struct { ID int64 Operation int32 Rate int32 Tcount int64 //删除总数 Start time.Time End time.Time }
SubTask .
type Subject ¶
type Subject struct { ID int64 `json:"id"` Type int32 `json:"type"` Oid int64 `json:"oid"` Pid int64 `json:"pid"` Mid int64 `json:"mid"` State int32 `json:"state"` Attr int32 `json:"attr"` ACount int64 `json:"acount"` Count int64 `json:"count"` MCount int64 `json:"mcount"` MoveCnt int64 `json:"move_count"` Maxlimit int64 `json:"maxlimit"` Childpool int32 `json:"childpool"` Ctime stime `json:"ctime"` Mtime stime `json:"mtime"` }
Subject dm_subject.
type Subtitle ¶
type Subtitle struct { ID int64 `json:"id"` Oid int64 `json:"oid"` Type int32 `json:"type"` Lan uint8 `json:"lan"` Aid int64 `json:"aid"` Mid int64 `json:"mid"` UpMid int64 `json:"up_mid"` Status SubtitleStatus `json:"status"` SubtitleURL string `json:"subtitle_url"` PubTime int64 `json:"pub_time"` RejectComment string `json:"reject_comment"` }
Subtitle .
type SubtitleAuditMsg ¶
SubtitleAuditMsg .
type SubtitleBody ¶
type SubtitleBody struct { FontSize float64 `json:"font_size,omitempty"` FontColor string `json:"font_color,omitempty"` BackgroundAlpha float64 `json:"background_alpha,omitempty"` BackgroundColor string `json:"background_color,omitempty"` Stroke string `json:"Stroke,omitempty"` Bodys []*SubtitleItem `json:"body"` }
SubtitleBody .
type SubtitleItem ¶
type SubtitleItem struct { From float64 `json:"from"` To float64 `json:"to"` Location int8 `json:"location"` Content string `json:"content"` }
SubtitleItem .
type SubtitlePub ¶
SubtitlePub .
type SubtitleStatus ¶
type SubtitleStatus uint8
SubtitleStatus .
const ( SubtitleStatusUnknown SubtitleStatus = iota SubtitleStatusDraft SubtitleStatusToAudit SubtitleStatusAuditBack SubtitleStatusRemove SubtitleStatusPublish SubtitleStatusCheckToAudit SubtitleStatusCheckPublish )
SubtitleStatus
type TaskInfo ¶
type TaskInfo struct { ID int64 Topic string State int32 Count int64 Result string Sub int32 LastIndex int32 Priority int64 Title string Creator string Reviewer string }
TaskInfo .
type Transfer ¶
type Transfer struct { ID int64 FromCid int64 ToCid int64 Mid int64 Offset float64 State int8 Dmid int64 Ctime time.Time Mtime time.Time }
Transfer dm transfer task
type Video ¶
type Video struct { Aid int64 `json:"aid"` Cid int64 `json:"cid"` Mid int64 `json:"mid"` Duration int64 `json:"duration"` Status int32 `json:"status"` XCodeState int32 `json:"xcode_state"` }
Video video info.
type VideoupMsg ¶
VideoupMsg second round msg from VideoupBvc.