Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUserModel ¶
func AddUserModel(user User)
AddUserModel will add the user model that implements the User interface
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a user connect to a room, one user may have many devices to chat, so it should not be the same as user
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub represents a websocket hub having multiple clients per room
type Message ¶
type Message struct { ID string `json:"id" bson:"_id"` Msg string `json:"msg" bson:"msg"` Room string `json:"room" bson:"room"` LoginID string `json:"login_id" bson:"login_id"` Type string `json:"type" bson:"type"` Metadata map[string]interface{} `json:"metadata,omitempty" bson:"metadata"` CreateAt time.Time `json:"created_at,omitempty" bson:"created_at"` }
Message represents the message send by client sent
Click to show internal directories.
Click to hide internal directories.