Documentation
¶
Index ¶
- Variables
- type ErrStatus
- type FileUpload
- type ServerClient
- func (s ServerClient) AddPlayCount(ctx context.Context, trackID uuid.UUID) error
- func (s ServerClient) AddPlaylist(ctx context.Context, playlist types.Playlist) error
- func (s ServerClient) AddPlaylistTrack(ctx context.Context, playlistID, albumID, trackID uuid.UUID) error
- func (s ServerClient) AddSmartPlaylist(ctx context.Context, playlist types.PlaylistBase, filter types.TrackFilter) error
- func (s *ServerClient) AuthToken() string
- func (s ServerClient) CheckStatus(ctx context.Context) (h types.ServerApiInfo, err error)
- func (s ServerClient) CountAlbums(ctx context.Context) (cnt int, err error)
- func (s ServerClient) CountArtists(ctx context.Context) (cnt int, err error)
- func (s ServerClient) CountLikedTracks(ctx context.Context) (cnt int, err error)
- func (s ServerClient) CountPlaylistTracks(ctx context.Context, playlistID uuid.UUID) (int, error)
- func (s ServerClient) CountPlaylists(ctx context.Context) (int, error)
- func (s ServerClient) CountTracks(ctx context.Context) (cnt int, err error)
- func (s ServerClient) CreateAPIToken(ctx context.Context, name string) (token string, err error)
- func (s ServerClient) CreateArtist(ctx context.Context, artistData types.ArtistBase) error
- func (s ServerClient) CreateUser(ctx context.Context, email, username, password string, roles []types.UserRole) error
- func (s ServerClient) DeletePlaylist(ctx context.Context, id uuid.UUID) error
- func (s ServerClient) DeletePlaylistTrack(ctx context.Context, id uuid.UUID) error
- func (s ServerClient) DeleteToken(ctx context.Context, tokenID uuid.UUID) error
- func (s ServerClient) DeleteUser(ctx context.Context, id uuid.UUID) error
- func (s ServerClient) DeleteUserToken(ctx context.Context, tokenID uuid.UUID) error
- func (s ServerClient) DeviceDelete(ctx context.Context, deviceID uuid.UUID) error
- func (s ServerClient) DeviceDeleteToken(ctx context.Context, deviceID uuid.UUID) error
- func (s ServerClient) DeviceNextTrack(ctx context.Context, deviceID uuid.UUID) (err error)
- func (s ServerClient) DevicePlayPause(ctx context.Context, deviceID uuid.UUID) (err error)
- func (s ServerClient) DevicePlayerAddToQueue(ctx context.Context, deviceID uuid.UUID, track types.TrackDetailed) (err error)
- func (s ServerClient) DevicePlayerSetRepeat(ctx context.Context, deviceID uuid.UUID, repeatType types.RepeatType) (err error)
- func (s ServerClient) DevicePlayerSetShuffle(ctx context.Context, deviceID uuid.UUID, active bool) (err error)
- func (s ServerClient) DevicePlayerStop(ctx context.Context, deviceID uuid.UUID) (err error)
- func (s ServerClient) DevicePreviousTrack(ctx context.Context, deviceID uuid.UUID) (err error)
- func (s ServerClient) DeviceSetPlayerState(ctx context.Context, deviceID uuid.UUID, pc types.PlayerState) (err error)
- func (s ServerClient) DownloadAlbumCover(ctx context.Context, albumID uuid.UUID, size imagemagick.ImageSize, ...) error
- func (s ServerClient) DownloadArtistImage(ctx context.Context, artistID string, size imagemagick.ImageSize, w io.Writer) error
- func (s ServerClient) DownloadMediaFile(ctx context.Context, id uuid.UUID, w io.Writer) error
- func (s ServerClient) DownloadMediaFilePart(ctx context.Context, id uuid.UUID, startByte, endByte int, w io.Writer) (finalBytes bool, err error)
- func (s ServerClient) DownloadPlaylistImage(ctx context.Context, id uuid.UUID, size imagemagick.ImageSize, w io.Writer) error
- func (s ServerClient) FilterTracks(ctx context.Context, filter types.TrackFilter, page, limit int) (types.ListPaginationPayload[types.TrackDetailed], error)
- func (s ServerClient) GetAlbum(ctx context.Context, albumID uuid.UUID) (album types.Album, err error)
- func (s ServerClient) GetAlbumArtist(ctx context.Context, albumID, artistID uuid.UUID, role types.ArtistRole) (albumArtist types.AlbumArtist, err error)
- func (s ServerClient) GetAlbumArtistByID(ctx context.Context, id uuid.UUID) (albumArtist types.AlbumArtist, err error)
- func (s ServerClient) GetAlbumDetailed(ctx context.Context, albumID uuid.UUID) (album types.AlbumDetailed, err error)
- func (s ServerClient) GetAlbumTrack(ctx context.Context, albumID uuid.UUID, discNumber, trackNumber int) (albumTrack types.AlbumTrack, err error)
- func (s ServerClient) GetAlbumTrackByID(ctx context.Context, id uuid.UUID) (albumTrack types.AlbumTrack, err error)
- func (s ServerClient) GetArtist(ctx context.Context, artistID uuid.UUID) (artist types.Artist, err error)
- func (s ServerClient) GetArtistTopTracks(ctx context.Context, artistID uuid.UUID) ([]types.TrackDetailed, error)
- func (s ServerClient) GetLike(ctx context.Context, id uuid.UUID) (like types.Like, err error)
- func (s ServerClient) GetMediaFile(ctx context.Context, id uuid.UUID) (mediaFile types.MediaFile, err error)
- func (s ServerClient) GetPlaylist(ctx context.Context, id uuid.UUID) (playlist types.Playlist, err error)
- func (s ServerClient) GetPlaylistTrack(ctx context.Context, id uuid.UUID) (playlistTrack types.PlaylistTrack, err error)
- func (s ServerClient) GetRating(ctx context.Context, id uuid.UUID) (rating types.Rating, err error)
- func (s ServerClient) GetSmartPlaylistArtist(ctx context.Context, id uuid.UUID) (artist types.SmartPlaylistArtist, err error)
- func (s ServerClient) GetSmartPlaylistContent(ctx context.Context, id uuid.UUID) (content types.SmartPlaylistContent, err error)
- func (s ServerClient) GetSyncState(ctx context.Context, changesSince time.Time) (syncState types.SyncState, err error)
- func (s ServerClient) GetTrack(ctx context.Context, trackID uuid.UUID) (track types.Track, err error)
- func (s ServerClient) GetTrackAnalysisByID(ctx context.Context, id uuid.UUID) (trackAnalysis types.TrackAnalysis, err error)
- func (s ServerClient) GetTrackArtistByID(ctx context.Context, id uuid.UUID) (trackArtist types.TrackArtist, err error)
- func (s ServerClient) GetTrackDetailed(ctx context.Context, trackID, albumID uuid.UUID) (track types.TrackDetailed, err error)
- func (s ServerClient) GetTrackRatings(ctx context.Context, trackID uuid.UUID) (ratings []types.Rating, err error)
- func (s ServerClient) GetUser(ctx context.Context) (user types.UserDetails, err error)
- func (s ServerClient) ImportAlbum(ctx context.Context, r io.Reader, filename string, musicbrainzID *string) error
- func (s ServerClient) LikeTrack(ctx context.Context, trackID uuid.UUID) error
- func (s ServerClient) ListAlbums(ctx context.Context, sortBy database.SortBy, sortOrder database.SortOrder) (albums []types.AlbumDetailed, err error)
- func (s ServerClient) ListAlbumsByArtist(ctx context.Context, artistID uuid.UUID, sortBy database.SortBy, ...) (albums []types.AlbumDetailed, err error)
- func (s ServerClient) ListArtists(ctx context.Context, sortBy database.SortBy, sortOrder database.SortOrder) (artists []types.ArtistDetailed, err error)
- func (s ServerClient) ListDevices(ctx context.Context) (devices []types.DeviceDetailed, err error)
- func (s ServerClient) ListEntityEvents(ctx context.Context) (events []types.EntityEvent, err error)
- func (s ServerClient) ListFeaturedAlbumsByArtist(ctx context.Context, artistID uuid.UUID, sortBy database.SortBy, ...) (albums []types.AlbumDetailed, err error)
- func (s ServerClient) ListImportItems(ctx context.Context, page, limit int) (types.ListPaginationPayload[types.Import], error)
- func (s ServerClient) ListLikedTracks(ctx context.Context) ([]types.TrackDetailed, error)
- func (s ServerClient) ListPlaylistTracks(ctx context.Context, playlistID uuid.UUID, sortBy database.SortBy, ...) ([]types.TrackDetailed, error)
- func (s ServerClient) ListPlaylists(ctx context.Context, includePublic bool, sortBy database.SortBy, ...) ([]types.Playlist, error)
- func (s ServerClient) ListTracksByAlbum(ctx context.Context, albumID string) (tracks []types.Track, err error)
- func (s ServerClient) ListTracksDetailedByAlbum(ctx context.Context, albumID uuid.UUID) (tracks []types.TrackDetailed, err error)
- func (s ServerClient) ListUserRoles(ctx context.Context) ([]types.UserRole, error)
- func (s ServerClient) ListUserTokens(ctx context.Context) (tokens []types.TokenLimited, err error)
- func (s ServerClient) ListUsers(ctx context.Context, includeMachineUsers bool) (users []types.UserDetails, err error)
- func (s ServerClient) Login(ctx context.Context, email, password string, longLivedToken bool) (resp types.LoginResp, err error)
- func (s ServerClient) Logout(ctx context.Context) (err error)
- func (s ServerClient) RateTrack(ctx context.Context, trackID uuid.UUID, value int) error
- func (s *ServerClient) RegisterDevice(ctx context.Context, deviceID *uuid.UUID, deviceDetails types.DeviceBase) (newDeviceID uuid.UUID, err error)
- func (s ServerClient) SearchFull(ctx context.Context, searchTerm string) (si []types.SearchItem, err error)
- func (s ServerClient) SearchMusicBrainz(ctx context.Context, artist, album string) (types.ListPayload[musicbrainz.SearchResults], error)
- func (s *ServerClient) SetAuthToken(token string)
- func (s ServerClient) SubscribeDeviceEvents(ctx context.Context, deviceID uuid.UUID, handler sse.EventHandler) error
- func (s ServerClient) SyncPlayHistory(ctx context.Context, changesSince time.Time, newItems []types.PlayHistory) (syncState types.PlayHistorySyncState, err error)
- func (s ServerClient) UnlikeTrack(ctx context.Context, trackID uuid.UUID) error
- func (s ServerClient) UpdateAlbum(ctx context.Context, albumID uuid.UUID, albumData types.AlbumUpdate) error
- func (s ServerClient) UpdateArtist(ctx context.Context, artistID uuid.UUID, artistData types.Artist) error
- func (s ServerClient) UpdatePlayContext(ctx context.Context, pc types.PlayContext) error
- func (s ServerClient) UpdatePlaybackState(ctx context.Context, ps types.PlaybackState) error
- func (s ServerClient) UpdatePlaylist(ctx context.Context, id uuid.UUID, data types.Playlist) error
- func (s ServerClient) UpdateProfile(ctx context.Context, data types.UpdateProfileReq) error
- func (s ServerClient) UpdateTrack(ctx context.Context, id uuid.UUID, data types.TrackUpdate) error
- func (s ServerClient) UpdateUser(ctx context.Context, userID uuid.UUID, email, username string, ...) error
- func (s ServerClient) UploadAlbumImage(ctx context.Context, id uuid.UUID, img FileUpload) error
- func (s ServerClient) UploadArtistImage(ctx context.Context, artistID uuid.UUID, img FileUpload) error
- func (s ServerClient) UploadPlaylistImage(ctx context.Context, id uuid.UUID, img FileUpload) error
- func (s ServerClient) UploadUserImage(ctx context.Context, r io.Reader, filename string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DEVICES_PATH = []string{"api", "devices"}
Functions ¶
This section is empty.
Types ¶
type FileUpload ¶
type ServerClient ¶
type ServerClient struct {
// contains filtered or unexported fields
}
func (ServerClient) AddPlayCount ¶
func (ServerClient) AddPlaylist ¶
func (ServerClient) AddPlaylistTrack ¶
func (ServerClient) AddSmartPlaylist ¶
func (s ServerClient) AddSmartPlaylist(ctx context.Context, playlist types.PlaylistBase, filter types.TrackFilter) error
func (*ServerClient) AuthToken ¶
func (s *ServerClient) AuthToken() string
func (ServerClient) CheckStatus ¶
func (s ServerClient) CheckStatus(ctx context.Context) (h types.ServerApiInfo, err error)
func (ServerClient) CountAlbums ¶
func (s ServerClient) CountAlbums(ctx context.Context) (cnt int, err error)
func (ServerClient) CountArtists ¶
func (s ServerClient) CountArtists(ctx context.Context) (cnt int, err error)
func (ServerClient) CountLikedTracks ¶
func (s ServerClient) CountLikedTracks(ctx context.Context) (cnt int, err error)
func (ServerClient) CountPlaylistTracks ¶
func (ServerClient) CountPlaylists ¶
func (s ServerClient) CountPlaylists(ctx context.Context) (int, error)
func (ServerClient) CountTracks ¶
func (s ServerClient) CountTracks(ctx context.Context) (cnt int, err error)
func (ServerClient) CreateAPIToken ¶
func (ServerClient) CreateArtist ¶
func (s ServerClient) CreateArtist(ctx context.Context, artistData types.ArtistBase) error
func (ServerClient) CreateUser ¶
func (ServerClient) DeletePlaylist ¶
func (ServerClient) DeletePlaylistTrack ¶
func (ServerClient) DeleteToken ¶
func (ServerClient) DeleteUser ¶
func (ServerClient) DeleteUserToken ¶
func (ServerClient) DeviceDelete ¶
func (ServerClient) DeviceDeleteToken ¶
func (ServerClient) DeviceNextTrack ¶
func (ServerClient) DevicePlayPause ¶
func (ServerClient) DevicePlayerAddToQueue ¶
func (s ServerClient) DevicePlayerAddToQueue(ctx context.Context, deviceID uuid.UUID, track types.TrackDetailed) (err error)
func (ServerClient) DevicePlayerSetRepeat ¶
func (s ServerClient) DevicePlayerSetRepeat(ctx context.Context, deviceID uuid.UUID, repeatType types.RepeatType) (err error)
func (ServerClient) DevicePlayerSetShuffle ¶
func (ServerClient) DevicePlayerStop ¶
func (ServerClient) DevicePreviousTrack ¶
func (ServerClient) DeviceSetPlayerState ¶
func (s ServerClient) DeviceSetPlayerState(ctx context.Context, deviceID uuid.UUID, pc types.PlayerState) (err error)
func (ServerClient) DownloadAlbumCover ¶
func (s ServerClient) DownloadAlbumCover(ctx context.Context, albumID uuid.UUID, size imagemagick.ImageSize, w io.Writer) error
func (ServerClient) DownloadArtistImage ¶
func (s ServerClient) DownloadArtistImage(ctx context.Context, artistID string, size imagemagick.ImageSize, w io.Writer) error
func (ServerClient) DownloadMediaFile ¶
func (ServerClient) DownloadMediaFilePart ¶
func (ServerClient) DownloadPlaylistImage ¶
func (s ServerClient) DownloadPlaylistImage(ctx context.Context, id uuid.UUID, size imagemagick.ImageSize, w io.Writer) error
func (ServerClient) FilterTracks ¶
func (s ServerClient) FilterTracks(ctx context.Context, filter types.TrackFilter, page, limit int) (types.ListPaginationPayload[types.TrackDetailed], error)
func (ServerClient) GetAlbumArtist ¶
func (s ServerClient) GetAlbumArtist(ctx context.Context, albumID, artistID uuid.UUID, role types.ArtistRole) (albumArtist types.AlbumArtist, err error)
func (ServerClient) GetAlbumArtistByID ¶
func (s ServerClient) GetAlbumArtistByID(ctx context.Context, id uuid.UUID) (albumArtist types.AlbumArtist, err error)
func (ServerClient) GetAlbumDetailed ¶
func (s ServerClient) GetAlbumDetailed(ctx context.Context, albumID uuid.UUID) (album types.AlbumDetailed, err error)
func (ServerClient) GetAlbumTrack ¶
func (s ServerClient) GetAlbumTrack(ctx context.Context, albumID uuid.UUID, discNumber, trackNumber int) (albumTrack types.AlbumTrack, err error)
func (ServerClient) GetAlbumTrackByID ¶
func (s ServerClient) GetAlbumTrackByID(ctx context.Context, id uuid.UUID) (albumTrack types.AlbumTrack, err error)
func (ServerClient) GetArtistTopTracks ¶
func (s ServerClient) GetArtistTopTracks(ctx context.Context, artistID uuid.UUID) ([]types.TrackDetailed, error)
func (ServerClient) GetMediaFile ¶
func (ServerClient) GetPlaylist ¶
func (ServerClient) GetPlaylistTrack ¶
func (s ServerClient) GetPlaylistTrack(ctx context.Context, id uuid.UUID) (playlistTrack types.PlaylistTrack, err error)
func (ServerClient) GetSmartPlaylistArtist ¶
func (s ServerClient) GetSmartPlaylistArtist(ctx context.Context, id uuid.UUID) (artist types.SmartPlaylistArtist, err error)
func (ServerClient) GetSmartPlaylistContent ¶
func (s ServerClient) GetSmartPlaylistContent(ctx context.Context, id uuid.UUID) (content types.SmartPlaylistContent, err error)
func (ServerClient) GetSyncState ¶
func (ServerClient) GetTrackAnalysisByID ¶
func (s ServerClient) GetTrackAnalysisByID(ctx context.Context, id uuid.UUID) (trackAnalysis types.TrackAnalysis, err error)
func (ServerClient) GetTrackArtistByID ¶
func (s ServerClient) GetTrackArtistByID(ctx context.Context, id uuid.UUID) (trackArtist types.TrackArtist, err error)
func (ServerClient) GetTrackDetailed ¶
func (s ServerClient) GetTrackDetailed(ctx context.Context, trackID, albumID uuid.UUID) (track types.TrackDetailed, err error)
func (ServerClient) GetTrackRatings ¶
func (ServerClient) GetUser ¶
func (s ServerClient) GetUser(ctx context.Context) (user types.UserDetails, err error)
func (ServerClient) ImportAlbum ¶
func (ServerClient) ListAlbums ¶
func (s ServerClient) ListAlbums(ctx context.Context, sortBy database.SortBy, sortOrder database.SortOrder) (albums []types.AlbumDetailed, err error)
func (ServerClient) ListAlbumsByArtist ¶
func (ServerClient) ListArtists ¶
func (s ServerClient) ListArtists(ctx context.Context, sortBy database.SortBy, sortOrder database.SortOrder) (artists []types.ArtistDetailed, err error)
func (ServerClient) ListDevices ¶
func (s ServerClient) ListDevices(ctx context.Context) (devices []types.DeviceDetailed, err error)
func (ServerClient) ListEntityEvents ¶
func (s ServerClient) ListEntityEvents(ctx context.Context) (events []types.EntityEvent, err error)
func (ServerClient) ListFeaturedAlbumsByArtist ¶
func (ServerClient) ListImportItems ¶
func (s ServerClient) ListImportItems(ctx context.Context, page, limit int) (types.ListPaginationPayload[types.Import], error)
func (ServerClient) ListLikedTracks ¶
func (s ServerClient) ListLikedTracks(ctx context.Context) ([]types.TrackDetailed, error)
func (ServerClient) ListPlaylistTracks ¶
func (ServerClient) ListPlaylists ¶
func (ServerClient) ListTracksByAlbum ¶
func (ServerClient) ListTracksDetailedByAlbum ¶
func (s ServerClient) ListTracksDetailedByAlbum(ctx context.Context, albumID uuid.UUID) (tracks []types.TrackDetailed, err error)
func (ServerClient) ListUserRoles ¶
func (ServerClient) ListUserTokens ¶
func (s ServerClient) ListUserTokens(ctx context.Context) (tokens []types.TokenLimited, err error)
func (ServerClient) ListUsers ¶
func (s ServerClient) ListUsers(ctx context.Context, includeMachineUsers bool) (users []types.UserDetails, err error)
func (*ServerClient) RegisterDevice ¶
func (s *ServerClient) RegisterDevice(ctx context.Context, deviceID *uuid.UUID, deviceDetails types.DeviceBase) (newDeviceID uuid.UUID, err error)
func (ServerClient) SearchFull ¶
func (s ServerClient) SearchFull(ctx context.Context, searchTerm string) (si []types.SearchItem, err error)
func (ServerClient) SearchMusicBrainz ¶
func (s ServerClient) SearchMusicBrainz(ctx context.Context, artist, album string) (types.ListPayload[musicbrainz.SearchResults], error)
func (*ServerClient) SetAuthToken ¶
func (s *ServerClient) SetAuthToken(token string)
func (ServerClient) SubscribeDeviceEvents ¶
func (s ServerClient) SubscribeDeviceEvents(ctx context.Context, deviceID uuid.UUID, handler sse.EventHandler) error
func (ServerClient) SyncPlayHistory ¶
func (s ServerClient) SyncPlayHistory(ctx context.Context, changesSince time.Time, newItems []types.PlayHistory) (syncState types.PlayHistorySyncState, err error)
func (ServerClient) UnlikeTrack ¶
func (ServerClient) UpdateAlbum ¶
func (s ServerClient) UpdateAlbum(ctx context.Context, albumID uuid.UUID, albumData types.AlbumUpdate) error
func (ServerClient) UpdateArtist ¶
func (ServerClient) UpdatePlayContext ¶
func (s ServerClient) UpdatePlayContext(ctx context.Context, pc types.PlayContext) error
func (ServerClient) UpdatePlaybackState ¶
func (s ServerClient) UpdatePlaybackState(ctx context.Context, ps types.PlaybackState) error
func (ServerClient) UpdatePlaylist ¶
func (ServerClient) UpdateProfile ¶
func (s ServerClient) UpdateProfile(ctx context.Context, data types.UpdateProfileReq) error
func (ServerClient) UpdateTrack ¶
func (s ServerClient) UpdateTrack(ctx context.Context, id uuid.UUID, data types.TrackUpdate) error
func (ServerClient) UpdateUser ¶
func (ServerClient) UploadAlbumImage ¶
func (s ServerClient) UploadAlbumImage(ctx context.Context, id uuid.UUID, img FileUpload) error
func (ServerClient) UploadArtistImage ¶
func (s ServerClient) UploadArtistImage(ctx context.Context, artistID uuid.UUID, img FileUpload) error
func (ServerClient) UploadPlaylistImage ¶
func (s ServerClient) UploadPlaylistImage(ctx context.Context, id uuid.UUID, img FileUpload) error
func (ServerClient) UploadUserImage ¶
Click to show internal directories.
Click to hide internal directories.