Documentation ¶
Index ¶
- Constants
- Variables
- type AddMemberRequest
- type AlbumCount
- type AlbumStatsResponse
- type ArtistStatsResponse
- type CompareAlbumsResp
- type CompareArtistsResp
- type CompareTracksResp
- type Controller
- func (*Controller) AddGuest(w http.ResponseWriter, r *http.Request)
- func (*Controller) AddMember(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CreateRoom(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CreateUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CurrentUser(w http.ResponseWriter, r *http.Request)
- func (*Controller) DeleteMember(w http.ResponseWriter, r *http.Request)
- func (*Controller) DeleteRoom(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Devices(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetAlbum(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetArtist(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetArtistsByURIs(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetGeneralInfo(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetLogsByDate(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetMissingArtistURIs(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetMissingArtistURIsByUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetMissingISRCNumbers(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetPlayback(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetPlaylist(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetQueue(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetRoom(w http.ResponseWriter, r *http.Request)
- func (*Controller) GetRoomGuestsAndMembers(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetRoomPermissions(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetSpotifyLoginURL(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTableData(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetToken(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTracksByURIs(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetUncachedTracks(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetUserHostedRooms(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetUserJoinedRooms(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetVersion(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Health(w http.ResponseWriter, r *http.Request)
- func (*Controller) JoinRoomAsMember(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Next(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Pause(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Play(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Previous(w http.ResponseWriter, r *http.Request)
- func (c *Controller) PushToRoomQueue(w http.ResponseWriter, r *http.Request)
- func (c *Controller) PushToUserQueue(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SearchArtistsByUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SearchTracksByUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SearchTracksFromRoom(w http.ResponseWriter, r *http.Request)
- func (*Controller) SetModerator(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SetVolume(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SpotifyAuthRedirect(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SuggestedTracks(w http.ResponseWriter, r *http.Request)
- func (c *Controller) TracksLeftToProcess(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UnlinkSpotify(w http.ResponseWriter, r *http.Request)
- func (*Controller) UpdatePassword(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UserAcceptFriendRequest(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UserDeleteFriendRequest(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UserFriendRequestData(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UserGetFriends(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UserHasSpotifyHistory(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UserPlaylists(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UserSendFriendRequest(w http.ResponseWriter, r *http.Request)
- type CreateUserBody
- type CreateUserResponse
- type FriendRequestData
- type FullLogEntry
- type GetRoomAuthLevelResponse
- type GetRoomGuestsAndMembersResponse
- type GetRoomsResponse
- type GetSpotifyLoginURLResponse
- type HistoryEntry
- type HistoryEntryArtist
- type HistoryResponse
- type PermissionLevel
- type RequestContext
- type SetModeratorRequest
- type StatsController
- func (c *StatsController) GetAlbumRankingsByURI(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetAlbumStatsByURI(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetAllHistory(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetAllStreamsByURI(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetArtistRankingsByURI(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetArtistStatsByURI(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetRecentArtistEvents(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetRecentTrackEvents(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetTopAlbumsByTimeframe(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetTopArtistsByTimeframe(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetTopTracksByTimeframe(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetTrackRankingsByURI(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) GetTrackStatsByURI(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) UploadHistory(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) UserCompareFriendTopAlbums(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) UserCompareFriendTopArtists(w http.ResponseWriter, r *http.Request)
- func (c *StatsController) UserCompareFriendTopTracks(w http.ResponseWriter, r *http.Request)
- type StatsControllerInterface
- type Stream
- type TimeframeRanking
- type TokenResponse
- type TopAlbumsResponse
- type TopArtistsResponse
- type TopTracksResponse
- type TrackStatsResponse
- type UpdatePasswordRequest
Constants ¶
View Source
const ( DEFAULT_MIN_MS_FILTER = 30000 DEFAULT_LIMIT = 50 )
Variables ¶
View Source
var (
SearchMissingError, _ = json.MarshalIndent(requests.ErrorResponse{
Error: "No search term present",
}, "", " ")
)
View Source
var (
SongIDMissingError, _ = json.MarshalIndent(requests.ErrorResponse{
Error: "No song specified",
}, "", " ")
)
Functions ¶
This section is empty.
Types ¶
type AddMemberRequest ¶
type AlbumCount ¶
type AlbumStatsResponse ¶
type ArtistStatsResponse ¶
type CompareAlbumsResp ¶
type CompareAlbumsResp struct { StreamsByURI map[string]map[uuid.UUID]int64 `json:"streams_by_uri"` RanksByURI map[string]map[uuid.UUID]int64 `json:"ranks_by_uri"` AlbumData map[string]spotify.FullAlbum `json:"album_data"` FriendData map[uuid.UUID]*db.User `json:"friend_data"` FriendStreams map[uuid.UUID][]*history.AlbumStreams `json:"friend_streams"` }
type CompareArtistsResp ¶
type CompareArtistsResp struct { StreamsByURI map[string]map[uuid.UUID]int64 `json:"streams_by_uri"` RanksByURI map[string]map[uuid.UUID]int64 `json:"ranks_by_uri"` ArtistData map[string]spotify.FullArtist `json:"artist_data"` FriendData map[uuid.UUID]*db.User `json:"friend_data"` FriendStreams map[uuid.UUID][]*history.ArtistStreams `json:"friend_streams"` }
type CompareTracksResp ¶
type Controller ¶
type Controller struct{}
func (*Controller) AddGuest ¶
func (*Controller) AddGuest(w http.ResponseWriter, r *http.Request)
func (*Controller) AddMember ¶
func (*Controller) AddMember(w http.ResponseWriter, r *http.Request)
func (*Controller) CreateRoom ¶
func (c *Controller) CreateRoom(w http.ResponseWriter, r *http.Request)
func (*Controller) CreateUser ¶
func (c *Controller) CreateUser(w http.ResponseWriter, r *http.Request)
func (*Controller) CurrentUser ¶
func (c *Controller) CurrentUser(w http.ResponseWriter, r *http.Request)
func (*Controller) DeleteMember ¶
func (*Controller) DeleteMember(w http.ResponseWriter, r *http.Request)
func (*Controller) DeleteRoom ¶
func (*Controller) DeleteRoom(w http.ResponseWriter, r *http.Request)
func (*Controller) Devices ¶
func (c *Controller) Devices(w http.ResponseWriter, r *http.Request)
func (*Controller) GetAlbum ¶
func (c *Controller) GetAlbum(w http.ResponseWriter, r *http.Request)
func (*Controller) GetArtist ¶
func (c *Controller) GetArtist(w http.ResponseWriter, r *http.Request)
func (*Controller) GetArtistsByURIs ¶
func (c *Controller) GetArtistsByURIs(w http.ResponseWriter, r *http.Request)
func (*Controller) GetGeneralInfo ¶
func (c *Controller) GetGeneralInfo(w http.ResponseWriter, r *http.Request)
func (*Controller) GetLogsByDate ¶
func (c *Controller) GetLogsByDate(w http.ResponseWriter, r *http.Request)
func (*Controller) GetMissingArtistURIs ¶
func (c *Controller) GetMissingArtistURIs(w http.ResponseWriter, r *http.Request)
func (*Controller) GetMissingArtistURIsByUser ¶
func (c *Controller) GetMissingArtistURIsByUser(w http.ResponseWriter, r *http.Request)
func (*Controller) GetMissingISRCNumbers ¶
func (c *Controller) GetMissingISRCNumbers(w http.ResponseWriter, r *http.Request)
func (*Controller) GetPlayback ¶
func (c *Controller) GetPlayback(w http.ResponseWriter, r *http.Request)
func (*Controller) GetPlaylist ¶
func (c *Controller) GetPlaylist(w http.ResponseWriter, r *http.Request)
func (*Controller) GetQueue ¶
func (c *Controller) GetQueue(w http.ResponseWriter, r *http.Request)
func (*Controller) GetRoom ¶
func (c *Controller) GetRoom(w http.ResponseWriter, r *http.Request)
func (*Controller) GetRoomGuestsAndMembers ¶
func (*Controller) GetRoomGuestsAndMembers(w http.ResponseWriter, r *http.Request)
func (*Controller) GetRoomPermissions ¶
func (c *Controller) GetRoomPermissions(w http.ResponseWriter, r *http.Request)
func (*Controller) GetSpotifyLoginURL ¶
func (c *Controller) GetSpotifyLoginURL(w http.ResponseWriter, r *http.Request)
func (*Controller) GetTableData ¶
func (c *Controller) GetTableData(w http.ResponseWriter, r *http.Request)
func (*Controller) GetToken ¶
func (c *Controller) GetToken(w http.ResponseWriter, r *http.Request)
func (*Controller) GetTracksByURIs ¶
func (c *Controller) GetTracksByURIs(w http.ResponseWriter, r *http.Request)
func (*Controller) GetUncachedTracks ¶
func (c *Controller) GetUncachedTracks(w http.ResponseWriter, r *http.Request)
func (*Controller) GetUserHostedRooms ¶
func (c *Controller) GetUserHostedRooms(w http.ResponseWriter, r *http.Request)
func (*Controller) GetUserJoinedRooms ¶
func (c *Controller) GetUserJoinedRooms(w http.ResponseWriter, r *http.Request)
func (*Controller) GetVersion ¶
func (c *Controller) GetVersion(w http.ResponseWriter, r *http.Request)
func (*Controller) Health ¶
func (c *Controller) Health(w http.ResponseWriter, r *http.Request)
func (*Controller) JoinRoomAsMember ¶
func (*Controller) JoinRoomAsMember(w http.ResponseWriter, r *http.Request)
func (*Controller) Next ¶
func (c *Controller) Next(w http.ResponseWriter, r *http.Request)
func (*Controller) Pause ¶
func (c *Controller) Pause(w http.ResponseWriter, r *http.Request)
func (*Controller) Play ¶
func (c *Controller) Play(w http.ResponseWriter, r *http.Request)
func (*Controller) Previous ¶
func (c *Controller) Previous(w http.ResponseWriter, r *http.Request)
func (*Controller) PushToRoomQueue ¶
func (c *Controller) PushToRoomQueue(w http.ResponseWriter, r *http.Request)
func (*Controller) PushToUserQueue ¶
func (c *Controller) PushToUserQueue(w http.ResponseWriter, r *http.Request)
func (*Controller) SearchArtistsByUser ¶
func (c *Controller) SearchArtistsByUser(w http.ResponseWriter, r *http.Request)
func (*Controller) SearchTracksByUser ¶
func (c *Controller) SearchTracksByUser(w http.ResponseWriter, r *http.Request)
func (*Controller) SearchTracksFromRoom ¶
func (c *Controller) SearchTracksFromRoom(w http.ResponseWriter, r *http.Request)
func (*Controller) SetModerator ¶
func (*Controller) SetModerator(w http.ResponseWriter, r *http.Request)
func (*Controller) SetVolume ¶
func (c *Controller) SetVolume(w http.ResponseWriter, r *http.Request)
func (*Controller) SpotifyAuthRedirect ¶
func (c *Controller) SpotifyAuthRedirect(w http.ResponseWriter, r *http.Request)
func (*Controller) SuggestedTracks ¶
func (c *Controller) SuggestedTracks(w http.ResponseWriter, r *http.Request)
func (*Controller) TracksLeftToProcess ¶
func (c *Controller) TracksLeftToProcess(w http.ResponseWriter, r *http.Request)
func (*Controller) UnlinkSpotify ¶
func (c *Controller) UnlinkSpotify(w http.ResponseWriter, r *http.Request)
func (*Controller) UpdatePassword ¶
func (*Controller) UpdatePassword(w http.ResponseWriter, r *http.Request)
func (*Controller) UserAcceptFriendRequest ¶
func (c *Controller) UserAcceptFriendRequest(w http.ResponseWriter, r *http.Request)
func (*Controller) UserDeleteFriendRequest ¶
func (c *Controller) UserDeleteFriendRequest(w http.ResponseWriter, r *http.Request)
func (*Controller) UserFriendRequestData ¶
func (c *Controller) UserFriendRequestData(w http.ResponseWriter, r *http.Request)
func (*Controller) UserGetFriends ¶
func (c *Controller) UserGetFriends(w http.ResponseWriter, r *http.Request)
func (*Controller) UserHasSpotifyHistory ¶
func (c *Controller) UserHasSpotifyHistory(w http.ResponseWriter, r *http.Request)
func (*Controller) UserPlaylists ¶
func (c *Controller) UserPlaylists(w http.ResponseWriter, r *http.Request)
func (*Controller) UserSendFriendRequest ¶
func (c *Controller) UserSendFriendRequest(w http.ResponseWriter, r *http.Request)
type CreateUserBody ¶
type CreateUserResponse ¶
type FriendRequestData ¶
type FriendRequestData struct { Suggestions []*db.UserGetFriendSuggestionsRow `json:"suggestions"` SentRequests []*db.UserGetSentFriendRequestsRow `json:"sent_requests"` ReceivedRequests []*db.UserGetReceivedFriendRequestsRow `json:"received_requests"` }
type FullLogEntry ¶
type GetRoomsResponse ¶
type GetSpotifyLoginURLResponse ¶
type GetSpotifyLoginURLResponse struct {
URL string `json:"url"`
}
type HistoryEntry ¶
type HistoryEntry struct { Timestamp time.Time `json:"timestamp"` TrackName string `json:"track_name"` AlbumName string `json:"album_name"` ArtistName string `json:"artist_name"` MsPlayed int32 `json:"ms_played"` SpotifyTrackUri string `json:"spotify_track_uri"` SpotifyAlbumUri string `json:"spotify_album_uri"` ImageURL *string `json:"image_url"` Artists []db.TrackArtist `json:"artists"` }
type HistoryEntryArtist ¶
type HistoryResponse ¶
type HistoryResponse struct { History []HistoryEntry `json:"history"` LastFetched *time.Time `json:"last_fetched"` }
type PermissionLevel ¶
type PermissionLevel int
const ( IncorrectPassword PermissionLevel = iota NotAuthorized Guest Member Moderator Host )
type RequestContext ¶
type RequestContext struct { Room *room.Room UserID string GuestID string PermissionLevel PermissionLevel }
type SetModeratorRequest ¶
type StatsController ¶
type StatsController struct{}
func (*StatsController) GetAlbumRankingsByURI ¶
func (c *StatsController) GetAlbumRankingsByURI(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetAlbumStatsByURI ¶
func (c *StatsController) GetAlbumStatsByURI(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetAllHistory ¶
func (c *StatsController) GetAllHistory(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetAllStreamsByURI ¶
func (c *StatsController) GetAllStreamsByURI(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetArtistRankingsByURI ¶
func (c *StatsController) GetArtistRankingsByURI(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetArtistStatsByURI ¶
func (c *StatsController) GetArtistStatsByURI(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetRecentArtistEvents ¶
func (c *StatsController) GetRecentArtistEvents(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetRecentTrackEvents ¶
func (c *StatsController) GetRecentTrackEvents(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetTopAlbumsByTimeframe ¶
func (c *StatsController) GetTopAlbumsByTimeframe(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetTopArtistsByTimeframe ¶
func (c *StatsController) GetTopArtistsByTimeframe(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetTopTracksByTimeframe ¶
func (c *StatsController) GetTopTracksByTimeframe(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetTrackRankingsByURI ¶
func (c *StatsController) GetTrackRankingsByURI(w http.ResponseWriter, r *http.Request)
func (*StatsController) GetTrackStatsByURI ¶
func (c *StatsController) GetTrackStatsByURI(w http.ResponseWriter, r *http.Request)
func (*StatsController) UploadHistory ¶
func (c *StatsController) UploadHistory(w http.ResponseWriter, r *http.Request)
func (*StatsController) UserCompareFriendTopAlbums ¶
func (c *StatsController) UserCompareFriendTopAlbums(w http.ResponseWriter, r *http.Request)
func (*StatsController) UserCompareFriendTopArtists ¶
func (c *StatsController) UserCompareFriendTopArtists(w http.ResponseWriter, r *http.Request)
func (*StatsController) UserCompareFriendTopTracks ¶
func (c *StatsController) UserCompareFriendTopTracks(w http.ResponseWriter, r *http.Request)
type StatsControllerInterface ¶
type StatsControllerInterface interface { GetTopAlbumsByMonth(w http.ResponseWriter, r *http.Request) GetTopArtistsByMonth(w http.ResponseWriter, r *http.Request) GetTopTracksByMonth(w http.ResponseWriter, r *http.Request) }
type Stream ¶
type Stream struct { Timestamp time.Time `json:"timestamp"` MsPlayed int `json:"ms_played"` TrackName string `json:"track_name"` AlbumName string `json:"album_name"` SpotifyTrackUri string `json:"spotify_track_uri"` SpotifyAlbumUri string `json:"spotify_album_uri"` ISRC *string `json:"isrc,omitempty"` }
type TimeframeRanking ¶
type TokenResponse ¶
type TopAlbumsResponse ¶
type TopAlbumsResponse struct { Rankings []*history.AlbumRankings `json:"rankings"` AlbumData map[string]spotify.FullAlbum `json:"album_data"` }
type TopArtistsResponse ¶
type TopTracksResponse ¶
type TopTracksResponse struct { Rankings []*history.TrackRankings `json:"rankings"` TrackData map[string]db.TrackData `json:"track_data"` }
type TrackStatsResponse ¶
type UpdatePasswordRequest ¶
type UpdatePasswordRequest struct {
NewPassword string `json:"new_password"`
}
Click to show internal directories.
Click to hide internal directories.