Documentation ¶
Index ¶
- func AddReadCallback(msgType string, callback interface{})
- func BroadcastAll(data string)
- func BroadcastTopic(topic string, data string)
- func HandlerFunc(context echo.Context) error
- func Init() error
- func NewAlert(level string, title string, message string) (string, error)
- func Subscribe(s *melody.Session, topic string)
- func Unsubscribe(s *melody.Session, topic string)
- func UnsubscribeAll(s *melody.Session)
- type WebsocketAlert
- type WebsocketMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddReadCallback ¶
func AddReadCallback(msgType string, callback interface{})
func BroadcastAll ¶
func BroadcastAll(data string)
func BroadcastTopic ¶
func HandlerFunc ¶
func HandlerFunc(context echo.Context) error
func Unsubscribe ¶
func UnsubscribeAll ¶
Types ¶
type WebsocketAlert ¶
type WebsocketMessage ¶
type WebsocketMessage struct { Type string `json:"type"` Data interface{} `json:"data"` }
func (WebsocketMessage) ToJsonString ¶
func (whMessage WebsocketMessage) ToJsonString() (string, error)
Click to show internal directories.
Click to hide internal directories.