// 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 (
	"galileo/app/management/internal/biz"
	"galileo/app/management/internal/conf"
	"galileo/app/management/internal/data"
	"galileo/app/management/internal/server"
	"galileo/app/management/internal/service"
	"github.com/go-kratos/kratos/v2"
	"github.com/go-kratos/kratos/v2/log"
)

import (
	_ "go.uber.org/automaxprocs"
)

// Injectors from wire.go:

// wireApp init kratos application.
func wireApp(confServer *conf.Server, confData *conf.Data, auth *conf.Auth, confService *conf.Service, registry *conf.Registry, logger log.Logger, trace *conf.Trace) (*kratos.App, func(), error) {
	client, err := data.NewEntDB(confData)
	if err != nil {
		return nil, nil, err
	}
	redisClient := data.NewRedis(confData, logger)
	discovery := data.NewDiscovery(registry)
	fileClient := data.NewFileServiceClient(confService, discovery)
	engineClient := data.NewEngineServiceClient(confService, discovery)
	dataData, cleanup, err := data.NewData(confData, client, logger, redisClient, fileClient, engineClient)
	if err != nil {
		return nil, nil, err
	}
	apiRepo := data.NewApiRepo(dataData, logger)
	apiUseCase := biz.NewApiUseCase(apiRepo, logger)
	projectRepo := data.NewProjectRepo(dataData, logger)
	projectUseCase := biz.NewProjectUseCase(projectRepo, logger)
	testcaseRepo := data.NewTestCaseRepo(dataData, logger)
	testcaseUseCase := biz.NewTestcaseUseCase(testcaseRepo, logger)
	managementRepo := data.NewManagementRepo(dataData, logger)
	managementUseCase := biz.NewManagementUseCase(logger, managementRepo)
	taskRepo := data.NewTaskRepo(dataData, logger)
	taskUseCase := biz.NewTaskUseCase(taskRepo, engineClient, logger)
	managementService := service.NewManagementService(apiUseCase, projectUseCase, testcaseUseCase, managementUseCase, taskUseCase, logger)
	grpcServer := server.NewGRPCServer(trace, confServer, managementService, logger)
	httpServer := server.NewHTTPServer(trace, confServer, auth, managementService, logger)
	registrar := data.NewRegistrar(registry)
	app := newApp(logger, grpcServer, httpServer, registrar, trace)
	return app, func() {
		cleanup()
	}, nil
}
