Documentation
¶
Index ¶
- Constants
- Variables
- func ConnectItemMessage(c Client, callback func(message *ItemNotice))
- func ConnectMessage(c Client, callback func(message *MessageNotice))
- func ConnectVipMessage(c Client, callback func(message *VipNotice))
- func GetTimestampUnixString() string
- func Md5String(s string) string
- func Sync()
- func ToStruct(call, obj interface{}) error
- type Client
- type ItemNotice
- type MessageNotice
- type ResponseData
- type VipNotice
Constants ¶
View Source
const ( MESSAGE_NOTICE = "ws://openapi.huya.com/index.html?do=getMessageNotice&data={}&appId={}×tamp={}&sign={}" ITEM_NOTICE = "ws://openapi.huya.com/index.html?do=getSendItemNotice&data={}&appId={}×tamp={}&sign={}" VIP_NOTICE = "ws://openapi.huya.com/index.html?do=getVipEnterBannerNotice&data={}&appId={}×tamp={}&sign={}" )
Variables ¶
View Source
var C = make(chan int)
Functions ¶
func ConnectItemMessage ¶
func ConnectItemMessage(c Client, callback func(message *ItemNotice))
func ConnectMessage ¶
func ConnectMessage(c Client, callback func(message *MessageNotice))
func ConnectVipMessage ¶
func GetTimestampUnixString ¶
func GetTimestampUnixString() string
Types ¶
type ItemNotice ¶
type ItemNotice struct {
ItemName string `json:"itemName"`
PresenterNick string `json:"presenterNick"`
RoomId int `json:"roomId"`
SendItemComboHits int `json:"sendItemComboHits"`
SendItemCount int `json:"sendItemCount"`
SendNick string `json:"sendNick"`
SenderAvatarurl string `json:"senderAvatarurl"`
}
type MessageNotice ¶
type MessageNotice struct {
BadgeName string `json:"badgeName"`
Content string `json:"content"`
FansLevel int `json:"fansLevel"`
NobleLevel int `json:"nobleLevel"`
Roomid int `json:"roomid"`
SendNick string `json:"sendNick"`
SenderAvatarUrl string `json:"senderAvatarUrl"`
SenderGender int `json:"senderGender"`
ShowMode int `json:"showMode"`
}
type ResponseData ¶
type VipNotice ¶
type VipNotice struct {
BadgeName string `json:"badgeName"`
FansLevel int `json:"fansLevel"`
NobleLevel int `json:"nobleLevel"`
NobleName string `json:"nobleName"`
RoomId int `json:"roomId"`
UserAvatarUrl string `json:"userAvatarUrl"`
UserNick string `json:"userNick"`
WeekRank int `json:"weekRank"`
GuardLevel int `json:"guardLevel"`
}
Click to show internal directories.
Click to hide internal directories.