-
Notifications
You must be signed in to change notification settings - Fork 1
/
wire.go
34 lines (30 loc) · 1.02 KB
/
wire.go
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
// wire.go
//go:build wireinject
package main
import (
"fiap-tech-challenge-pagamentos/client"
"fiap-tech-challenge-pagamentos/internal/adapters/http"
"fiap-tech-challenge-pagamentos/internal/adapters/http/handlers"
"fiap-tech-challenge-pagamentos/internal/adapters/repository"
"fiap-tech-challenge-pagamentos/internal/core/usecase"
db "github.com/rhuandantas/fiap-tech-challenge-commons/pkg/db/mysql"
"github.com/rhuandantas/fiap-tech-challenge-commons/pkg/messaging"
"github.com/rhuandantas/fiap-tech-challenge-commons/pkg/middlewares/auth"
"github.com/rhuandantas/fiap-tech-challenge-commons/pkg/util"
"github.com/google/wire"
)
func InitializeWebServer() (*http.Server, error) {
wire.Build(db.NewMySQLConnector,
client.NewPedido,
client.NewProducao,
messaging.NewSqsClient,
util.NewCustomValidator,
auth.NewJwtToken,
repository.NewPagamentoRepo,
usecase.NewRealizaCheckout,
usecase.NewPesquisaPagamento,
handlers.NewHealthCheck,
handlers.NewPagamento,
http.NewAPIServer)
return &http.Server{}, nil
}