Documentation
¶
Overview ¶
Package outGameController contains the functions handling requests for features regarding users outside a selected game.
It should regard,for example, game selection.
Index ¶
- func GetEnabledGameIDs(userID int64) ([]int64, bool, error)
- func GetGames(userID int64) ([]userDataStructs.SummarizedGame, bool, error)
- func HandleAllGamesForUser(context echo.Context) error
- func HandleGameDetail(context echo.Context) error
- func HandleMyEnabledGamesForUser(context echo.Context) error
- func UpdateCacheAllGames(games []userDataStructs.SummarizedGame) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnabledGameIDs ¶
GetEnabledGameIDs gets the IDs of the games enabled for a user.
func GetGames ¶
GetGames get the games from a requesting user, setting enabled flag. NOTE: incomplete, do not use cache without finishing function implementation.
func HandleAllGamesForUser ¶
HandleAllGamesForUser handles a request to show all games summarized data (e.g. name + ID + currentlyPlaying)
func HandleGameDetail ¶
func HandleMyEnabledGamesForUser ¶
HandleMyEnabledGamesForUser handles the request from a user to see his enabled games.
func UpdateCacheAllGames ¶
func UpdateCacheAllGames(games []userDataStructs.SummarizedGame) error
UpdateCacheAllGames updates the cache with all games summarized data.
NOTE: Complexity O(N log(N)), so should be used as least as possible.
N => number of games to add.
Types ¶
This section is empty.