Documentation
¶
Index ¶
Constants ¶
View Source
const ( OrderByViewCount Order = "viewCount" OrderByDate = "date" OrderByDefault = "relevance" )
Variables ¶
View Source
var (
EmptyMusic = Music{}
)
Functions ¶
func GenerateCacheKey ¶
Types ¶
type MusicListDto ¶
type MusicRepository ¶
type MusicRepository interface { GetMusic(videoID string) (*Music, error) GetMusicsByIDs(videoIDs []string) (Musics, error) GetMusicList(key, pageToken string) (*MusicListDto, bool, error) SaveMusicList(key string, musicList []byte) error GetPlayListBy(order, pageToken string) (*MusicListDto, error) }
type NotFoundError ¶
type NotFoundError struct {
Msg string
}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type Service ¶
type Service interface { GetMusic(videoID string) (*Music, error) GetMusics(videoIDs []string) (Musics, error) GetMusicList(query string, pageToken string) (*MusicListDto, error) GetPlayListBy(order Order, pageToken string) (*MusicListDto, error) }
func NewMusicService ¶
func NewMusicService(l *zap.SugaredLogger, mr MusicRepository) Service
Click to show internal directories.
Click to hide internal directories.