Initial wiring for getPlaylists endpoint

This commit is contained in:
Deluan
2016-03-09 10:09:15 -05:00
parent 4d1a4613d9
commit 7161325716
8 changed files with 185 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
package engine
import (
"github.com/deluan/gosonic/domain"
)
type Playlists interface {
GetAll() (*domain.Playlists, error)
}
type playlists struct {
plsRepo domain.PlaylistRepository
}
func NewPlaylists(pr domain.PlaylistRepository) Playlists {
return playlists{pr}
}
func (p playlists) GetAll() (*domain.Playlists, error) {
return p.plsRepo.GetAll(domain.QueryOptions{})
}