Documentation ¶
Overview ¶
Package model is a generated protocol buffer package.
It is generated from these files:
dm.proto
It has these top-level messages:
DM Content ContentSpecial
Index ¶
- Constants
- Variables
- func SegmentPoint(num, duration int64) (ps, pe int64)
- type BinlogMsg
- type Content
- func (*Content) Descriptor() ([]byte, []int)
- func (m *Content) GetColor() int64
- func (m *Content) GetCtime() go_common_time.Time
- func (m *Content) GetFontSize() int32
- func (m *Content) GetID() int64
- func (m *Content) GetIP() int64
- func (m *Content) GetMode() int32
- func (m *Content) GetMsg() string
- func (m *Content) GetMtime() go_common_time.Time
- func (m *Content) GetPlat() int32
- 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) GetCtime() go_common_time.Time
- func (m *ContentSpecial) GetID() int64
- func (m *ContentSpecial) GetMsg() string
- func (m *ContentSpecial) GetMtime() go_common_time.Time
- 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 (m *DM) GetAttr() int32
- func (m *DM) GetContent() *Content
- func (m *DM) GetContentSpe() *ContentSpecial
- func (m *DM) GetCtime() stime
- func (m *DM) GetID() int64
- func (m *DM) GetMid() int64
- func (m *DM) GetMtime() stime
- func (m *DM) GetOid() int64
- func (m *DM) GetPool() int32
- func (m *DM) GetProgress() int32
- func (m *DM) GetState() int32
- func (m *DM) GetType() int32
- func (m *DM) Marshal() (dAtA []byte, err error)
- func (m *DM) MarshalTo(dAtA []byte) (int, error)
- func (d *DM) NeedDisplay() bool
- func (d *DM) NeedStateNormal(old *DM) bool
- func (*DM) ProtoMessage()
- func (m *DM) Reset()
- func (m *DM) Size() (n int)
- func (m *DM) String() string
- func (m *DM) Unmarshal(dAtA []byte) error
- type Segment
- type Subject
- type Trim
Constants ¶
View Source
const ( AttrNo = int32(0) AttrYes = int32(1) // platform PlatUnknow = int32(0) PlatWeb = int32(1) PlatAndroid = int32(2) PlatIPhone = int32(3) PlatWpM = int32(4) // wp mobile PlatIPad = int32(5) PlatPadHd = int32(6) // ipad hd PlatWpPc = int32(7) // win10 // dm state StateNormal = int32(0) // 普通状态 StateDelete = int32(1) // 删除状态 StateHide = int32(2) // 隐藏状态 StateBlock = int32(3) // 屏蔽状态 StateFilter = int32(4) // 过滤状态 StateMonitorBefore = int32(5) // 先审后发 StateMonitorAfter = int32(6) // 先发后审 // dm attribute AttrProtect = uint(0) // 保护弹幕 // dm pool PoolNormal = int32(0) // 普通弹幕池 PoolSubtitle = int32(1) // 字幕弹幕池 PoolSpecial = int32(2) // 特殊弹幕池 // dm mode ModeNormal = int32(1) // 正常滚动弹幕 ModeBottom = int32(4) // 底部弹幕 ModeTop = int32(5) // 顶部弹幕 ModeReverse = int32(6) // 逆向滚动弹幕 ModeAdvance = int32(7) // 高级弹幕 ModeCode = int32(8) // 代码弹幕 NotFound = int64(-1) )
all const variable used in job
View Source
const ( // binlog type SyncInsert = "insert" SyncUpdate = "update" SyncDelete = "delete" )
All const variable used in job
View Source
const ( // DefaultVideoEnd 当视频时长不存在或者为0时的默认视频结尾时间点 DefaultVideoEnd = int64(10 * 60 * 60 * 1000) // SubTypeVideo 主题类型 SubTypeVideo = int32(1) // SubStateOpen 主题打开 SubStateOpen = int32(0) // SubStateClosed 主题关闭 SubStateClosed = int32(1) // AttrSubGuest 允许游客弹幕 AttrSubGuest = uint(0) // AttrSubSpolier 允许剧透弹幕 AttrSubSpolier = uint(1) // AttrSubMission 允许活动弹幕 AttrSubMission = uint(2) // AttrSubAdvance 允许高级弹幕 AttrSubAdvance = uint(3) // AttrSubMonitorBefore 弹幕先审后发 AttrSubMonitorBefore = uint(4) // AttrSubMonitorAfter 弹幕先发后审 AttrSubMonitorAfter = uint(5) )
Variables ¶
View Source
var ( ErrInvalidLengthDm = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDm = fmt.Errorf("proto: integer overflow") )
Functions ¶
func SegmentPoint ¶
SegmentPoint 根据当前段数和视频总时长计算分段的起始时间点
Types ¶
type BinlogMsg ¶
type BinlogMsg struct { Action string `json:"action"` Table string `json:"table"` New json.RawMessage `json:"new"` Old json.RawMessage `json:"old"` }
BinlogMsg dm binlog msg
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_time.Time `protobuf:"varint,8,opt,name=Ctime,proto3,casttype=go-common/library/time.Time" json:"ctime"` Mtime go_common_time.Time `protobuf:"varint,9,opt,name=Mtime,proto3,casttype=go-common/library/time.Time" json:"mtime"` }
func (*Content) Descriptor ¶
func (*Content) GetCtime ¶
func (m *Content) GetCtime() go_common_time.Time
func (*Content) GetFontSize ¶
func (*Content) GetMtime ¶
func (m *Content) GetMtime() go_common_time.Time
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_time.Time `protobuf:"varint,3,opt,name=Ctime,proto3,casttype=go-common/library/time.Time" json:"ctime"` Mtime go_common_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) GetCtime ¶
func (m *ContentSpecial) GetCtime() go_common_time.Time
func (*ContentSpecial) GetID ¶
func (m *ContentSpecial) GetID() int64
func (*ContentSpecial) GetMsg ¶
func (m *ContentSpecial) GetMsg() string
func (*ContentSpecial) GetMtime ¶
func (m *ContentSpecial) GetMtime() go_common_time.Time
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) GetContent ¶
func (*DM) GetContentSpe ¶
func (m *DM) GetContentSpe() *ContentSpecial
func (*DM) GetProgress ¶
func (*DM) NeedStateNormal ¶
NeedStateNormal 判断是否更新状态 pool0 变为 pool1 状态正常 变为保护弹幕 状态正常
func (*DM) ProtoMessage ¶
func (*DM) ProtoMessage()
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 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 time.Time `json:"ctime"` MTime time.Time `json:"mtime"` }
Subject dm_subject.
Click to show internal directories.
Click to hide internal directories.