Big Refactor:
- Create model.DataStore, with provision for transactions - Change all layers dependencies on repositories to use DataStore - Implemented persistence.SQLStore - Removed iTunes Bridge/Importer support
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package model
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrNotFound = errors.New("data not found")
|
||||
@@ -19,3 +21,15 @@ type QueryOptions struct {
|
||||
Size int
|
||||
Filters Filters
|
||||
}
|
||||
|
||||
type DataStore interface {
|
||||
Album() AlbumRepository
|
||||
Artist() ArtistRepository
|
||||
MediaFile() MediaFileRepository
|
||||
MediaFolder() MediaFolderRepository
|
||||
Genre() GenreRepository
|
||||
Playlist() PlaylistRepository
|
||||
Property() PropertyRepository
|
||||
|
||||
WithTx(func(tx DataStore) error) error
|
||||
}
|
||||
Reference in New Issue
Block a user