Documentation ¶
Index ¶
- func Comment(socketPayload *models.SocketPayload, clients []*Client, invokingClient *Client)
- func DeleteMessage(socketPayload *models.SocketPayload, clients []*Client, invokingClient *Client, ...)
- func MarkMessagesAsRead(socketPayload *models.SocketPayload, invokingClient *Client, clients []*Client)
- func Message(socketPayload *models.SocketPayload, clients []*Client, invokingClient *Client)
- func Post(socketPayload *models.SocketPayload, clients []*Client, invokingClient *Client)
- func RemoveBirthday(socketPayload *models.SocketPayload, invokingClient *Client)
- func ServeWs(hub *Hub, w http.ResponseWriter, r *http.Request)
- func Typing(socketPayload *models.SocketPayload, invokingClient *Client, eventType string)
- func UpdateProfile(socketPayload *models.SocketPayload, invokingClient *Client)
- type Client
- type Hub
- type UserClientPayload
- type UserMessagePayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Comment ¶
func Comment(socketPayload *models.SocketPayload, clients []*Client, invokingClient *Client)
func DeleteMessage ¶
func DeleteMessage(socketPayload *models.SocketPayload, clients []*Client, invokingClient *Client, message []byte)
func MarkMessagesAsRead ¶
func MarkMessagesAsRead(socketPayload *models.SocketPayload, invokingClient *Client, clients []*Client)
func Message ¶
func Message(socketPayload *models.SocketPayload, clients []*Client, invokingClient *Client)
func Post ¶
func Post(socketPayload *models.SocketPayload, clients []*Client, invokingClient *Client)
func RemoveBirthday ¶
func RemoveBirthday(socketPayload *models.SocketPayload, invokingClient *Client)
func ServeWs ¶
func ServeWs(hub *Hub, w http.ResponseWriter, r *http.Request)
serveWs handles websocket requests from the peer.
func Typing ¶
func Typing(socketPayload *models.SocketPayload, invokingClient *Client, eventType string)
func UpdateProfile ¶
func UpdateProfile(socketPayload *models.SocketPayload, invokingClient *Client)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a middleman between the websocket connection and the hub.
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub maintains the set of active clients and broadcasts messages to the clients.
type UserClientPayload ¶
type UserMessagePayload ¶
Click to show internal directories.
Click to hide internal directories.