Documentation ¶
Index ¶
Constants ¶
View Source
const ( MsgText = 1 MsgFace = 2 MsgGroupImage = 3 MsgPrivateImage = 6 MsgVoice = 7 MsgNickName = 18 MsgVideo = 26 )
Variables ¶
View Source
var MsgDecoders = map[uint8]func([]byte) MsgElem{ MsgText: DecodeTextMsg, MsgFace: DecodeFace, MsgGroupImage: DecodeImage, MsgPrivateImage: DecodeImage, MsgVoice: DecodeVoice, MsgVideo: DecodeVideo, }
Functions ¶
func DecodeNickname ¶
func DecodeUtf16 ¶
Types ¶
type ElementType ¶
type ElementType int
type FaceElement ¶
func (*FaceElement) Type ¶
func (e *FaceElement) Type() ElementType
type ImageElement ¶
func (*ImageElement) Type ¶
func (e *ImageElement) Type() ElementType
type MsgElem ¶
type MsgElem interface {
Type() ElementType
}
func DecodeFace ¶
func DecodeImage ¶
func DecodeTextMsg ¶
func DecodeVideo ¶
func DecodeVoice ¶
type TextElement ¶
type TextElement struct {
Content string
}
func (*TextElement) Type ¶
func (e *TextElement) Type() ElementType
type VideoElement ¶
type VideoElement struct {
Hash []byte
}
func (*VideoElement) Type ¶
func (e *VideoElement) Type() ElementType
type VoiceElement ¶
type VoiceElement struct {
Hash []byte
}
func (*VoiceElement) Type ¶
func (e *VoiceElement) Type() ElementType
Click to show internal directories.
Click to hide internal directories.