package
0.0.0-20241221201723-37ad33de60bf
Repository: https://github.com/quaver/api2.git
Documentation: pkg.go.dev

# Functions

AddFriend Adds a friend to the database.
AddUserActivity Adds a new user activity to the database.
CacheCountryPlayersInRedis Caches the amount of country players in redis.
Helper function to cache json data in redis.
CacheTotalMapsetsInRedis Caches the number of total scores in redis.
CacheTotalScoresInRedis Caches the number of total scores in redis.
CacheTotalUsersInRedis Caches the number of total scores in redis.
CalculateClanScore Calculates a clan score for a given map.
CalculateOverallAccuracy Calculates overall accuracy from a list of scores.
CalculateOverallRating Calculates overall rating from a list of scores.
CanUserChangeUsername Checks and returns if the user is allowed to change their username.
ChangeUserUsername Changes a user's username.
No description provided by the author
CloseMySQL Closes the MySQL database connection.
ConnectMySQL Connects to a MySQL database.
No description provided by the author
CreateElasticIndex Creates a new elastic search index by a given name.
CustomizeSortOrder Customizes the sort order of values.
DeactivateRankingQueueActions "De-activates" ranking queue actions.
DeleteClan Fully deletes a clan with a given id.
DeleteClanInviteById Deletes an individual clan invite.
DeleteElasticIndices Deletes one or many elastic search indices.
DeleteElasticSearchMapset Deletes an individual mapset in elastic.
DeleteMap Deletes a map from the DB.
DeleteMapset Deletes (hides) a given mapset.
DeletePinnedScore Deletes a pinned score.
DeletePlaylistMap Deletes a playlist map row.
DeletePlaylistMapset Deletes a playlist mapset row.
DeleteUserClanInviteNotifications Deletes a user's clan invite notifications.
DeleteUserClanInvites Deletes all of a user's clan invites.
DoesClanExistByName Returns if a clan exists by its name.
No description provided by the author
DoesPlaylistContainMap Checks if a playlist contains a specific map id.
GetAllMapsets Retrieves all the mapsets in the database.
GetAllPlaylists Returns all the playlists in the db.
GetAllScoresForMap Retrieves all scores for a map.
GetAllUsersInAClan Returns all users that are in a clan.
GetApplicationById Retrieves an application by id.
No description provided by the author
GetClanActivity Retrieves clan activity from the database.
GetClanById Gets a clan from the database by its id.
GetClanByName Gets a clan from the database by its name.
GetClanByTag Gets a clan from the db by its tag (case-sensitive).
GetClanInviteById GetClanInvite Retrieves a clan invite at a specific id.
GetClanLeaderboardForMode Retrieves a clan leaderboard for a given game mode.
GetClanMemberCount Returns the amount of users that are in a given clan.
GetClanPlayerScoresOnMap Fetches the top 10 scores from a clan on a given map.
GetClans Retrieves all clans from the db.
GetClanScore Retrieves an existing clan score.
GetClanScoreboardForMap Retrieves the clan scoreboard for a given map.
GetClanScoreById Retrieves a clan score by id.
GetClanScoresForMode Retrieves all clan scores for a given mode.
GetClanScoresForModeFull Retrieves clan scores with full data.
GetClansCount Gets the total amount of clans.
GetClanStatsByMode Retrieves clan stats by its game mode.
GetClanTagAndAccentColor Retrieves the name and tag for a clan.
GetCountryLeaderboard Retrieves the country leaderboard for a given country and mode.
GetCountryPlayerCountFromRedis Gets the total amount of users from a given country in redis.
GetCountryScoresForMap Retrieves the country scores for a map.
GetFriendScoresForMap Retrieves the friend scores for a map.
GetGlobalLeaderboard Retrieves the global leaderboard for a specific game mode.
GetGlobalScoresForMap Retrieves the global scores for a map.
GetLastScoreId Retrieves the id of the last score submitted.
GetMapById Retrieves a map from the database by id.
GetMapByMD5 Retrieves a map from the database by md5.
GetMapByMD5AndAlternative Retrieves a map from the database by either its md5 or alternative md5.
GetMapMods Retrieves map mods for a given map.
GetMapsetById Retrieves a mapset by its id.
GetMapsetOnlineOffsets Retrieves a list of online offsets.
GetMapsInMapset Retrieves all maps in a given set.
No description provided by the author
GetModById Gets a mod by its id.
GetModifierScoresForMap Retrieves the modifier scores for a map.
GetMultiplayerGame Gets an individual multiplayer game from the database.
GetMusicArtistAlbumById Retrieves a music artist album from the db.
GetMusicArtistAlbums Retrieves a given music artist's albums.
GetMusicArtistById Retrieves a music artist by their id.
GetMusicArtists Retrieves all music artists.
GetMusicArtistSongById Retrieves a song from the db by its id.
GetMusicArtistSongsInAlbum Returns the songs in a music artist's album.
GetNotificationById Retrieves a user notification by id.
GetNotificationCount Gets the total amount of notifications that match a given filter.
GetNotifications Retrieves a user's notifications.
GetOldOnHoldMapsetsInRankingQueue Gets mapsets in the ranking queue that have been on-hold for over a month.
GetOnlineUserCountFromRedis Retrieves the amount of online users from redis.
GetOrderItemById Retrieves an order item from the database by id.
GetOrderSubscriptionById Retrieves a subscription by id.
GetPendingClanInvite Retrieves a clan invite for a given user.
GetPendingClanInvites Gets all of a clan's pending invites.
GetPlaylist Gets an individual playlist without mapset data.
GetPlaylistFull Gets an individual playlist with mapsets/maps included.
GetPlaylistMapsetByIds Gets a playlist mapset by its playlist id and mapset id.
GetPlaylistMapsetsByMapsetId Gets all the playlist mapsets that have a particular mapset id.
GetPrivateChatMessageHistory Gets the last 50 messages of a private chat.
GetPublicChatMessageHistory Gets the last 50 messages of a public chat.
GetRankedMapsetIds Retrieves a list of ranked mapset ids.
GetRankingQueue Retrieves the ranking queue for a given game mode.
GetRankingQueueComment Retrieves a ranking queue comment at a given id.
GetRankingQueueComments Retrieves the ranking queue comments for a given mapset.
GetRankingQueueCount Gets the total amount of maps in the ranking queue.
GetRankingQueueDenies Retrieves the active denies for a given mapset in the ranking queue.
GetRankingQueueMapset Retrieves a ranking queue mapset for a given mapset id.
GetRankingQueueVotes Retrieves the active votes for a given mapset in the ranking queue.
GetRankingSupervisors Returns users who are Ranking Supervisors.
GetRateScoresForMap Retrieves the rate scores for a map.
GetRecentMultiplayerGames Retrieves recently played multiplayer games from the DB.
GetRecentUserActivity Gets the most recent user activity.
GetScoreById Retrieves a score from the database by its id.
GetSteamOrdersByIds Retrieves orders by their steam order id & transaction id.
GetStripeOrderById Gets Stripe orders by id.
GetTeamMembers Returns users in the Quaver team.
GetTotalCountryPlayersFromRedis Retrieves the total amount of users on the country leaderboard.
GetTotalHitsLeaderboard Retrieves the total hits leaderboard for a specific game mode.
GetTotalMapsetCountFromRedis Retrieves the total amount of mapsets from redis.
GetTotalMultiplayerGameCount Gets the total amount of multiplayer game.
GetTotalPlaylistCount Retrieves the total amount of playlists that match a given query.
GetTotalScoreCountFromRedis Retrieves the total amount of scores from redis.
GetTotalUnbannedUserCount Returns the total amount of users.
GetTotalUnreadNotifications Retrieves the total amount of unread notifications the user has.
GetTotalUserCountFromRedis Retrieves the total amount of users from redis.
GetUserAchievements Gets a user's unlocked achievements.
GetUserActiveApplications Retrieves a user's active applications.
GetUserActiveSubscriptions Retrieves a user's active stripe subscriptions.
GetUserBadges Retrieves a user's badges from the database.
GetUserBestScoresForMode Retrieves a user's best scores for a given game mode.
GetUserById Retrieves a user from the database by their user id.
GetUserBySteamId Retrieves a user from the database by their steam id.
GetUserByUsername Retrieves a user from the database by their username.
GetUserClanInvites Retrieves a list of pending clan invites for the user.
GetUserClientStatus Retrieves a user's client status from Redis.
GetUserFirstPlaces Retrieves all of a user's first place scores.
GetUserFirstPlaceScoresForMode Retrieves a user's first place scores for a given mode.
GetUserFreeTrialOrder Gets a user's free trial donator order.
GetUserFriends Returns a user's friends list.
GetUserGradeScoresForMode Retrieves a user's scores for a particular grade.
GetUserMapsets Retrieves a user's uploaded mapsets.
No description provided by the author
GetUserMapsetsInRankingQueue Retrieves the mapsets the user has in the ranking queue.
GetUserMonthlyUploadMapsets Retrieves a user's mapsets that they've uploaded in the past month.
GetUserMostPlayedMaps Returns a user's most played maps.
GetUserOrders Gets a user's orders.
GetUserPersonalBestScoreAll Retrieves a user's personal best ALL score on a given map.
GetUserPersonalBestScoreGlobal Retrieves a user's personal best global score on a given map.
GetUserPersonalBestScoreMods Retrieves a user's personal best modifier score on a given map.
GetUserPersonalBestScoreRate Retrieves a user's personal best rate score on a given map.
GetUserPinnedScores Retrieves a user's pinned scores.
GetUserPlaylists Gets a user's created playlists.
GetUserRankingQueueComments Retrieves a user's ranking queue comments between two times.
GetUserRanksForMode Retrieves a user's global and country ranks for a game mode.
GetUserRankStatisticsForMode Retrieves a users rank statistics for a given game mode.
GetUserRecentScoresForMode Retrieves a user's recent scores for a given mode.
GetUserRelationship Retrieves a user relationship in the database.
GetUsersInClan Retrieves all the users that are in a given clan.
GetUserStripeSubscriptions Gets a user's active stripe subscriptions.
GetWeeklyMostPlayedMapsets Retrieves the most played mapsets in the past week.
No description provided by the author
No description provided by the author
IncrementTotalMapsetCount Increments the total mapset count in redis.
IndexAllElasticSearchMapsets Indexes all mapsets in the DB in ElasticSearch.
IndexElasticSearchMapset Indexes an individual mapset in elastic.
InitializeElasticSearch Initializes the ElasticSearch client.
InitializeRedis Initializes a Redis client.
InsertCrashLog Inserts a crash log into the database.
InsertMap Inserts a map into the database.
InsertMapsetDownload Inserts a mapset download into the database.
InviteUserToClan Creates a clan invite for a user.
IsUsernameAvailable Returns if a username is available to use.
IsValidClanName Checks a string to see if it is a valid clan name.
IsValidClanTag Checks a string to see if it is a valid clan tag.
MarkUserNotificationsAsRead Marks all of a user's notifications as read.
NewClanActivity Creates a new clan activity.
NewClanInviteNotification Returns a new clan invite notification.
NewClanKickedNotification Returns a new clan kicked notification.
NewClanLostFirstPlaceNotification Returns a new clan lost first place notification.
NewClanMapRankedNotification Returns a new clan map ranked notification.
NewDonatorExpiredNotification Returns a new donator expired notification.
No description provided by the author
NewMapModCommentNotification Returns a new map mod comment notification.
NewMapModNotification Returns a new map mod notification.
Returns a new mapset ranking queue action notification.
NewMapsetRankedNotification Returns a new ranked mapset notification.
NewOrderItemGiftNotification Returns a new order gift notification.
No description provided by the author
PerformFullClanRecalculation Recalculates all of a clan's scores + stats.
RankMapset Ranks all maps in a mapset.
RecalculateClanStats Recalculates a clan stats for a given mode.
RemoveClanFromLeaderboards Removes a clan from a given leaderboard.
RemoveFriend Removes a friend from the database.
RemoveUserClanScores Removes all user scores from a clan.
RemoveUserFromLeaderboards Removes a user from all leaderboards.
ReplaceUserFirstPlaces Goes through a user's first place scores and replaces it with the next unbanned player.
ResetPersonalBests Resets the personal best scores of all maps in a set.
SearchElasticMapsets Searches ElasticSearch for mapsets.
SearchPlaylists Returns playlists that meet a particular search query.
SearchUsersByName Searches for users that have a similar name to the query.
SyncMusicArtistAlbumSortOrders Syncs the sort order of music artist albums.
SyncMusicArtistSongSortOrders Syncs the sort order of songs in a music artist's album.
SyncMusicArtistSortOrders Syncs the sort order of music artists.
SyncPinnedScoreSortOrder Resets the order of pinned scores to keep things in sync.
SyncSortOrder Generic function to update the sort order of a slice of items.
No description provided by the author
UpdateAllClanLeaderboards Updates the clan leaderboards for every mode.
UpdateClanLeaderboard Adds a clan to a given leaderboard.
UpdateElasticSearchMapset Updates an individual mapset in elastic.
No description provided by the author
UpdateMapClanRanked Updates the clan ranked status of a map.
UpdateMapDifficultyRating Updates the difficulty rating of a map.
UpdateMapMD5 Updates the md5 hash of a map.
UpdateMapsetDescription Updates a given mapset's description.
UpdateMapsetPackageMD5 Updates the package md5 of a mapset.
UpdatePinnedScoreSortOrder Updates the sort order of a given pinned score.
UpdatePlaylistMapCount Updates the map count for a playlist.
UpdateUserAboutMe Updates a user's about me.
UpdateUserAccentColor Updates a user's accent color.
UpdateUserAccentColorCustomizable Updates whether the user can update their accent_color.
UpdateUserAllowed Updates whether the user is allowed to play (banned).
UpdateUserClan Updates a given user's clan in the database.
UpdateUserDiscordId Updates a user's discord id.
UpdateUserUsername Updates a user's username.
UserHasBadge Returns if a user has a particular badge.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
The SQL database to use throughout the application.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author