musicservices

package
v0.0.0-...-fddd541 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IMasterDataRepository

type IMasterDataRepository interface {
	SearchAlbum(artist string, album string) ([]*core.Album, error) // search album by artist and album name (we get them from playlists)
	DownloadArtist(artistId string) (*core.Artist, error)           // get artist by music service artist ID
	DownloadAlbum(albumId string) (*core.Album, error)              // get album by music service album ID
}

master data repository - we need to have one source of truth

func NewMusicRepository

func NewMusicRepository() IMasterDataRepository

I have only one MasterData provider (may be in the future I'll add LastFM)

type IMusicService

type IMusicService interface {
	DownloadPlaylist(playlistId string) (*core.Playlist, []*core.Track, error)
}

any playlists provider

func NewMusicService

func NewMusicService(service uint) IMusicService

I have two playlists providers: Spotify and Yandex.Music I am planning to add Deezer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL