feat: migrate watchlist module to modular domain pattern
This commit is contained in:
23
internal/watchlist/module.go
Normal file
23
internal/watchlist/module.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package watchlist
|
||||
|
||||
import (
|
||||
"mal/internal/server"
|
||||
"mal/internal/watchlist/handler"
|
||||
"mal/internal/watchlist/repository"
|
||||
"mal/internal/watchlist/service"
|
||||
|
||||
"go.uber.org/fx"
|
||||
)
|
||||
|
||||
var Module = fx.Options(
|
||||
fx.Provide(
|
||||
repository.NewWatchlistRepository,
|
||||
service.NewWatchlistService,
|
||||
handler.NewWatchlistHandler,
|
||||
),
|
||||
fx.Provide(
|
||||
server.AsRouteRegister(func(h *handler.WatchlistHandler) server.RouteRegister {
|
||||
return h
|
||||
}),
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user