Documentation
¶
Index ¶
- Variables
- type Album
- type AlbumFull
- type AlbumWithArtists
- type Albums
- type Artist
- type ArtistFull
- type Artists
- type ID
- type Library
- type ListOpt
- type PlayedAlbum
- type Playlist
- type PlaylistFull
- type SearchRes
- type Service
- func (s *Service) AddPlaylist(ctx context.Context, title, description string) error
- func (s *Service) AddStreamingAlbum(ctx context.Context, id string) error
- func (s *Service) AddStreamingArtist(ctx context.Context, id string) error
- func (s *Service) AddTrackToPlaylist(ctx context.Context, playlistID uuid.UUID, trackID unification.ID) error
- func (s *Service) ImportStreamingPlaylist(ctx context.Context, id, title string) error
- func (s *Service) Search(ctx context.Context, query string) (SearchRes, error)
- type SortOrder
- type Track
- type TrackFull
- type Tracks
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("entry not found in library")
Functions ¶
This section is empty.
Types ¶
type AlbumFull ¶
type AlbumFull struct { Album AlbumWithArtists Tracks []TrackFull }
func (AlbumFull) Unify ¶
func (a AlbumFull) Unify() unification.AlbumFull
type AlbumWithArtists ¶
func (AlbumWithArtists) Unify ¶
func (a AlbumWithArtists) Unify() unification.Album
type Albums ¶
type Albums []AlbumWithArtists
func (Albums) Unify ¶
func (a Albums) Unify() (res []unification.Album)
type ArtistFull ¶
type ArtistFull struct { Artist Artist Albums []AlbumWithArtists }
type Artists ¶
type Artists []Artist
func (Artists) Unify ¶
func (a Artists) Unify() (res []unification.Artist)
type Library ¶
type Library interface { AddStreamingAlbum(ctx context.Context, album *streaming.AlbumFull) error AddStreamingArtist(ctx context.Context, artist *streaming.Artist) error AddPlaylist(ctx context.Context, title, description string) error AddStreamingTrackToPlaylist(ctx context.Context, playlistID uuid.UUID, track *streaming.Track) error AddTrackToPlaylist(ctx context.Context, playlistID, trackID uuid.UUID) error ImportStreamingPlaylist(ctx context.Context, playlist *streaming.PlaylistFull, title string) error Search(ctx context.Context, query string, limit int) (SearchRes, error) }
type PlayedAlbum ¶
type PlayedAlbum struct { ID uuid.UUID AlbumID ID Title string Played time.Time Release *time.Time Artists []string ImageAvailable bool }
func (PlayedAlbum) Unify ¶
func (a PlayedAlbum) Unify() unification.Album
type Playlist ¶
type Playlist struct { ID uuid.UUID Title string Added time.Time Description *string ImageAvailable bool }
func (Playlist) Unify ¶
func (p Playlist) Unify() unification.Playlist
type PlaylistFull ¶
func (PlaylistFull) Unify ¶
func (p PlaylistFull) Unify() unification.PlaylistFull
type SearchRes ¶
type SearchRes struct { Artists []Artist Albums []AlbumWithArtists Tracks []TrackFull }
func (SearchRes) Unify ¶
func (r SearchRes) Unify() (res unification.SourceRes)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func InitService ¶
func (*Service) AddPlaylist ¶
func (*Service) AddStreamingAlbum ¶
func (*Service) AddStreamingArtist ¶
func (*Service) AddTrackToPlaylist ¶
func (*Service) ImportStreamingPlaylist ¶ added in v0.4.1
type TrackFull ¶
type TrackFull struct { Track Artists []Artist Album AlbumWithArtists }
func (TrackFull) Unify ¶
func (t TrackFull) Unify() unification.Track
Source Files
¶
Click to show internal directories.
Click to hide internal directories.