Making sure the repositories implement their full interfaces

This commit is contained in:
Deluan 2016-03-03 01:24:28 -05:00
parent f01a5f143d
commit ad0a91fba5
6 changed files with 12 additions and 0 deletions

View file

@ -32,3 +32,5 @@ func (r *albumRepository) FindByArtist(artistId string) ([]domain.Album, error)
err := r.loadChildren("artist", artistId, &as, "Year", false)
return as, err
}
var _ domain.AlbumRepository = (*albumRepository)(nil)

View file

@ -31,3 +31,5 @@ func (r *artistRepository) GetByName(name string) (*domain.Artist, error) {
id := r.NewId(name)
return r.Get(id)
}
var _ domain.ArtistRepository = (*artistRepository)(nil)

View file

@ -48,3 +48,5 @@ func (a byArtistName) Swap(i, j int) {
func (a byArtistName) Less(i, j int) bool {
return utils.NoArticle(a[i].Artist) < utils.NoArticle(a[j].Artist)
}
var _ domain.ArtistIndexRepository = (*artistIndexRepository)(nil)

View file

@ -37,3 +37,5 @@ func (a byTrackNumber) Swap(i, j int) {
func (a byTrackNumber) Less(i, j int) bool {
return (a[i].DiscNumber*1000 + a[i].TrackNumber) < (a[j].DiscNumber*1000 + a[j].TrackNumber)
}
var _ domain.MediaFileRepository = (*mediaFileRepository)(nil)

View file

@ -19,3 +19,5 @@ func (*mediaFolderRepository) GetAll() ([]domain.MediaFolder, error) {
result[0] = mediaFolder
return result, nil
}
var _ domain.MediaFolderRepository = (*mediaFolderRepository)(nil)

View file

@ -38,3 +38,5 @@ func (r *propertyRepository) DefaultGet(id string, defaultValue string) (string,
return v, err
}
var _ domain.PropertyRepository = (*propertyRepository)(nil)