Documentation ¶
Index ¶
- func Achievements(staticDir string) http.Handler
- func CurrentUser(w http.ResponseWriter, r *http.Request)
- func GetAISource() http.Handler
- func GetAchievements(staticDir string) http.Handler
- func GetToken(r *http.Request) (string, error)
- func GetUserName(r *http.Request) (string, error)
- func IsUserAuthorised(r *http.Request) bool
- func Leaderboard(staticDir string) http.Handler
- func LeaderboardPeek(w http.ResponseWriter, r *http.Request)
- func LobbiesCreate(config *config.Config) http.Handler
- func LobbiesGame(staticDir string) http.Handler
- func LobbiesGetUsers(w http.ResponseWriter, r *http.Request)
- func LobbiesJoin(w http.ResponseWriter, r *http.Request)
- func LobbiesLeaderboard(w http.ResponseWriter, r *http.Request)
- func LobbiesLeave(w http.ResponseWriter, r *http.Request)
- func LobbiesMessage(w http.ResponseWriter, r *http.Request)
- func LobbiesName(w http.ResponseWriter, r *http.Request)
- func LobbiesPeek(w http.ResponseWriter, r *http.Request)
- func LobbiesSummary(staticDir string) http.Handler
- func LobbiesView(staticDir string) http.Handler
- func LogInPage(staticDir string) http.Handler
- func Logout(w http.ResponseWriter, r *http.Request)
- func NotFound(w http.ResponseWriter, r *http.Request)
- func OAuthSignInCallback(w http.ResponseWriter, r *http.Request)
- func PingHandler(w http.ResponseWriter, r *http.Request)
- func PostAISource() http.Handler
- func RequireAuth(h http.Handler) http.Handler
- func SVGSpriteHandler(staticDir string) http.Handler
- func UpdateMaxAge(h http.Handler) http.Handler
- func UpdatesHandler() http.Handler
- func UserLogIn(w http.ResponseWriter, r *http.Request)
- func UserToken(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Achievements ¶
func CurrentUser ¶
func CurrentUser(w http.ResponseWriter, r *http.Request)
CurrentUser returns the username of the session's user
func GetAISource ¶
func GetAchievements ¶
func IsUserAuthorised ¶
func Leaderboard ¶
func LeaderboardPeek ¶
func LeaderboardPeek(w http.ResponseWriter, r *http.Request)
Get the top 10 global values from the database and returns them in a JSON format
func LobbiesGame ¶
func LobbiesGetUsers ¶
func LobbiesGetUsers(w http.ResponseWriter, r *http.Request)
LobbiesGetUsers gets all the user names from the lobby specified at the end of the caught URL, and returns them as a JSON
func LobbiesJoin ¶
func LobbiesJoin(w http.ResponseWriter, r *http.Request)
func LobbiesLeaderboard ¶
func LobbiesLeaderboard(w http.ResponseWriter, r *http.Request)
func LobbiesLeave ¶
func LobbiesLeave(w http.ResponseWriter, r *http.Request)
LobbiesLeave temporarily logs the user out - this will change in the future
func LobbiesMessage ¶
func LobbiesMessage(w http.ResponseWriter, r *http.Request)
func LobbiesName ¶
func LobbiesName(w http.ResponseWriter, r *http.Request)
func LobbiesPeek ¶
func LobbiesPeek(w http.ResponseWriter, r *http.Request)
LobbiesPeek returns all the lobbies serialized as JSON
func LobbiesSummary ¶
func LobbiesView ¶
func NotFound ¶
func NotFound(w http.ResponseWriter, r *http.Request)
NotFound is called when a request URI does not exist
func OAuthSignInCallback ¶
func OAuthSignInCallback(w http.ResponseWriter, r *http.Request)
OAuthSignInCallback gets the access token from the Github API and uses it to get/create a user
func PingHandler ¶
func PingHandler(w http.ResponseWriter, r *http.Request)
PingHandler is used for responsiveness checks
func PostAISource ¶
func SVGSpriteHandler ¶
func UpdateMaxAge ¶
UpdateMaxAge resets the MaxAge of the session to keep the user logged in
func UpdatesHandler ¶
Types ¶
This section is empty.