Refactored NowPlaying

Also added a test case for skipping range
This commit is contained in:
Deluan
2016-03-24 17:14:13 -04:00
parent 3c8f6e9a65
commit 1cf8a0db44
5 changed files with 51 additions and 20 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ type NowPlayingInfo struct {
// This repo must have the semantics of a FIFO queue, for each playerId
type NowPlayingRepository interface {
// Insert at the head of the queue
Enqueue(playerId int, playerName string, trackId, username string) error
Enqueue(*NowPlayingInfo) error
// Removes and returns the element at the end of the queue
Dequeue(playerId int) (*NowPlayingInfo, error)