mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
41 lines
1.4 KiB
Go
41 lines
1.4 KiB
Go
// Code generated by Wire. DO NOT EDIT.
|
|
|
|
//go:generate wire
|
|
//+build !wireinject
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/cloudsonic/sonic-server/engine"
|
|
"github.com/cloudsonic/sonic-server/itunesbridge"
|
|
"github.com/cloudsonic/sonic-server/persistence"
|
|
"github.com/cloudsonic/sonic-server/scanner"
|
|
"github.com/deluan/gomate"
|
|
"github.com/deluan/gomate/ledis"
|
|
"github.com/google/wire"
|
|
)
|
|
|
|
// Injectors from wire_injectors.go:
|
|
|
|
func initImporter(musicFolder string) *scanner.Importer {
|
|
checkSumRepository := persistence.NewCheckSumRepository()
|
|
itunesScanner := scanner.NewItunesScanner(checkSumRepository)
|
|
mediaFileRepository := persistence.NewMediaFileRepository()
|
|
albumRepository := persistence.NewAlbumRepository()
|
|
artistRepository := persistence.NewArtistRepository()
|
|
artistIndexRepository := persistence.NewArtistIndexRepository()
|
|
playlistRepository := persistence.NewPlaylistRepository()
|
|
propertyRepository := persistence.NewPropertyRepository()
|
|
db := newDB()
|
|
search := engine.NewSearch(artistRepository, albumRepository, mediaFileRepository, db)
|
|
importer := scanner.NewImporter(musicFolder, itunesScanner, mediaFileRepository, albumRepository, artistRepository, artistIndexRepository, playlistRepository, propertyRepository, search)
|
|
return importer
|
|
}
|
|
|
|
// wire_injectors.go:
|
|
|
|
var allProviders = wire.NewSet(itunesbridge.NewItunesControl, persistence.Set, engine.Set, scanner.Set, newDB)
|
|
|
|
func newDB() gomate.DB {
|
|
return ledis.NewEmbeddedDB(persistence.Db())
|
|
}
|