mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 04:57:37 +03:00
Making sure the repositories implement their full interfaces
This commit is contained in:
parent
f01a5f143d
commit
ad0a91fba5
6 changed files with 12 additions and 0 deletions
|
@ -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)
|
|
@ -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)
|
|
@ -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)
|
|
@ -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)
|
|
@ -19,3 +19,5 @@ func (*mediaFolderRepository) GetAll() ([]domain.MediaFolder, error) {
|
|||
result[0] = mediaFolder
|
||||
return result, nil
|
||||
}
|
||||
|
||||
var _ domain.MediaFolderRepository = (*mediaFolderRepository)(nil)
|
|
@ -38,3 +38,5 @@ func (r *propertyRepository) DefaultGet(id string, defaultValue string) (string,
|
|||
|
||||
return v, err
|
||||
}
|
||||
|
||||
var _ domain.PropertyRepository = (*propertyRepository)(nil)
|
Loading…
Add table
Add a link
Reference in a new issue