Documentation ¶
Index ¶
- Constants
- Variables
- func GetEntityByID(ctx context.Context, ds model.DataStore, id string) (interface{}, error)
- func LastFMNewClient() *lastfm.Client
- func SpotifyNewClient() *spotify.Client
- type Archiver
- type Artwork
- type ArtworkCache
- type CacheWarmer
- type ExternalInfo
- type MediaStreamer
- type NowPlaying
- type NowPlayingInfo
- type Players
- type Stream
- type TranscodingCache
Constants ¶
View Source
const NowPlayingExpire = 60 * time.Minute
Variables ¶
Functions ¶
func GetEntityByID ¶ added in v0.36.0
TODO: Should the type be encoded in the ID?
func LastFMNewClient ¶ added in v0.36.0
func SpotifyNewClient ¶ added in v0.36.0
Types ¶
type Archiver ¶ added in v0.29.0
type Archiver interface { ZipAlbum(ctx context.Context, id string, w io.Writer) error ZipArtist(ctx context.Context, id string, w io.Writer) error ZipPlaylist(ctx context.Context, id string, w io.Writer) error }
func NewArchiver ¶ added in v0.29.0
type Artwork ¶ added in v0.28.0
func NewArtwork ¶ added in v0.28.0
func NewArtwork(ds model.DataStore, cache ArtworkCache) Artwork
type ArtworkCache ¶ added in v0.28.0
func GetImageCache ¶ added in v0.37.0
func GetImageCache() ArtworkCache
type CacheWarmer ¶ added in v0.37.0
type CacheWarmer interface { AddAlbum(ctx context.Context, albumID string) Flush(ctx context.Context) }
func NewCacheWarmer ¶ added in v0.37.0
func NewCacheWarmer(artwork Artwork, artworkCache ArtworkCache) CacheWarmer
type ExternalInfo ¶ added in v0.36.0
type ExternalInfo interface { UpdateArtistInfo(ctx context.Context, id string, count int, includeNotPresent bool) (*model.Artist, error) SimilarSongs(ctx context.Context, id string, count int) (model.MediaFiles, error) TopSongs(ctx context.Context, artist string, count int) (model.MediaFiles, error) }
func NewExternalInfo ¶ added in v0.36.0
type MediaStreamer ¶
type MediaStreamer interface {
NewStream(ctx context.Context, id string, reqFormat string, reqBitRate int) (*Stream, error)
}
func NewMediaStreamer ¶
func NewMediaStreamer(ds model.DataStore, ffm transcoder.Transcoder, cache TranscodingCache) MediaStreamer
type NowPlaying ¶ added in v0.37.0
type NowPlaying interface { // Insert at the head of the queue Enqueue(*NowPlayingInfo) error // Returns all heads from all playerIds GetAll() ([]*NowPlayingInfo, error) }
This repo must have the semantics of a FIFO queue, for each playerId
func NewNowPlayingRepository ¶ added in v0.37.0
func NewNowPlayingRepository() NowPlaying
type NowPlayingInfo ¶ added in v0.37.0
type Players ¶ added in v0.37.0
type Players interface { Get(ctx context.Context, playerId string) (*model.Player, error) Register(ctx context.Context, id, client, typ, ip string) (*model.Player, *model.Transcoding, error) }
func NewPlayers ¶ added in v0.37.0
type Stream ¶
type Stream struct { io.ReadCloser io.Seeker // contains filtered or unexported fields }
func (*Stream) ContentType ¶
func (*Stream) EstimatedContentLength ¶
type TranscodingCache ¶
func GetTranscodingCache ¶ added in v0.37.0
func GetTranscodingCache() TranscodingCache
Source Files ¶
Click to show internal directories.
Click to hide internal directories.