Documentation
¶
Index ¶
- func ConvertToHexString(source string) string
- func EnableDisableGameForUser(userID int64, gameID int64, enable bool) (bool, error)
- func GenerateToken() string
- func GetIDFromSessionSet(SessionSet string, Token string) (int64, error)
- func IsValidAPI_Token(token string) (bool, error)
- func UpdateCacheNewSession(SessionSet string, expiration time.Duration, ID int64, values ...interface{}) (string, error)
- func UpdateCacheWithAPI_Token(token string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToHexString ¶
ConvertToHexString converts a string to a SHA512 Representation string.
func EnableDisableGameForUser ¶
EnableDisableGameForUser makes an action on the specified game for the user, if valid.
returns if the cache has been updated and the error if present.
func GetIDFromSessionSet ¶
GetIDFromSessionSet gets a generic ID of an entity from its set in cache and session token.
func IsValidAPI_Token ¶
IsValidAPI_Token Provides a control for forged requests with fake API_Tokens
Returns true if the token is valid, false otherwise.
func UpdateCacheNewSession ¶
func UpdateCacheNewSession(SessionSet string, expiration time.Duration, ID int64, values ...interface{}) (string, error)
UpdateCacheNewSession Updates the cache SessionSet with the email and the expiration.
ID represents the ID of the entity to put values represents additional data to create hashmaps, they must be in the form ["key1", "value1", "key2", "value2", ..., and so on]; can be empty.
func UpdateCacheWithAPI_Token ¶
UpdateCacheWithAPI_Token updates the Cache with the specified API_Token.
Return error if did not manage to update the cache.
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package isCacheConsistent contains variables to check whenever cache is not consistent with the archives (so it should not be used and must be fixed from a routine).
|
Package isCacheConsistent contains variables to check whenever cache is not consistent with the archives (so it should not be used and must be fixed from a routine). |