mirror of
https://github.com/AynaLivePlayer/blivedm-go.git
synced 2025-12-06 11:22:50 +08:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
@@ -25,20 +25,43 @@ type (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Extra struct {
|
Extra struct {
|
||||||
SendFromMe bool `json:"send_from_me"`
|
SendFromMe bool `json:"send_from_me"`
|
||||||
Mode int `json:"mode"`
|
MasterPlayerHidden bool `json:"master_player_hidden"`
|
||||||
Color int `json:"color"`
|
Mode int `json:"mode"`
|
||||||
DmType int `json:"dm_type"`
|
Color int `json:"color"`
|
||||||
FontSize int `json:"font_size"`
|
DmType int `json:"dm_type"`
|
||||||
PlayerMode int `json:"player_mode"`
|
FontSize int `json:"font_size"`
|
||||||
ShowPlayerType int `json:"show_player_type"`
|
PlayerMode int `json:"player_mode"`
|
||||||
Content string `json:"content"`
|
ShowPlayerType int `json:"show_player_type"`
|
||||||
UserHash string `json:"user_hash"`
|
Content string `json:"content"`
|
||||||
EmoticonUnique string `json:"emoticon_unique"`
|
UserHash string `json:"user_hash"`
|
||||||
Direction int `json:"direction"`
|
EmoticonUnique string `json:"emoticon_unique"`
|
||||||
PkDirection int `json:"pk_direction"`
|
BulgeDisplay int `json:"bulge_display"`
|
||||||
SpaceType string `json:"space_type"`
|
RecommendScore int `json:"recommend_score"`
|
||||||
SpaceUrl string `json:"space_url"`
|
MainStateDmColor string `json:"main_state_dm_color"`
|
||||||
|
ObjectiveStateDmColor string `json:"objective_state_dm_color"`
|
||||||
|
Direction int `json:"direction"`
|
||||||
|
PkDirection int `json:"pk_direction"`
|
||||||
|
QuartetDirection int `json:"quartet_direction"`
|
||||||
|
AnniversaryCrowd int `json:"anniversary_crowd"`
|
||||||
|
YeahSpaceType string `json:"yeah_space_type"`
|
||||||
|
YeahSpaceURL string `json:"yeah_space_url"`
|
||||||
|
JumpToURL string `json:"jump_to_url"`
|
||||||
|
SpaceType string `json:"space_type"`
|
||||||
|
SpaceURL string `json:"space_url"`
|
||||||
|
// Animation any `json:"animation"`
|
||||||
|
// Emots any `json:"emots"`
|
||||||
|
IsAudited bool `json:"is_audited"`
|
||||||
|
IDStr string `json:"id_str"`
|
||||||
|
// Icon any `json:"icon"`
|
||||||
|
ShowReply bool `json:"show_reply"`
|
||||||
|
ReplyMid int `json:"reply_mid"`
|
||||||
|
ReplyUname string `json:"reply_uname"`
|
||||||
|
ReplyUnameColor string `json:"reply_uname_color"`
|
||||||
|
ReplyIsMystery bool `json:"reply_is_mystery"`
|
||||||
|
ReplyTypeEnum int `json:"reply_type_enum"`
|
||||||
|
HitCombo int `json:"hit_combo"`
|
||||||
|
EsportsJumpURL string `json:"esports_jump_url"`
|
||||||
}
|
}
|
||||||
Emoticon struct {
|
Emoticon struct {
|
||||||
BulgeDisplay int `json:"bulge_display"`
|
BulgeDisplay int `json:"bulge_display"`
|
||||||
|
|||||||
@@ -6,16 +6,17 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func StringToBytes(s string) []byte {
|
func StringToBytes(s string) []byte {
|
||||||
return *(*[]byte)(unsafe.Pointer(
|
if len(s) == 0 {
|
||||||
&struct {
|
return nil
|
||||||
string
|
}
|
||||||
Cap int
|
return unsafe.Slice(unsafe.StringData(s), len(s))
|
||||||
}{s, len(s)},
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func BytesToString(b []byte) string {
|
func BytesToString(b []byte) string {
|
||||||
return *(*string)(unsafe.Pointer(&b))
|
if len(b) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return unsafe.String(unsafe.SliceData(b), len(b))
|
||||||
}
|
}
|
||||||
|
|
||||||
func B64Decode(s string) ([]byte, error) {
|
func B64Decode(s string) ([]byte, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user