Files
blivedm-go/message/live.go
Akiba c78040b47d 🎉 message
2022-01-19 21:29:27 +08:00

34 lines
737 B
Go

package message
import (
"encoding/json"
log "github.com/sirupsen/logrus"
)
type StopLiveRoomList struct {
RoomIdList []int `json:"room_id_list"`
}
type Live struct {
Cmd string `json:"cmd"`
LiveKey string `json:"live_key"`
VoiceBackground string `json:"voice_background"`
SubSessionKey string `json:"sub_session_key"`
LivePlatform string `json:"live_platform"`
LiveModel int `json:"live_model"`
LiveTime int `json:"live_time"`
Roomid int `json:"roomid"`
}
type Preparing struct {
Cmd string `json:"cmd"`
Roomid string `json:"roomid"`
}
func (l *Live) Parse(data []byte) {
err := json.Unmarshal(data, l)
if err != nil {
log.Error("parse live failed")
}
}