// Code generated by Wire. DO NOT EDIT.

//go:generate go run -mod=mod github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject

package wire

import (
	"github.com/go-nunu/nunu-layout-advanced/internal/job"
	"github.com/go-nunu/nunu-layout-advanced/internal/repository"
	"github.com/go-nunu/nunu-layout-advanced/internal/server"
	"github.com/go-nunu/nunu-layout-advanced/internal/service"
	"github.com/go-nunu/nunu-layout-advanced/internal/task"
	"github.com/go-nunu/nunu-layout-advanced/pkg/app"
	"github.com/go-nunu/nunu-layout-advanced/pkg/jwt"
	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
	"github.com/go-nunu/nunu-layout-advanced/pkg/sid"
	"github.com/google/wire"
	"github.com/spf13/viper"
)

// Injectors from wire.go:

func NewWire(viperViper *viper.Viper, logger *log.Logger) (*app.App, func(), error) {
	db := repository.NewDB(viperViper, logger)
	client := repository.NewRedis(viperViper)
	qmgoClient := repository.NewMongoClient(viperViper)
	database := repository.NewMongoDB(qmgoClient, viperViper)
	rabbitMQ, cleanup := repository.NewRabbitMQ(viperViper, logger)
	syncedEnforcer := repository.NewCasbinEnforcer(viperViper, logger, db)
	repositoryRepository := repository.NewRepository(logger, db, client, qmgoClient, database, rabbitMQ, syncedEnforcer)
	transaction := repository.NewTransaction(repositoryRepository)
	sidSid := sid.NewSid()
	taskTask := task.NewTask(transaction, logger, sidSid)
	userRepository := repository.NewUserRepository(repositoryRepository)
	userTask := task.NewUserTask(taskTask, userRepository)
	gameShieldRepository := repository.NewGameShieldRepository(repositoryRepository)
	jwtJWT := jwt.NewJwt(viperViper)
	serviceService := service.NewService(transaction, logger, sidSid, jwtJWT)
	gameShieldBackendRepository := repository.NewGameShieldBackendRepository(repositoryRepository)
	parserService := service.NewParserService(serviceService)
	crawlerService := service.NewCrawlerService(serviceService, parserService, viperViper)
	gameShieldPublicIpRepository := repository.NewGameShieldPublicIpRepository(repositoryRepository)
	gameShieldUserIpRepository := repository.NewGameShieldUserIpRepository(repositoryRepository)
	gameShieldPublicIpService := service.NewGameShieldPublicIpService(serviceService, gameShieldPublicIpRepository, gameShieldUserIpRepository)
	duedateService := service.NewDuedateService(serviceService, gameShieldRepository)
	hostRepository := repository.NewHostRepository(repositoryRepository)
	hostService := service.NewHostService(serviceService, hostRepository)
	formatterService := service.NewFormatterService(serviceService, gameShieldPublicIpService, gameShieldBackendRepository, hostService)
	requiredService := service.NewRequiredService(serviceService, crawlerService, viperViper)
	gameShieldSdkIpRepository := repository.NewGameShieldSdkIpRepository(repositoryRepository)
	gameShieldSdkIpService := service.NewGameShieldSdkIpService(serviceService, gameShieldSdkIpRepository)
	gameShieldService := service.NewGameShieldService(serviceService, gameShieldRepository, crawlerService, gameShieldPublicIpService, duedateService, formatterService, parserService, requiredService, viperViper, gameShieldSdkIpService)
	gameShieldBackendService := service.NewGameShieldBackendService(serviceService, gameShieldBackendRepository, gameShieldRepository, crawlerService, gameShieldPublicIpService, duedateService, formatterService, parserService, requiredService, viperViper, gameShieldService, hostService)
	gameShieldTask := task.NewGameShieldTask(taskTask, gameShieldRepository, gameShieldBackendService)
	taskServer := server.NewTaskServer(logger, userTask, gameShieldTask)
	jobJob := job.NewJob(transaction, logger, sidSid, rabbitMQ)
	userJob := job.NewUserJob(jobJob, userRepository)
	aoDunService := service.NewAoDunService(serviceService, viperViper)
	globalLimitRepository := repository.NewGlobalLimitRepository(repositoryRepository)
	tcpforwardingRepository := repository.NewTcpforwardingRepository(repositoryRepository)
	udpForWardingRepository := repository.NewUdpForWardingRepository(repositoryRepository)
	webForwardingRepository := repository.NewWebForwardingRepository(repositoryRepository)
	gatewayGroupRepository := repository.NewGatewayGroupRepository(repositoryRepository)
	gateWayGroupIpRepository := repository.NewGateWayGroupIpRepository(repositoryRepository)
	wafFormatterService := service.NewWafFormatterService(serviceService, globalLimitRepository, hostRepository, requiredService, parserService, tcpforwardingRepository, udpForWardingRepository, webForwardingRepository, rabbitMQ, hostService, gatewayGroupRepository, gateWayGroupIpRepository)
	whitelistJob := job.NewWhitelistJob(jobJob, aoDunService, wafFormatterService)
	jobServer := server.NewJobServer(logger, userJob, whitelistJob)
	appApp := newApp(taskServer, jobServer)
	return appApp, func() {
		cleanup()
	}, nil
}

// wire.go:

var repositorySet = wire.NewSet(repository.NewDB, repository.NewRedis, repository.NewMongoClient, repository.NewCasbinEnforcer, repository.NewMongoDB, repository.NewRabbitMQ, repository.NewRepository, repository.NewTransaction, repository.NewUserRepository, repository.NewGameShieldRepository, repository.NewGameShieldBackendRepository, repository.NewGameShieldPublicIpRepository, repository.NewHostRepository, repository.NewGameShieldUserIpRepository, repository.NewGameShieldSdkIpRepository, repository.NewWebForwardingRepository, repository.NewTcpforwardingRepository, repository.NewUdpForWardingRepository, repository.NewWebLimitRepository, repository.NewTcpLimitRepository, repository.NewUdpLimitRepository, repository.NewGlobalLimitRepository, repository.NewGatewayGroupRepository, repository.NewGateWayGroupIpRepository)

var taskSet = wire.NewSet(task.NewTask, task.NewUserTask, task.NewGameShieldTask)

var jobSet = wire.NewSet(job.NewJob, job.NewUserJob, job.NewWhitelistJob)

var serverSet = wire.NewSet(server.NewTaskServer, server.NewJobServer)

var serviceSet = wire.NewSet(service.NewService, service.NewAoDunService, service.NewGameShieldService, service.NewCrawlerService, service.NewGameShieldPublicIpService, service.NewDuedateService, service.NewFormatterService, service.NewParserService, service.NewRequiredService, service.NewHostService, service.NewGameShieldBackendService, service.NewGameShieldSdkIpService, service.NewGameShieldUserIpService, service.NewWafFormatterService)

// build App
func newApp(task2 *server.TaskServer,
	jobServer *server.JobServer,
) *app.App {
	return app.NewApp(app.WithServer(task2, jobServer), app.WithName("demo-task"))
}
