Documentation
¶
Index ¶
Constants ¶
View Source
const ClientMessageTypeSubscribe string = "subscribe"
View Source
const ClientMessageTypeUnsubscribe string = "unsubscribe"
View Source
const SysMessageHello sysMessage = "hello"
View Source
const SysMessageSubscribed sysMessage = "subscribed"
View Source
const SysMessageUnknownCommand sysMessage = "unknown_command"
View Source
const SysMessageUnsubscribed sysMessage = "unsubscribed"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicMessage ¶
type BasicMessage struct { Event EventType `json:"event"` Data interface{} `json:"data"` }
func (BasicMessage) GetEvent ¶
func (bm BasicMessage) GetEvent() EventType
type ClientMessage ¶
type ClientMessage interface{}
type ClientMessageSubscribe ¶
type ClientMessageSubscribe struct {
Channels []string
}
type ClientMessageUnsubscribe ¶
type ClientMessageUnsubscribe struct {
Channels []string
}
type MessageInterface ¶
type MessageInterface interface {
GetEvent() EventType
}
type PublicMessageInterface ¶
type SystemMessage ¶
type SystemMessage struct { Message sysMessage `json:"msg"` Description string `json:"description"` }
func (SystemMessage) GetEvent ¶
func (sm SystemMessage) GetEvent() EventType
Click to show internal directories.
Click to hide internal directories.