Created
March 25, 2021 08:49
-
-
Save pot-code/017ba8fe3778a10668a2256a050fc647 to your computer and use it in GitHub Desktop.
[go-wire]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+build wireinject | |
package api | |
import ( | |
"github.com/google/wire" | |
"github.com/pot-code/go-producer/api/notification" | |
ut "github.com/pot-code/go-producer/api/notification/transport" | |
"github.com/pot-code/go-producer/pkg/db" | |
"github.com/pot-code/go-producer/pkg/uuid" | |
"github.com/pot-code/go-producer/pkg/validate" | |
) | |
func InitializeNotificationHandler(conn db.ITransactionalDB, uid uuid.UUIDer) *ut.NotificationHandler { | |
wire.Build(validate.NewValidator, | |
wire.Bind(new(notification.NotificationUseCase), new(*notification.NotificationService)), | |
wire.Bind(new(notification.NotificationRepository), new(*notification.NotificationStore)), | |
notification.NewNotificationService, | |
notification.NewNotificationRepository, | |
ut.NewNotificationHandler, | |
) | |
return &ut.NotificationHandler{} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment