// 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/repository/admin"
	"github.com/go-nunu/nunu-layout-advanced/internal/repository/api/flexCdn"
	"github.com/go-nunu/nunu-layout-advanced/internal/repository/api/waf"
	"github.com/go-nunu/nunu-layout-advanced/internal/server"
	"github.com/go-nunu/nunu-layout-advanced/internal/service"
	admin2 "github.com/go-nunu/nunu-layout-advanced/internal/service/admin"
	flexCdn2 "github.com/go-nunu/nunu-layout-advanced/internal/service/api/flexCdn"
	"github.com/go-nunu/nunu-layout-advanced/internal/service/api/gameShield"
	waf2 "github.com/go-nunu/nunu-layout-advanced/internal/service/api/waf"
	"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 := admin.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 := gameShield.NewGameShieldService(serviceService, gameShieldRepository, crawlerService, gameShieldPublicIpService, duedateService, formatterService, parserService, requiredService, viperViper, gameShieldSdkIpService)
	gameShieldBackendService := gameShield.NewGameShieldBackendService(serviceService, gameShieldBackendRepository, gameShieldRepository, crawlerService, gameShieldPublicIpService, duedateService, formatterService, parserService, requiredService, viperViper, gameShieldService, hostService)
	gameShieldTask := task.NewGameShieldTask(taskTask, gameShieldRepository, gameShieldBackendService)
	webForwardingRepository := waf.NewWebForwardingRepository(repositoryRepository)
	tcpforwardingRepository := waf.NewTcpforwardingRepository(repositoryRepository)
	udpForWardingRepository := waf.NewUdpForWardingRepository(repositoryRepository)
	requestService := service.NewRequestService(serviceService)
	cdnRepository := flexCdn.NewCdnRepository(repositoryRepository)
	cdnService := flexCdn2.NewCdnService(serviceService, viperViper, requestService, cdnRepository)
	globalLimitRepository := waf.NewGlobalLimitRepository(repositoryRepository)
	expiredRepository := repository.NewExpiredRepository(repositoryRepository)
	gatewayipRepository := waf.NewGatewayipRepository(repositoryRepository)
	logRepository := repository.NewLogRepository(repositoryRepository)
	logService := service.NewLogService(serviceService, logRepository)
	wafLogRepository := admin.NewWafLogRepository(repositoryRepository)
	wafLogService := admin2.NewWafLogService(serviceService, wafLogRepository, globalLimitRepository, rabbitMQ)
	gatewayipService := waf2.NewGatewayipService(serviceService, gatewayipRepository, hostService, logService, wafLogService)
	wafFormatterService := waf2.NewWafFormatterService(serviceService, globalLimitRepository, hostRepository, requiredService, parserService, tcpforwardingRepository, udpForWardingRepository, webForwardingRepository, rabbitMQ, hostService, gatewayipRepository, gatewayipService, cdnService, cdnRepository)
	proxyRepository := flexCdn.NewProxyRepository(repositoryRepository)
	proxyService := flexCdn2.NewProxyService(serviceService, proxyRepository, cdnService)
	tcpforwardingService := waf2.NewTcpforwardingService(serviceService, tcpforwardingRepository, parserService, requiredService, crawlerService, globalLimitRepository, hostRepository, wafFormatterService, cdnService, proxyService)
	udpForWardingService := waf2.NewUdpForWardingService(serviceService, udpForWardingRepository, requiredService, parserService, crawlerService, globalLimitRepository, hostRepository, wafFormatterService, cdnService, proxyService)
	aoDunService := service.NewAoDunService(serviceService, viperViper, requestService)
	sslCertService := flexCdn2.NewSslCertService(serviceService, webForwardingRepository, cdnService)
	websocketService := flexCdn2.NewWebsocketService(serviceService, cdnService, webForwardingRepository)
	ccRepository := flexCdn.NewCcRepository(repositoryRepository)
	ccIpListRepository := flexCdn.NewCcIpListRepository(repositoryRepository)
	ccIpListService := waf2.NewCcIpListService(serviceService, ccIpListRepository, cdnService, webForwardingRepository)
	ccService := waf2.NewCcService(serviceService, ccRepository, webForwardingRepository, cdnService, ccIpListService)
	webForwardingService := waf2.NewWebForwardingService(serviceService, requiredService, webForwardingRepository, crawlerService, parserService, wafFormatterService, aoDunService, rabbitMQ, gatewayipService, globalLimitRepository, cdnService, proxyService, sslCertService, websocketService, ccService, ccIpListService)
	buildAudunService := waf2.NewBuildAudunService(serviceService, aoDunService, gatewayipRepository, hostService)
	zzybgpService := waf2.NewZzybgpService(serviceService, gatewayipRepository, hostService, aoDunService)
	wafTask := task.NewWafTask(webForwardingRepository, tcpforwardingRepository, udpForWardingRepository, cdnService, hostRepository, globalLimitRepository, expiredRepository, taskTask, gatewayipRepository, tcpforwardingService, udpForWardingService, webForwardingService, buildAudunService, zzybgpService)
	taskServer := server.NewTaskServer(logger, userTask, gameShieldTask, wafTask)
	jobJob := job.NewJob(transaction, logger, sidSid, rabbitMQ)
	userJob := job.NewUserJob(jobJob, userRepository)
	whitelistJob := job.NewWhitelistJob(jobJob, aoDunService, wafFormatterService)
	wafLogJob := job.NewWafLogJob(jobJob, wafLogService)
	jobServer := server.NewJobServer(logger, userJob, whitelistJob, wafLogJob)
	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, admin.NewUserRepository, repository.NewGameShieldRepository, repository.NewGameShieldBackendRepository, repository.NewGameShieldPublicIpRepository, repository.NewHostRepository, repository.NewGameShieldUserIpRepository, repository.NewGameShieldSdkIpRepository, waf.NewWebForwardingRepository, waf.NewTcpforwardingRepository, waf.NewUdpForWardingRepository, waf.NewGlobalLimitRepository, repository.NewGatewayGroupRepository, repository.NewGateWayGroupIpRepository, flexCdn.NewCdnRepository, repository.NewExpiredRepository, flexCdn.NewProxyRepository, waf.NewGatewayipRepository, repository.NewLogRepository, flexCdn.NewCcRepository, flexCdn.NewCcIpListRepository, admin.NewWafLogRepository)

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

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

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

var serviceSet = wire.NewSet(service.NewService, service.NewAoDunService, gameShield.NewGameShieldService, service.NewCrawlerService, service.NewGameShieldPublicIpService, service.NewDuedateService, service.NewFormatterService, service.NewParserService, service.NewRequiredService, service.NewHostService, gameShield.NewGameShieldBackendService, service.NewGameShieldSdkIpService, service.NewGameShieldUserIpService, waf2.NewWafFormatterService, flexCdn2.NewCdnService, service.NewRequestService, waf2.NewTcpforwardingService, waf2.NewUdpForWardingService, waf2.NewWebForwardingService, flexCdn2.NewProxyService, flexCdn2.NewSslCertService, flexCdn2.NewWebsocketService, waf2.NewCcService, waf2.NewGatewayipService, service.NewLogService, waf2.NewCcIpListService, waf2.NewBuildAudunService, waf2.NewZzybgpService, admin2.NewWafLogService)

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