Documentation ¶
Index ¶
- type EventCallbackFunc
- type EventName
- type EventStruct
- func (e *EventStruct) AtBot() (at bool)
- func (e *EventStruct) ContainedAt() bool
- func (e *EventStruct) ContainedPic() bool
- func (e *EventStruct) ExcludeAtInfo() IGroupMsg
- func (e *EventStruct) ExcludeBot() IEvent
- func (e *EventStruct) GetAtInfo() []UserInfo
- func (e *EventStruct) GetAtList() (list []int64)
- func (e *EventStruct) GetCurrentQQ() int64
- func (e *EventStruct) GetEventName() EventName
- func (e *EventStruct) GetFriendUid() string
- func (e *EventStruct) GetFriendUin() int64
- func (e *EventStruct) GetGroupInfo() GroupInfo
- func (e *EventStruct) GetGroupJoinEvent() (Invitee string, Invitor string, tips string)
- func (e *EventStruct) GetGroupUId() (uin int64)
- func (e *EventStruct) GetGroupUin() int64
- func (e *EventStruct) GetLoginSuccessBot() (nick string, uin int64)
- func (e *EventStruct) GetMsgRandom() int64
- func (e *EventStruct) GetMsgSeq() int64
- func (e *EventStruct) GetMsgTime() int64
- func (e *EventStruct) GetMsgType() MsgType
- func (e *EventStruct) GetMsgUid() int64
- func (e *EventStruct) GetNetworkChangeBot() (nick string, uin int64, content string)
- func (e *EventStruct) GetPics() []Image
- func (e *EventStruct) GetRawBytes() []byte
- func (e *EventStruct) GetSenderNick() string
- func (e *EventStruct) GetSenderUid() string
- func (e *EventStruct) GetSenderUin() int64
- func (e *EventStruct) GetTextContent() string
- func (e *EventStruct) GetToUin() int64
- func (e *EventStruct) IsFromBot() bool
- func (v EventStruct) MarshalEasyJSON(w *jwriter.Writer)
- func (v EventStruct) MarshalJSON() ([]byte, error)
- func (e *EventStruct) ParseFriendMsg() IFriendMsg
- func (e *EventStruct) ParseGroupMsg() IGroupMsg
- func (e *EventStruct) ParseLoginSuccessEvent() ILoginSuccess
- func (e *EventStruct) ParseNetworkChangeEvent() INetworkChange
- func (e *EventStruct) ParsePicMsg() IPicMsg
- func (e *EventStruct) ParseTextMsg() ITextMsg
- func (e *EventStruct) PraseGroupJoinEvent() IGroupJoinEvent
- func (v *EventStruct) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *EventStruct) UnmarshalJSON(data []byte) error
- type GroupInfo
- type ICommonMsg
- type IEvent
- type IFriendMsg
- type IGroupJoinEvent
- type IGroupMsg
- type ILoginSuccess
- type INetworkChange
- type IPicMsg
- type ITextMsg
- type Image
- type MsgType
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventCallbackFunc ¶
type EventName ¶
type EventName string
const ( EventNameGroupMsg EventName = "ON_EVENT_GROUP_NEW_MSG" EventNameFriendMsg EventName = "ON_EVENT_FRIEND_NEW_MSG" EventNameGroupJoin EventName = "ON_EVENT_GROUP_JOIN" EventNameGroupExit EventName = "ON_EVENT_GROUP_EXIT" EventNameGroupInvite EventName = "ON_EVENT_GROUP_INVITE" EventNameGroupSystemMsgNotify EventName = "ON_EVENT_GROUP_SYSTEM_MSG_NOTIFY" EventNameLoginSuccess EventName = "ON_EVENT_LOGIN_SUCCESS" EventNameNetworkChange EventName = "ON_EVENT_NETWORK_CHANGE" )
type EventStruct ¶
type EventStruct struct { CurrentPacket struct { EventData struct { Nick *string `json:"Nick,omitempty"` Uin *int64 `json:"Uin,omitempty"` Content *string `json:"Content,omitempty"` MsgHead *struct { FromUin int64 `json:"FromUin"` FromUid string `json:"FromUid"` ToUin int64 `json:"ToUin"` FromType int `json:"FromType"` SenderUin int64 `json:"SenderUin"` SenderUid string `json:"SenderUid"` SenderNick string `json:"SenderNick"` MsgType int `json:"MsgType"` C2CCmd int `json:"C2cCmd"` MsgSeq int64 `json:"MsgSeq"` MsgTime int64 `json:"MsgTime"` MsgRandom int64 `json:"MsgRandom"` MsgUid int64 `json:"MsgUid"` GroupInfo GroupInfo `json:"GroupInfo"` C2CTempMessageHead interface{} `json:"C2CTempMessageHead"` } `json:"MsgHead,omitempty"` MsgBody *struct { SubMsgType int `json:"SubMsgType"` Content string `json:"Content"` Images []Image `json:"Images"` AtUinLists []UserInfo `json:"AtUinLists"` Video interface{} `json:"Video"` Voice interface{} `json:"Voice"` } `json:"MsgBody,omitempty"` Event *struct { Invitee string `json:"Invitee"` Invitor string `json:"Invitor"` Tips string `json:"Tips"` } `json:"Event,omitempty"` } `json:"EventData"` EventName string `json:"EventName"` } `json:"CurrentPacket"` CurrentQQ int64 `json:"CurrentQQ"` // contains filtered or unexported fields }
func (*EventStruct) AtBot ¶
func (e *EventStruct) AtBot() (at bool)
func (*EventStruct) ContainedAt ¶
func (e *EventStruct) ContainedAt() bool
func (*EventStruct) ContainedPic ¶
func (e *EventStruct) ContainedPic() bool
func (*EventStruct) ExcludeAtInfo ¶
func (e *EventStruct) ExcludeAtInfo() IGroupMsg
func (*EventStruct) ExcludeBot ¶
func (e *EventStruct) ExcludeBot() IEvent
func (*EventStruct) GetAtInfo ¶
func (e *EventStruct) GetAtInfo() []UserInfo
func (*EventStruct) GetAtList ¶
func (e *EventStruct) GetAtList() (list []int64)
func (*EventStruct) GetCurrentQQ ¶
func (e *EventStruct) GetCurrentQQ() int64
func (*EventStruct) GetEventName ¶
func (e *EventStruct) GetEventName() EventName
func (*EventStruct) GetFriendUid ¶
func (e *EventStruct) GetFriendUid() string
func (*EventStruct) GetFriendUin ¶
func (e *EventStruct) GetFriendUin() int64
func (*EventStruct) GetGroupInfo ¶
func (e *EventStruct) GetGroupInfo() GroupInfo
func (*EventStruct) GetGroupJoinEvent ¶
func (e *EventStruct) GetGroupJoinEvent() (Invitee string, Invitor string, tips string)
func (*EventStruct) GetGroupUId ¶
func (e *EventStruct) GetGroupUId() (uin int64)
func (*EventStruct) GetGroupUin ¶
func (e *EventStruct) GetGroupUin() int64
func (*EventStruct) GetLoginSuccessBot ¶
func (e *EventStruct) GetLoginSuccessBot() (nick string, uin int64)
func (*EventStruct) GetMsgRandom ¶
func (e *EventStruct) GetMsgRandom() int64
func (*EventStruct) GetMsgSeq ¶
func (e *EventStruct) GetMsgSeq() int64
func (*EventStruct) GetMsgTime ¶
func (e *EventStruct) GetMsgTime() int64
func (*EventStruct) GetMsgType ¶
func (e *EventStruct) GetMsgType() MsgType
func (*EventStruct) GetMsgUid ¶
func (e *EventStruct) GetMsgUid() int64
func (*EventStruct) GetNetworkChangeBot ¶
func (e *EventStruct) GetNetworkChangeBot() (nick string, uin int64, content string)
func (*EventStruct) GetPics ¶
func (e *EventStruct) GetPics() []Image
func (*EventStruct) GetRawBytes ¶
func (e *EventStruct) GetRawBytes() []byte
func (*EventStruct) GetSenderNick ¶
func (e *EventStruct) GetSenderNick() string
func (*EventStruct) GetSenderUid ¶
func (e *EventStruct) GetSenderUid() string
func (*EventStruct) GetSenderUin ¶
func (e *EventStruct) GetSenderUin() int64
func (*EventStruct) GetTextContent ¶
func (e *EventStruct) GetTextContent() string
func (*EventStruct) GetToUin ¶
func (e *EventStruct) GetToUin() int64
func (*EventStruct) IsFromBot ¶
func (e *EventStruct) IsFromBot() bool
func (EventStruct) MarshalEasyJSON ¶
func (v EventStruct) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventStruct) MarshalJSON ¶
func (v EventStruct) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventStruct) ParseFriendMsg ¶
func (e *EventStruct) ParseFriendMsg() IFriendMsg
func (*EventStruct) ParseGroupMsg ¶
func (e *EventStruct) ParseGroupMsg() IGroupMsg
func (*EventStruct) ParseLoginSuccessEvent ¶
func (e *EventStruct) ParseLoginSuccessEvent() ILoginSuccess
func (*EventStruct) ParseNetworkChangeEvent ¶
func (e *EventStruct) ParseNetworkChangeEvent() INetworkChange
func (*EventStruct) ParsePicMsg ¶
func (e *EventStruct) ParsePicMsg() IPicMsg
func (*EventStruct) ParseTextMsg ¶
func (e *EventStruct) ParseTextMsg() ITextMsg
func (*EventStruct) PraseGroupJoinEvent ¶
func (e *EventStruct) PraseGroupJoinEvent() IGroupJoinEvent
func (*EventStruct) UnmarshalEasyJSON ¶
func (v *EventStruct) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventStruct) UnmarshalJSON ¶
func (v *EventStruct) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ICommonMsg ¶
type IEvent ¶
type IEvent interface { ICommonMsg GetCurrentQQ() int64 GetRawBytes() []byte GetEventName() EventName ParseGroupMsg() IGroupMsg ParseFriendMsg() IFriendMsg ParseLoginSuccessEvent() ILoginSuccess ParseNetworkChangeEvent() INetworkChange PraseGroupJoinEvent() IGroupJoinEvent ExcludeBot() IEvent }
type IFriendMsg ¶
type IGroupJoinEvent ¶
type IGroupMsg ¶
type IGroupMsg interface { ICommonMsg ExcludeAtInfo() IGroupMsg AtBot() bool GetAtInfo() []UserInfo GetGroupUin() int64 GetGroupInfo() GroupInfo GetSenderNick() string GetSenderUin() int64 GetSenderUid() string GetToUin() int64 ParseTextMsg() ITextMsg ParsePicMsg() IPicMsg ContainedPic() bool ContainedAt() bool IsFromBot() bool }
type ILoginSuccess ¶
type INetworkChange ¶
type MsgType ¶
type MsgType int
const ( // MsgTypeGroupMsg 收到群消息 MsgTypeGroupMsg MsgType = 82 // MsgTypeFriendsMsg 收到好友私聊消息 MsgTypeFriendsMsg MsgType = 166 // MsgTypeGroupJoin 有人进群了 MsgTypeGroupJoin MsgType = 33 // MsgTypeGroupExit 有人退群了 MsgTypeGroupExit MsgType = 34 /* 1. 发出去消息的回应 2. 有人撤回消息 3. 自己被邀请入群 */ MsgTypeMsgSent MsgType = 732 // MsgTypeGroupChange 自己的群名片被改了 MsgTypeGroupChange MsgType = 528 )
Click to show internal directories.
Click to hide internal directories.