Documentation
¶
Index ¶
- Variables
- func ChatPageHandler(w http.ResponseWriter, r *http.Request)
- func GenCodeGeneratorLink(roomID string) string
- func GenerateRoomLink(scheme string, hostname string, roomID string) string
- func GetRoomMessages(w http.ResponseWriter, r *http.Request)
- func HomeHandler(w http.ResponseWriter, r *http.Request)
- func QRCodeGenerationHandler(w http.ResponseWriter, r *http.Request)
- type ChatHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ChatWSHandler = &ChatHandler{Rooms: make(map[string]*models.Room)}
ChatWSHandler is the database of chat including rooms, hanlde ws requests
Functions ¶
func ChatPageHandler ¶
func ChatPageHandler(w http.ResponseWriter, r *http.Request)
ChatPageHandler handle render the Chat Page
func GenCodeGeneratorLink ¶
GenCodeGeneratorLink returns the api path of qrcode generator endpoint
func GenerateRoomLink ¶
GenerateRoomLink handle create a new or provided room's link
func GetRoomMessages ¶
func GetRoomMessages(w http.ResponseWriter, r *http.Request)
GetRoomMessages handles get and return message of the room
func HomeHandler ¶
func HomeHandler(w http.ResponseWriter, r *http.Request)
HomeHandler will create a new room, render a new qrcode to clients
func QRCodeGenerationHandler ¶
func QRCodeGenerationHandler(w http.ResponseWriter, r *http.Request)
QRCodeGenerationHandler handle request code generation
Types ¶
type ChatHandler ¶
ChatHandler stores list of created rooms, serves http
func (*ChatHandler) ServeHTTP ¶
func (chat *ChatHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.