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) GetApiBuilder() apiBuilder.IMainFunc
- func (e *EventStruct) GetAtList() (list []int64)
- func (e *EventStruct) GetCurrentQQ() int64
- func (e *EventStruct) GetEventName() EventName
- func (e *EventStruct) GetGroupUin() int64
- func (e *EventStruct) GetLoginSuccessBot() (nick string, uin 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) GetRawBytes() []byte
- func (e *EventStruct) GetSenderNick() string
- func (e *EventStruct) GetSenderUin() int64
- func (e *EventStruct) GetTextContent() string
- func (e *EventStruct) ParseGroupMsg() IGroupMsg
- func (e *EventStruct) ParseLoginSuccessEvent() ILoginSuccess
- func (e *EventStruct) ParseNetworkChangeEvent() INetworkChange
- func (e *EventStruct) ParseTextMsg() ITextMsg
- type ICommonMsg
- type IEvent
- type IGroupMsg
- type ILoginSuccess
- type INetworkChange
- type ITextMsg
- type MsgType
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"` ToUin int64 `json:"ToUin"` FromType int `json:"FromType"` SenderUin int64 `json:"SenderUin"` 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 struct { GroupCard string `json:"GroupCard"` GroupCode int `json:"GroupCode"` GroupInfoSeq int `json:"GroupInfoSeq"` GroupLevel int `json:"GroupLevel"` GroupRank int `json:"GroupRank"` GroupType int `json:"GroupType"` GroupName string `json:"GroupName"` } `json:"GroupInfo"` C2CTempMessageHead interface{} `json:"C2CTempMessageHead"` } `json:"MsgHead,omitempty"` MsgBody *struct { SubMsgType int `json:"SubMsgType"` Content string `json:"Content"` Images []struct { FileId int64 `json:"FileId"` FileMd5 string `json:"FileMd5"` FileSize int `json:"FileSize"` Url string `json:"Url"` } `json:"Images"` AtUinLists []struct { Nick string `json:"Nick"` Uin int64 `json:"Uin"` } `json:"AtUinLists"` Video interface{} `json:"Video"` Voice interface{} `json:"Voice"` } `json:"MsgBody,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) GetApiBuilder ¶
func (e *EventStruct) GetApiBuilder() apiBuilder.IMainFunc
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) GetGroupUin ¶
func (e *EventStruct) GetGroupUin() int64
func (*EventStruct) GetLoginSuccessBot ¶
func (e *EventStruct) GetLoginSuccessBot() (nick string, uin 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) GetRawBytes ¶
func (e *EventStruct) GetRawBytes() []byte
func (*EventStruct) GetSenderNick ¶
func (e *EventStruct) GetSenderNick() string
func (*EventStruct) GetSenderUin ¶
func (e *EventStruct) GetSenderUin() int64
func (*EventStruct) GetTextContent ¶
func (e *EventStruct) GetTextContent() string
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) ParseTextMsg ¶
func (e *EventStruct) ParseTextMsg() ITextMsg
type ICommonMsg ¶
type IEvent ¶
type IEvent interface { ICommonMsg GetCurrentQQ() int64 GetRawBytes() []byte GetEventName() EventName ParseGroupMsg() IGroupMsg ParseLoginSuccessEvent() ILoginSuccess ParseNetworkChangeEvent() INetworkChange GetApiBuilder() apiBuilder.IMainFunc ExcludeBot() IEvent }
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.