forked from navidrome/navidrome
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwire_injectors.go
More file actions
36 lines (30 loc) · 703 Bytes
/
wire_injectors.go
File metadata and controls
36 lines (30 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//+build wireinject
package main
import (
"github.com/deluan/navidrome/engine"
"github.com/deluan/navidrome/persistence"
"github.com/deluan/navidrome/scanner"
"github.com/deluan/navidrome/server"
"github.com/deluan/navidrome/server/app"
"github.com/deluan/navidrome/server/subsonic"
"github.com/google/wire"
)
var allProviders = wire.NewSet(
engine.Set,
scanner.New,
subsonic.New,
app.New,
persistence.New,
)
func CreateServer(musicFolder string) *server.Server {
panic(wire.Build(
server.New,
allProviders,
))
}
func CreateAppRouter() *app.Router {
panic(wire.Build(allProviders))
}
func CreateSubsonicAPIRouter() (*subsonic.Router, error) {
panic(wire.Build(allProviders))
}