-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwire_gen.go
35 lines (29 loc) · 903 Bytes
/
wire_gen.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
35
// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package main
import (
"github.com/go-playground/validator"
"golang_restfulapi/app"
"golang_restfulapi/controller"
"golang_restfulapi/middleware"
"golang_restfulapi/repository"
"golang_restfulapi/services"
"net/http"
)
import (
_ "github.com/go-sql-driver/mysql"
)
// Injectors from injector.go:
func InitializedServer() *http.Server {
categoryRepository := repository.NewCategoryRepository()
db := app.NewDB()
validate := validator.New()
categoryService := services.NewCategoryService(categoryRepository, db, validate)
categoryController := controller.NewCategoryController(categoryService)
router := app.NewRouter(categoryController)
authMiddleware := middleware.NewAuthMiddleware(router)
server := NewServer(authMiddleware)
return server
}