controllers

package
v0.0.0-...-937b28e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2022 License: GPL-3.0 Imports: 19 Imported by: 4

README

controllers

Helen uses WebSockets to communicate with the frontend, with the help of WSEvent. Handlers exposed through websocket can be found at socket/handlers/

Each user on entering the site, is added to the room 0_public, where all global chat messages and lobby updates are sent to. Each lobby created has two rooms, 0_public and 0_private. Lobby chat messages, and updates (player joined, left, lobby started, lobby closed, etc) are broadcasted on 0_public, while ready up messages and lobby server info are sent to 0_private.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRecordNotFound = errors.New("Player record for found.")

Functions

func InitTemplates

func InitTemplates()

func MainHandler

func MainHandler(w http.ResponseWriter, r *http.Request)

func ResetMumblePassword

func ResetMumblePassword(w http.ResponseWriter, r *http.Request)

func SocketHandler

func SocketHandler(w http.ResponseWriter, r *http.Request)

func SocketInit

func SocketInit(so *wsevent.Client) error

SocketInit initializes the websocket connection for the provided socket

func TwitchBadge

func TwitchBadge(w http.ResponseWriter, r *http.Request)

Types

This section is empty.

Directories

Path Synopsis
hooks
Package hooks contains event hooks, which are called after specific events, like lobby joins and logins.
Package hooks contains event hooks, which are called after specific events, like lobby joins and logins.
sessions
Package sessions provides functions to help maintain consistency across multiple websocket connections from a single player, when the player has multiple tabs/windows open (since each tab opens a new websocket connection)
Package sessions provides functions to help maintain consistency across multiple websocket connections from a single player, when the player has multiple tabs/windows open (since each tab opens a new websocket connection)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL