Documentation
¶
Index ¶
- Constants
- Variables
- type AnchorLotAward
- type AnchorLotAwardUser
- type AnchorLotCheckStatus
- type AnchorLotEnd
- type AnchorLotStart
- type BlindGift
- type ComboSend
- type DanmakuMsg
- type DanmakuMsgSender
- type DanmakuMsgStyle
- type EntryEffect
- type GuardBuy
- type HotRankChanged
- type HotRankSettlement
- type InteractWord
- type LiveInteractiveGame
- type MedalInfo
- type OnlineRankCount
- type RoomRealtimeMessageUpdate
- type SendGift
- type StopLiveRoomList
- type SuperChatMessage
- type SuperChatMessageDelete
- type SuperChatMessageJpn
- type UserInfo
- type UserToastMsg
Constants ¶
View Source
const ( GUARD_LEVEL_SOUTOKU = 1 GUARD_LEVEL_TEITOKU = 2 GUARD_LEVEL_KANCHOU = 3 )
View Source
const ( COIN_TYPE_SILVER = "silver" COIN_TYPE_GOLD = "gold" )
Variables ¶
View Source
var ErrDanmakuRawDataIsNotArray error = errors.New("danmaku raw data is not array")
Functions ¶
This section is empty.
Types ¶
type AnchorLotAward ¶
type AnchorLotAward struct { ID int64 `json:"id"` AwardImage string `json:"award_image"` AwardName string `json:"award_name"` AwardNum int `json:"award_num"` AwardUsers []AnchorLotAwardUser `json:"award_users"` LotStatus int `json:"lot_status"` // 2 might be lottery end Url string `json:"url"` WebUrl string `json:"web_url"` }
func (*AnchorLotAward) Decode ¶
func (i *AnchorLotAward) Decode(data []byte) error
type AnchorLotAwardUser ¶
type AnchorLotCheckStatus ¶
type AnchorLotCheckStatus struct { ID int64 `json:"id"` Status int `json:"status"` AnchorUID int64 `json:"uid"` RejectReason string `json:"reject_reason"` }
func (*AnchorLotCheckStatus) Decode ¶
func (i *AnchorLotCheckStatus) Decode(data []byte) error
type AnchorLotEnd ¶
type AnchorLotEnd struct {
ID int64 `json:"id"`
}
func (*AnchorLotEnd) Decode ¶
func (i *AnchorLotEnd) Decode(data []byte) error
type AnchorLotStart ¶
type AnchorLotStart struct { ID int64 `json:"id"` AssetIcon string `json:"asset_icon"` AwardImage string `json:"award_image"` AwardName string `json:"award_name"` AwardNum int `json:"award_num"` CurGiftNum int `json:"cur_gift_num"` CurrentTime int64 `json:"current_time"` // unix timestamp Danmaku string `json:"danmu"` GiftID int64 `json:"gift_id"` GiftName string `json:"gift_name"` GiftNum int `json:"gift_num"` GiftPrice int64 `json:"gift_price"` // 单位:金瓜子 GoAwayTime int `json:"goaway_time"` // in seconds GoodsID int64 `json:"goods_id"` IsBroadcast int `json:"is_broadcast"` JoinType int `json:"join_type"` LotStatus int `json:"lot_status"` MaxTime int `json:"max_time"` // in seconds RequireText string `json:"require_text"` RequireType int `json:"require_type"` // 2 means anchor medal level reach $require_value RequireValue int64 `json:"require_value"` RoomID int `json:"room_id"` SendGiftEnsure int `json:"send_gift_ensure"` ShowPanel int `json:"show_panel"` Status int `json:"status"` RemainTime int `json:"time"` // in seconds Url string `json:"url"` WebUrl string `json:"web_url"` }
func (*AnchorLotStart) Decode ¶
func (i *AnchorLotStart) Decode(data []byte) error
type ComboSend ¶
type ComboSend struct { Action string `json:"action"` BatchComboID string `json:"batch_combo_id"` BatchComboNum int `json:"batch_combo_num"` ComboID string `json:"combo_id"` ComboNum int `json:"combo_num"` ComboTotalCoin int64 `json:"combo_total_coin"` DMScore int64 `json:"dmscore"` GiftID int64 `json:"gift_id"` GiftName string `json:"gift_name"` GiftNum int `json:"gift_num"` IsShow int `json:"is_show"` Medal MedalInfo `json:"medal_info"` NameColor string `json:"name_color"` RecieverUserName string `json:"r_uname"` RecieverUID int64 `json:"ruid"` SendMaster interface{} `json:"send_master"` TotalNum int `json:"total_num"` UID int64 `json:"uid"` UserName string `json:"uname"` }
type DanmakuMsg ¶
type DanmakuMsg struct { Style DanmakuMsgStyle Content string Sender DanmakuMsgSender }
func (*DanmakuMsg) Decode ¶
func (i *DanmakuMsg) Decode(data []byte) error
type DanmakuMsgSender ¶
type DanmakuMsgStyle ¶
type DanmakuMsgStyle struct { DisplayMode int // 弹幕显示模式(滚动、顶部、底部) FontSize int Color int64 Timestamp int64 Rnd int64 CRC32 string MsgType int // 是否礼物弹幕(节奏风暴) Bubble int IsEmotion bool // 是否是表情图片弹幕 Emotion struct { BulgeDisplay int `json:"bulge_display"` EmotionUnique string `json:"emoticon_unique"` // 表情ID Height int `json:"height"` // 单位:像素 InPlayerArea int `json:"in_player_area"` IsDynamic int `json:"is_dynamic"` Url string `json:"url"` // 表情图片URL Width int `json:"width"` // 单位:像素 } Extra struct { Mode int `json:"mode"` ShowPlayerType int `json:"show_player_type"` Extra string `json:"extra"` // json string } }
type EntryEffect ¶
type EntryEffect struct { ID int64 `json:"id"` UID int64 `json:"uid"` TargetID int64 `json:"target_id"` // 直播间主播UID MockEffect int `json:"mock_effect"` Face string `json:"face"` PrivilegeType int `json:"privilege_type"` CopyWritting string `json:"copy_writing"` // 欢迎舰长XXX进入直播间 CopyColor string `json:"copy_color"` HighlightColor string `json:"highlight_color"` Priority int `json:"priority"` BasemapUrl string `json:"basemap_url"` ShowAvatar int `json:"show_avatar"` EffectiveTime int `json:"effective_time"` WebBasemapUrl string `json:"web_basemap_url"` WebEffectiveTime int `json:"web_effective_time"` WebEffectClose int `json:"web_effect_close"` WebCloseTime int `json:"web_close_time"` Business int `json:"business"` CopyWrittingV2 string `json:"copy_writing_v2"` IconList []int64 `json:"icon_list"` MaxDelayTime int `json:"max_delay_time"` TriggerTime int64 `json:"trigger_time"` // 单位:纳秒 Identities int `json:"identities"` }
func (*EntryEffect) Decode ¶
func (i *EntryEffect) Decode(data []byte) error
type GuardBuy ¶
type GuardBuy struct { UID int64 `json:"uid"` UserName string `json:"username"` GuardLevel int `json:"guard_level"` Num int `json:"num"` Price int64 `json:"price"` // 单位:金瓜子 GiftID int64 `json:"gift_id"` GiftName string `json:"gift_name"` // 舰长、提督、总督 StartTime int64 `json:"start_time"` // unix timestamp EndTime int64 `json:"end_time"` }
type HotRankChanged ¶
type HotRankChanged struct { Rank int `json:"rank"` Trend int `json:"trend"` CountDown int `json:"countdown"` Timestamp int64 `json:"timestamp"` WebUrl string `json:"web_url"` LiveUrl string `json:"live_url"` BlinkUrl string `json:"blink_url"` LiveLinkUrl string `json:"live_link_url"` PcLinkUrl string `json:"pc_link_url"` Icon string `json:"icon"` AreaName string `json:"area_name"` RankDesc string `json:"rank_desc"` }
func (*HotRankChanged) Decode ¶
func (i *HotRankChanged) Decode(data []byte) error
type HotRankSettlement ¶
type HotRankSettlement struct { AreaName string `json:"area_name"` CacheKey string `json:"cache_key"` DMMsg string `json:"dm_msg"` DMScore int64 `json:"dmscore"` Face string `json:"face"` Icon string `json:"icon"` Rank int `json:"rank"` Timestamp int64 `json:"timestamp"` UserName string `json:"uname"` Url string `json:"url"` }
func (*HotRankSettlement) Decode ¶
func (i *HotRankSettlement) Decode(data []byte) error
type InteractWord ¶
type InteractWord struct { Contribution struct { Grade int `json:"grade"` } `json:"contribution"` DMScore int64 `json:"dmscore"` Medal MedalInfo `json:"fans_medal"` Indentities []int `json:"identities"` IsSpread int `json:"is_spread"` MsgType int `json:"msg_type"` RoomID int `json:"roomid"` Score int64 `json:"score"` SpreadDesc string `json:"spread_desc"` SpreadInfo string `json:"spread_info"` TallIcon int `json:"tail_icon"` Timestamp int64 `json:"timestamp"` TriggerTime int64 `json:"trigger_time"` // 单位:纳秒 UID int64 `json:"uid"` UserName string `json:"uname"` UserNameColor string `json:"uname_color"` }
func (*InteractWord) Decode ¶
func (i *InteractWord) Decode(data []byte) error
type LiveInteractiveGame ¶
type LiveInteractiveGame struct { Type int `json:"type"` UID int64 `json:"uid"` UserName string `json:"uname"` UserFace string `json:"uface"` GiftID int64 `json:"gift_id"` GiftName string `json:"gift_name"` GiftNum int `json:"gift_num"` Price int64 `json:"price"` // 单位:金瓜子 Paid bool `json:"paid"` Msg string `json:"msg"` FansMedalLevel int `json:"fans_medal_level"` GuardLevel int `json:"guard_level"` Timestamp int64 `json:"timestamp"` AnchorLottery interface{} `json:"anchor_lottery"` PKInfo interface{} `json:"pk_info"` AnchorInfo struct { UID int64 `json:"uid"` UserName string `json:"uname"` UserFace string `json:"uface"` } `json:"anchor_info"` }
func (*LiveInteractiveGame) Decode ¶
func (i *LiveInteractiveGame) Decode(data []byte) error
type MedalInfo ¶
type MedalInfo struct { AnchorRoomID int `json:"anchor_roomid"` AnchorName string `json:"anchor_uname"` GuardLevel int `json:"guard_level"` // 1-总督 2-提督 3-舰长 IconID int64 `json:"icon_id"` IsLighted int `json:"is_lighted"` MedalColor interface{} `json:"medal_color"` // maybe float64(integer) or string(in SUPER_CHAT_MESSAGE) <- Fxxk bulibuli MedalColorBorder int64 `json:"medal_color_border"` MedalColorEnd int64 `json:"medal_color_end"` MedalColorStart int64 `json:"medal_color_start"` MedalLevel int `json:"medal_level"` MedalName string `json:"medal_name"` Special string `json:"special"` TargetID int64 `json:"target_id"` // 主播UID Score int `json:"score"` }
type OnlineRankCount ¶
type OnlineRankCount struct {
Count int `json:"count"`
}
func (*OnlineRankCount) Decode ¶
func (i *OnlineRankCount) Decode(data []byte) error
type RoomRealtimeMessageUpdate ¶
type RoomRealtimeMessageUpdate struct { RoomID int `json:"roomid"` Fans int `json:"fans"` RedNotice int `json:"red_notice"` FansClub int `json:"fans_club"` }
func (*RoomRealtimeMessageUpdate) Decode ¶
func (i *RoomRealtimeMessageUpdate) Decode(data []byte) error
type SendGift ¶
type SendGift struct { Action string `json:"action"` BatchComboID string `json:"batch_combo_id"` BatchComboSend *struct { Action string `json:"action"` BatchComboID string `json:"batch_combo_id"` BatchComboNum int `json:"batch_combo_num"` BlindGift *BlindGift `json:"blind_gift"` GiftID int64 `json:"gift_id"` GiftName string `json:"gift_name"` GiftNum int `json:"gift_num"` SendMaster interface{} `json:"send_master"` UID int64 `json:"uid"` UserName string `json:"uname"` } `json:"batch_combo_send"` BeatID string `json:"beatId"` BizSource string `json:"biz_source"` BlindGift *BlindGift `json:"blind_gift"` BroadcastID int64 `json:"broadcast_id"` CoinType string `json:"coin_type"` // silver or gold ComboResourceID int64 `json:"combo_resources_id"` ComboSend *struct { Action string `json:"action"` ComboID string `json:"combo_id"` ComboNum int `json:"combo_num"` GiftID int64 `json:"gift_id"` GiftName string `json:"gift_name"` GiftNum int `json:"gift_num"` SendMaster interface{} `json:"send_master"` UID int64 `json:"uid"` UserName string `json:"uname"` } `json:"combo_send"` ComboStayTime int `json:"combo_stay_time"` ComboTotalCoin int64 `json:"combo_total_coin"` CritProb int `json:"crit_prob"` Demarcation int `json:"demarcation"` DiscountPrice int64 `json:"discount_price"` DMScore int64 `json:"dmscore"` Draw int `json:"draw"` Effect int `json:"effect"` EffectBlock int `json:"effect_block"` Face string `json:"face"` FloatSCResourceID int64 `json:"float_sc_resource_id"` GiftID int64 `json:"giftId"` GiftName string `json:"giftName"` GiftType int `json:"giftType"` Gold int64 `json:"gold"` GuardLevel int `json:"guard_level"` IsFirst bool `json:"is_first"` IsSpecialbatch int `json:"is_special_batch"` Magnification float64 `json:"magnification"` Medal MedalInfo `json:"medal_info"` NameColor string `json:"name_color"` Num int `json:"num"` OriginalGiftName string `json:"original_gift_name"` Price int64 `json:"price"` RCost int64 `json:"rcost"` Remain int `json:"remain"` Rnd string `json:"rnd"` SendMaster interface{} `json:"send_master"` Silver int `json:"silver"` Super int `json:"super"` SuperBatchGiftNum int `json:"super_batch_gift_num"` SuperGiftNum int `json:"super_gift_num"` SvgaBlock int `json:"svga_block"` TagImage string `json:"tag_image"` Tid string `json:"tid"` Timestamp int64 `json:"timestamp"` TopList interface{} `json:"top_list"` TotalCoin int64 `json:"total_coin"` UID int64 `json:"uid"` UserName string `json:"uname"` }
type StopLiveRoomList ¶
type StopLiveRoomList struct {
RoomIDList []int `json:"room_id_list"`
}
func (*StopLiveRoomList) Decode ¶
func (i *StopLiveRoomList) Decode(data []byte) error
type SuperChatMessage ¶
type SuperChatMessage struct { ID int64 `json:"id"` BackgroundBottomColor string `json:"background_bottom_color"` BackgroundColor string `json:"background_color"` BackgroundColorEnd string `json:"background_color_end"` BackgroundColorStart string `json:"background_color_start"` BackgroundIcon string `json:"background_icon"` BackgroundImage string `json:"background_image"` BackgroundPriceColor string `json:"background_price_color"` ColorPoint float64 `json:"color_point"` DMScore int64 `json:"dmscore"` Time int `json:"time"` // 持续秒数 StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` Gift struct { GiftID int64 `json:"gift_id"` GiftName string `json:"gift_name"` Num int `json:"num"` } `json:"gift"` IsRanked int `json:"is_ranked"` IsSendAudit int `json:"is_send_audit"` Medal MedalInfo `json:"medal_info"` Message string `json:"message"` MessageFontColor string `json:"message_font_color"` MessageTrans string `json:"message_trans"` Price int `json:"price"` // 单位:人民币 Rate int `json:"rate"` Token string `json:"token"` TransMark int `json:"trans_mark"` Timestamp int64 `json:"ts"` UID int64 `json:"uid"` User UserInfo `json:"user_info"` }
func (*SuperChatMessage) Decode ¶
func (i *SuperChatMessage) Decode(data []byte) error
type SuperChatMessageDelete ¶
type SuperChatMessageDelete struct {
Ids []int64 `json:"ids"`
}
func (*SuperChatMessageDelete) Decode ¶
func (i *SuperChatMessageDelete) Decode(data []byte) error
type SuperChatMessageJpn ¶
type SuperChatMessageJpn struct { ID string `json:"id"` UID string `json:"uid"` Price int `json:"price"` // 单位:人民币 Rate int `json:"rate"` Message string `json:"message"` MessageJpn string `json:"message_jpn"` IsRanked int `json:"is_ranked"` BackgroundImage string `json:"background_image"` BackgroundColor string `json:"background_color"` BackgroundIcon string `json:"background_icon"` BackgroundPriceColor string `json:"background_price_color"` BackgroundBottomColor string `json:"background_bottom_color"` Timestamp int64 `json:"ts"` Token string `json:"token"` Medal MedalInfo `json:"medal_info"` User UserInfo `json:"user_info"` Time int `json:"time"` // 持续秒数 StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` Gift struct { GiftID int64 `json:"gift_id"` GiftName string `json:"gift_name"` Num int `json:"num"` } `json:"gift"` }
func (*SuperChatMessageJpn) Decode ¶
func (i *SuperChatMessageJpn) Decode(data []byte) error
type UserInfo ¶
type UserInfo struct { UserName string `json:"uname"` Face string `json:"face"` FaceFrame string `json:"face_frame"` GuardLevel int `json:"guard_level"` UserLevel int `json:"user_level"` LevelColor string `json:"level_color"` IsVIP int `json:"is_vip"` IsSVIP int `json:"is_svip"` IsMainVIP int `json:"is_main_vip"` Title string `json:"title"` Manager int `json:"manager"` NameColor string `json:"name_color"` }
type UserToastMsg ¶
type UserToastMsg struct { AnchorShow bool `json:"anchor_show"` Color string `json:"color"` DMScore int64 `json:"dmscore"` StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` GuardLevel int `json:"guard_level"` IsShow int `json:"is_show"` Num int `json:"num"` OpType int `json:"op_type"` PayFlowID string `json:"payflow_id"` Price int64 `json:"price"` // 单位:金瓜子 RoleName string `json:"role_name"` // 舰长 SvgaBlock int `json:"svga_block"` TargetGuardCount int `json:"target_guard_count"` ToastMsg string `json:"toast_msg"` // XXX自动续费了舰长 UID int64 `json:"uid"` Unit string `json:"unit"` // “月” UserShow bool `json:"user_show"` UserName string `json:"username"` }
func (*UserToastMsg) Decode ¶
func (i *UserToastMsg) Decode(data []byte) error
Source Files
¶
- anchor_lot_award.go
- anchor_lot_checkstatus.go
- anchor_lot_end.go
- anchor_lot_start.go
- combo_send.go
- danmu_msg.go
- entry_effect.go
- guard_buy.go
- hot_rank_changed.go
- hot_rank_settlement.go
- interact_word.go
- live_interactive_game.go
- online_rank_count.go
- room_real_time_message_update.go
- send_gift.go
- stop_live_room_list.go
- super_chat_message.go
- super_chat_message_delete.go
- super_chat_message_jpn.go
- user_toast_msg.go
Click to show internal directories.
Click to hide internal directories.