events

package
v0.0.0-...-489b206 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2019 License: Unlicense Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EVENT_USER_CONNECTED = iota
	EVENT_USER_DISCONNECTED
	EVENT_ONLINE_USERS_LIST
	EVENT_USER_REPLY
	EVENT_NEW_MESSAGE
	EVENT_NEW_TIMELINE_EVENT
	EVENT_FRIEND_REQUEST
)

Variables

View Source
var (
	EventsFlow = make(chan *ControlEvent, 200)
)

Functions

func EventsDispatcher

func EventsDispatcher()

Types

type BaseEvent

type BaseEvent struct {
	Type string
}

type ControlEvent

type ControlEvent struct {
	EvType   uint8
	Info     interface{}
	Reply    interface{}
	Listener chan interface{}
}

type EventFriendRequest

type EventFriendRequest struct {
	BaseEvent
	UserId uint64 `json:",string"`
}

type EventNewMessage

type EventNewMessage struct {
	BaseEvent
	protocol.Message
}

type EventNewTimelineStatus

type EventNewTimelineStatus struct {
	BaseEvent
	protocol.TimelineMessage
}

type EventOnlineUsersList

type EventOnlineUsersList struct {
	BaseEvent
	Users []protocol.JSUserInfo
}

type EventUserConnected

type EventUserConnected struct {
	BaseEvent
	protocol.JSUserInfo
}

type EventUserDisconnected

type EventUserDisconnected struct {
	BaseEvent
	protocol.JSUserInfo
}

type InternalEventNewMessage

type InternalEventNewMessage struct {
	UserFrom     uint64
	UserFromName string
	UserTo       uint64
	Ts           string
	Text         string
}

type InternalEventNewTimelineStatus

type InternalEventNewTimelineStatus struct {
	UserId        uint64
	FriendUserIds []uint64
	UserName      string
	Ts            string
	Text          string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL