Documentation ¶
Overview ¶
Package dto 接口通用数据传输对象
Index ¶
- type AnchorLotAward
- type AnchorLotCheckStatus
- type AnchorLotEnd
- type AnchorLotStart
- type ComboSend
- type CommonNoticeDanmaku
- type Danmaku
- type EntryEffect
- type EventType
- type FansChange
- type Gift
- type Guard
- type HotRankChanged
- type HotRankChangedV2
- type HotRankSettlement
- type HotRankSettlementV2
- type InteractWord
- type InteractiveGame
- type MatchRoomConf
- type Medal
- type NoticeMsg
- type OPCode
- type OnlineRankCount
- type OnlineRankTop3
- type OnlineRankV2
- type PopularityRedPocketStart
- type PopularityRedPocketWinnerList
- type ProtoVer
- type RoomBlockMsg
- type RoomChange
- type StopLiveRoomList
- type SuperChat
- type SuperChatDelete
- type TradingScore
- type UserToastMsg
- type WSEnterRoomBody
- type WSNotificationBody
- type WSPayload
- type WatchedChange
- type WidgetBanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchorLotAward ¶
type AnchorLotAward struct { AwardDontPopup int `json:"award_dont_popup"` AwardImage string `json:"award_image"` AwardName string `json:"award_name"` AwardNum int `json:"award_num"` AwardUsers []struct { UID int `json:"uid"` Uname string `json:"uname"` Face string `json:"face"` Level int `json:"level"` Color int `json:"color"` } `json:"award_users"` ID int `json:"id"` LotStatus int `json:"lot_status"` URL string `json:"url"` WebURL string `json:"web_url"` }
AnchorLotAward 天选之人中奖完整信息
type AnchorLotCheckStatus ¶
type AnchorLotCheckStatus struct { ID int `json:"id"` RejectReason string `json:"reject_reason"` Status int `json:"status"` UID int `json:"uid"` }
AnchorLotCheckStatus 天选之人相关
type AnchorLotStart ¶
type AnchorLotStart struct { 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 int `json:"current_time"` Danmu string `json:"danmu"` GiftID int `json:"gift_id"` GiftName string `json:"gift_name"` GiftNum int `json:"gift_num"` GiftPrice int `json:"gift_price"` GoawayTime int `json:"goaway_time"` GoodsID int `json:"goods_id"` ID int `json:"id"` IsBroadcast int `json:"is_broadcast"` JoinType int `json:"join_type"` LotStatus int `json:"lot_status"` MaxTime int `json:"max_time"` RequireText string `json:"require_text"` RequireType int `json:"require_type"` RequireValue int `json:"require_value"` RoomId int `json:"room_id"` SendGiftEnsure int `json:"send_gift_ensure"` ShowPanel int `json:"show_panel"` StartDontPopup int `json:"start_dont_popup"` Status int `json:"status"` Time int `json:"time"` URL string `json:"url"` WebURL string `json:"web_url"` }
AnchorLotStart 天选之人抽奖开始
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 int `json:"combo_total_coin"` DmScore int `json:"dmscore"` GiftID int `json:"gift_id"` GiftName string `json:"gift_name"` GiftNum int `json:"gift_num"` IsShow int `json:"is_show"` MedalInfo Medal `json:"medal_info"` NameColor string `json:"name_color"` RUname string `json:"r_uname"` Ruid int `json:"ruid"` SendMaster interface{} `json:"send_master"` TotalNum int `json:"total_num"` UID int `json:"uid"` Uname string `json:"uname"` }
type CommonNoticeDanmaku ¶
type CommonNoticeDanmaku struct { ContentSegments []struct { FontColor string `json:"font_color"` Text string `json:"text"` Type int `json:"type"` } `json:"content_segments"` DmScore int `json:"dmscore"` Terminals []int `json:"terminals"` }
CommonNoticeDanmaku 提示信息,如'恭喜主播完成"小小花束"任务'
type EntryEffect ¶
type EntryEffect struct { ID int `json:"id"` UID int `json:"uid"` TargetID int `json:"target_id"` MockEffect int `json:"mock_effect"` Face string `json:"face"` PrivilegeType int `json:"privilege_type"` CopyWriting string `json:"copy_writing"` 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"` CopyWritingV2 string `json:"copy_writing_v2"` IconList []interface{} `json:"icon_list"` MaxDelayTime int `json:"max_delay_time"` TriggerTime int64 `json:"trigger_time"` Identities int `json:"identities"` }
type EventType ¶
type EventType string
const ( EventDanmaku EventType = "DANMU_MSG" EventGift EventType = "SEND_GIFT" EventSuperChat EventType = "SUPER_CHAT_MESSAGE" EventSuperChatDelete EventType = "SUPER_CHAT_MESSAGE_DELETE" EventGuard EventType = "GUARD_BUY" EventLive EventType = "LIVE" EventPreparing EventType = "PREPARING" EventEntryEffect EventType = "ENTRY_EFFECT" EventInteractWord EventType = "INTERACT_WORD" EventComboSend EventType = "COMBO_SEND" EventFansChange EventType = "ROOM_REAL_TIME_MESSAGE_UPDATE" EventInteractiveGame EventType = "LIVE_INTERACTIVE_GAME" EventOnlineRankCount EventType = "ONLINE_RANK_COUNT" EventHotRankChanged EventType = "HOT_RANK_CHANGED" EventHotRankChangedV2 EventType = "HOT_RANK_CHANGED_V2" EventHotRankSettlement EventType = "HOT_RANK_SETTLEMENT" EventHotRankSettlementV2 EventType = "HOT_RANK_SETTLEMENT_V2" EventOnlineRankTop3 EventType = "ONLINE_RANK_TOP3" EventOnlineRankV2 EventType = "ONLINE_RANK_V2" EventStopLiveRoomList EventType = "STOP_LIVE_ROOM_LIST" EventWatchedChange EventType = "WATCHED_CHANGE" EventWidgetBanner EventType = "WIDGET_BANNER" EventPopularityRedPocketStart EventType = "POPULARITY_RED_POCKET_START" EventPopularityRedPocketWinnerList EventType = "POPULARITY_RED_POCKET_WINNER_LIST" EventNoticeMsg EventType = "NOTICE_MSG" EventAnchorLotAward EventType = "ANCHOR_LOT_AWARD" EventUserToastMsg EventType = "USER_TOAST_MSG" EventRoomChange EventType = "ROOM_CHANGE" EventRoomBlockMsg EventType = "ROOM_BLOCK_MSG" EventMatchRoomConf EventType = "MATCH_ROOM_CONF" EventCommonNoticeDanmaku EventType = "COMMON_NOTICE_DANMAKU" EventAnchorLotCheckStatus EventType = "ANCHOR_LOT_CHECKSTATUS" EventAnchorLotEnd EventType = "ANCHOR_LOT_END" EventAnchorLotStart EventType = "ANCHOR_LOT_START" EventTradingScore EventType = "TRADING_SCORE" )
cmd事件类型
type FansChange ¶
type Gift ¶
type Gift struct { Action string `json:"action"` BatchComboID string `json:"batch_combo_id"` BatchComboSend interface{} `json:"batch_combo_send"` BeatID string `json:"beatId"` BizSource string `json:"biz_source"` BlindGift interface{} `json:"blind_gift"` BroadcastID int `json:"broadcast_id"` CoinType string `json:"coin_type"` // gold或者silver ComboResourcesID int `json:"combo_resources_id"` ComboSend interface{} `json:"combo_send"` ComboStayTime int `json:"combo_stay_time"` ComboTotalCoin int `json:"combo_total_coin"` CritProb int `json:"crit_prob"` Demarcation int `json:"demarcation"` DiscountPrice int `json:"discount_price"` DmScore int `json:"dmscore"` Draw int `json:"draw"` Effect int `json:"effect"` EffectBlock int `json:"effect_block"` Face string `json:"face"` FloatScResourceID int `json:"float_sc_resource_id"` GiftID int `json:"giftId"` GiftName string `json:"giftName"` GiftType int `json:"giftType"` Gold int `json:"gold"` GuardLevel int `json:"guard_level"` IsFirst bool `json:"is_first"` IsSpecialBatch int `json:"is_special_batch"` Magnification float64 `json:"magnification"` MedalInfo Medal `json:"medal_info"` NameColor string `json:"name_color"` Num int `json:"num"` OriginalGiftName string `json:"original_gift_name"` Price int `json:"price"` // 除以1000后为实际价格(元) Rcost int `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 int `json:"timestamp"` TopList interface{} `json:"top_list"` TotalCoin int `json:"total_coin"` UID int `json:"uid"` Uname string `json:"uname"` }
type Guard ¶
type Guard struct { UID int `json:"uid"` Username string `json:"username"` GuardLevel int `json:"guard_level"` // 3: 舰长, 2: 提督, 1: 总督 Num int `json:"num"` Price int `json:"price"` GiftID int `json:"gift_id"` GiftName string `json:"gift_name"` StartTime int `json:"start_time"` EndTime int `json:"end_time"` }
type HotRankChanged ¶
type HotRankChanged struct { Rank int `json:"rank"` Trend int `json:"trend"` Countdown int `json:"countdown"` Timestamp int `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"` }
type HotRankChangedV2 ¶
type HotRankChangedV2 struct { Rank int `json:"rank"` Trend int `json:"trend"` Countdown int `json:"countdown"` Timestamp int `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"` }
type HotRankSettlement ¶
type HotRankSettlement struct { AreaName string `json:"area_name"` CacheKey string `json:"cache_key"` DmMsg string `json:"dm_msg"` DmScore int `json:"dmscore"` Face string `json:"face"` Icon string `json:"icon"` Rank int `json:"rank"` Timestamp int `json:"timestamp"` Uname string `json:"uname"` Url string `json:"url"` }
type HotRankSettlementV2 ¶
type InteractWord ¶
type InteractWord struct { Contribution struct { Grade int `json:"grade"` } `json:"contribution"` DmScore int `json:"dmscore"` FansMedal Medal `json:"fans_medal"` Identities []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"` TailIcon int `json:"tail_icon"` Timestamp int `json:"timestamp"` TriggerTime int64 `json:"trigger_time"` UID int `json:"uid"` Uname string `json:"uname"` UnameColor string `json:"uname_color"` }
type InteractiveGame ¶
type InteractiveGame struct { Type int `json:"type"` UID int `json:"uid"` Uname string `json:"uname"` UFace string `json:"uface"` GiftID int `json:"gift_id"` GiftName string `json:"gift_name"` GiftNum int `json:"gift_num"` Price int `json:"price"` Paid bool `json:"paid"` Msg string `json:"msg"` FansMedalLevel int `json:"fans_medal_level"` GuardLevel int `json:"guard_level"` Timestamp int `json:"timestamp"` AnchorLottery interface{} `json:"anchor_lottery"` PkInfo interface{} `json:"pk_info"` AnchorInfo struct { UID int `json:"uid"` Uname string `json:"uname"` UFace string `json:"uface"` } `json:"anchor_info"` }
type MatchRoomConf ¶
type MatchRoomConf struct { Type string `json:"type"` CloseButton string `json:"close_button"` ForcePush string `json:"force_push"` ButtonName string `json:"button_name"` Background string `json:"background"` ConfID string `json:"conf_id"` ConfName string `json:"conf_name"` RoomsInfo []struct { RoomID string `json:"room_id"` RoomName string `json:"room_name"` LiveStatus int `json:"live_status"` } `json:"rooms_info"` SeasonInfo []interface{} `json:"season_info"` BackgroundURL string `json:"background_url"` Scatter struct { Max int `json:"max"` Min int `json:"min"` } `json:"scatter"` ButtonLink string `json:"button_link"` RoomsColor struct { FontColor string `json:"font_color"` BackgroundColor string `json:"background_color"` BorderColor string `json:"border_color"` } `json:"rooms_color"` State int `json:"state"` }
MatchRoomConf 未知
type Medal ¶
type Medal struct { AnchorRoomID int `json:"anchor_roomid"` AnchorUname string `json:"anchor_uname"` GuardLevel int `json:"guard_level"` IconID int `json:"icon_id"` IsLighted int `json:"is_lighted"` MedalColor int `json:"medal_color"` MedalColorBorder int `json:"medal_color_border"` MedalColorEnd int `json:"medal_color_end"` MedalColorStart int `json:"medal_color_start"` MedalLevel int `json:"medal_level"` MedalName string `json:"medal_name"` Special string `json:"special"` TargetID int `json:"target_id"` }
type NoticeMsg ¶
type NoticeMsg struct { ID int `json:"id"` Name string `json:"name"` Full struct { HeadIcon string `json:"head_icon"` TailIcon string `json:"tail_icon"` HeadIconFa string `json:"head_icon_fa"` TailIconFa string `json:"tail_icon_fa"` HeadIconFan int `json:"head_icon_fan"` TailIconFan int `json:"tail_icon_fan"` Background string `json:"background"` Color string `json:"color"` Highlight string `json:"highlight"` Time int `json:"time"` } `json:"full"` Half struct { HeadIcon string `json:"head_icon"` TailIcon string `json:"tail_icon"` Background string `json:"background"` Color string `json:"color"` Highlight string `json:"highlight"` Time int `json:"time"` } `json:"half"` Side struct { HeadIcon string `json:"head_icon"` Background string `json:"background"` Color string `json:"color"` Highlight string `json:"highlight"` Border string `json:"border"` } `json:"side"` RoomID int `json:"roomid"` RealRoomID int `json:"real_roomid"` MsgCommon string `json:"msg_common"` MsgSelf string `json:"msg_self"` LinkURL string `json:"link_url"` MsgType int `json:"msg_type"` ShieldUID int `json:"shield_uid"` BusinessID string `json:"business_id"` Scatter struct { Min int `json:"min"` Max int `json:"max"` } `json:"scatter"` MarqueeID string `json:"marquee_id"` NoticeType int `json:"notice_type"` }
type OPCode ¶
type OPCode int
OPCode The WebSocket OpCode.
const ( Heartbeat OPCode HeartbeatResponse Notification RoomEnter RoomEnterResponse )
WS opcodes
type OnlineRankCount ¶
type OnlineRankCount struct {
Count int `json:"count"`
}
type OnlineRankTop3 ¶
type OnlineRankV2 ¶
type PopularityRedPocketStart ¶
type PopularityRedPocketStart struct { LotId int `json:"lot_id"` SenderUid int `json:"sender_uid"` SenderName string `json:"sender_name"` SenderFace string `json:"sender_face"` JoinRequirement int `json:"join_requirement"` Danmu string `json:"danmu"` CurrentTime int `json:"current_time"` StartTime int `json:"start_time"` EndTime int `json:"end_time"` LastTime int `json:"last_time"` RemoveTime int `json:"remove_time"` ReplaceTime int `json:"replace_time"` LotStatus int `json:"lot_status"` H5Url string `json:"h5_url"` UserStatus int `json:"user_status"` Awards []struct { GiftID int `json:"gift_id"` GiftName string `json:"gift_name"` GiftPic string `json:"gift_pic"` Num int `json:"num"` } `json:"awards"` LotConfigId int `json:"lot_config_id"` TotalPrice int `json:"total_price"` }
type PopularityRedPocketWinnerList ¶
type PopularityRedPocketWinnerList struct { LotId int `json:"lot_id"` TotalNum int `json:"total_num"` WinnerInfo []struct { Uid int `json:"uid"` Name string `json:"name"` UserType int `json:"user_type"` AwardType int `json:"award_type"` AwardId int `json:"award_id"` AwardName string `json:"award_name"` AwardPic string `json:"award_pic"` AwardBigPic string `json:"award_big_pic"` AwardPrice int `json:"award_price"` BagId int `json:"bag_id"` GiftId int `json:"gift_id"` GiftNum int `json:"gift_num"` } `json:"winner_info"` }
type RoomBlockMsg ¶
type RoomBlockMsg struct { DmScore int `json:"dmscore"` Operator int `json:"operator"` UID int `json:"uid"` Uname string `json:"uname"` }
RoomBlockMsg 房管禁言
type RoomChange ¶
type RoomChange struct { Title string `json:"title"` AreaID int `json:"area_id"` ParentAreaID int `json:"parent_area_id"` AreaName string `json:"area_name"` ParentAreaName string `json:"parent_area_name"` LiveKey string `json:"live_key"` SubSessionKey string `json:"sub_session_key"` }
RoomChange 疑似房间标题变更
type StopLiveRoomList ¶
type StopLiveRoomList struct {
RoomIdList []int `json:"room_id_list"`
}
type SuperChat ¶
type SuperChat struct { 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 int `json:"dmscore"` EndTime int `json:"end_time"` Gift struct { GiftID int `json:"gift_id"` GiftName string `json:"gift_name"` Num int `json:"num"` } `json:"gift"` ID int `json:"id"` IsRanked int `json:"is_ranked"` IsSendAudit int `json:"is_send_audit"` MedalInfo Medal `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"` StartTime int `json:"start_time"` Time int `json:"time"` Token string `json:"token"` TransMark int `json:"trans_mark"` Ts int `json:"ts"` UID int `json:"uid"` UserInfo userInfo `json:"user_info"` }
SuperChat 超级留言(SC)
type SuperChatDelete ¶
type SuperChatDelete struct {
IDs []int `json:"ids"`
}
SuperChatDelete 删除SC,IDs数组中的ID对应superChat.ID
type TradingScore ¶
type TradingScore struct { BubbleShowTime int `json:"bubble_show_time"` Num int `json:"num"` ScoreId int `json:"score_id"` Uid int `json:"uid"` UpdateTime int `json:"update_time"` UpdateType int `json:"update_type"` }
TradingScore 未知
type UserToastMsg ¶
type UserToastMsg struct { AnchorShow bool `json:"anchor_show"` Color string `json:"color"` DmScore int `json:"dmscore"` EffectID int `json:"effect_id"` EndTime int `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 int `json:"price"` RoleName string `json:"role_name"` StartTime int `json:"start_time"` SvgaBlock int `json:"svga_block"` TargetGuardCount int `json:"target_guard_count"` ToastMsg string `json:"toast_msg"` UID int `json:"uid"` Unit string `json:"unit"` UserShow bool `json:"user_show"` Username string `json:"username"` }
UserToastMsg 弹幕栏中显示的toast信息,如xxx自动续费了舰长,xxx开通了舰长
type WSEnterRoomBody ¶
type WSNotificationBody ¶
type WatchedChange ¶
type WidgetBanner ¶
type WidgetBanner struct { Timestamp int `json:"timestamp"` WidgetList map[string]struct { ID int `json:"id"` Title string `json:"title"` Cover string `json:"cover"` WebCover string `json:"web_cover"` TipText string `json:"tip_text"` TipTextColor string `json:"tip_text_color"` TipBottomColor string `json:"tip_bottom_color"` JumpURL string `json:"jump_url"` URL string `json:"url"` StayTime int `json:"stay_time"` Site int `json:"site"` PlatformIn []string `json:"platform_in"` Type int `json:"type"` BandID int `json:"band_id"` SubKey string `json:"sub_key"` SubData string `json:"sub_data"` IsAdd bool `json:"is_add"` } `json:"widget_list"` }
Source Files ¶
- anchor_lot_award.go
- anchor_lot_checkstatus.go
- anchor_lot_end.go
- anchor_lot_start.go
- combo_send.go
- common_notice_danmaku.go
- danmaku.go
- dto.go
- entry_effect.go
- fans_change.go
- gift.go
- guard.go
- hot_rank_changed.go
- hot_rank_changed_v2.go
- hot_rank_settlement.go
- hot_rank_settlement_v2.go
- interact_word.go
- interactive_game.go
- match_room_conf.go
- medal.go
- notice_msg.go
- online_rank_count.go
- online_rank_top3.go
- online_rank_v2.go
- popularity.go
- popularity_red_pocket_start.go
- popularity_red_pocket_winner_list.go
- room_block_msg.go
- room_change.go
- stop_live_room_list.go
- super_chat.go
- trading_score.go
- user_toast_msg.go
- watched_change.go
- websocket_event.go
- websocket_opcode.go
- websocket_payload.go
- websocket_protover.go
- widget_banner.go
Click to show internal directories.
Click to hide internal directories.