Converted all collections from repositories to *collections

This commit is contained in:
Deluan
2016-03-08 20:33:09 -05:00
parent e9ab07e4d3
commit 60d4cb5d9f
16 changed files with 53 additions and 49 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ type AlbumRepository interface {
BaseRepository
Put(m *Album) error
Get(id string) (*Album, error)
FindByArtist(artistId string) (Albums, error)
GetAll(QueryOptions) (Albums, error)
FindByArtist(artistId string) (*Albums, error)
GetAll(QueryOptions) (*Albums, error)
PurgeInactive(active *Albums) error
}
+3 -2
View File
@@ -13,7 +13,8 @@ type ArtistIndex struct {
}
type ArtistInfos []ArtistInfo
func (a ArtistInfos) Len() int { return len(a) }
func (a ArtistInfos) Len() int { return len(a) }
func (a ArtistInfos) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a ArtistInfos) Less(i, j int) bool {
return utils.NoArticle(a[i].Artist) < utils.NoArticle(a[j].Artist)
@@ -25,5 +26,5 @@ type ArtistIndexRepository interface {
BaseRepository
Put(m *ArtistIndex) error
Get(id string) (*ArtistIndex, error)
GetAll() (ArtistIndexes, error)
GetAll() (*ArtistIndexes, error)
}
+1 -1
View File
@@ -47,6 +47,6 @@ type MediaFileRepository interface {
BaseRepository
Put(m *MediaFile) error
Get(id string) (*MediaFile, error)
FindByAlbum(albumId string) (MediaFiles, error)
FindByAlbum(albumId string) (*MediaFiles, error)
PurgeInactive(active *MediaFiles) error
}
+1 -1
View File
@@ -9,5 +9,5 @@ type MediaFolder struct {
type MediaFolders []MediaFolder
type MediaFolderRepository interface {
GetAll() (MediaFolders, error)
GetAll() (*MediaFolders, error)
}