// 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/handler"
	admin3 "github.com/go-nunu/nunu-layout-advanced/internal/handler/admin"
	waf3 "github.com/go-nunu/nunu-layout-advanced/internal/handler/api/waf"
	"github.com/go-nunu/nunu-layout-advanced/internal/middleware"
	"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/pkg/app"
	"github.com/go-nunu/nunu-layout-advanced/pkg/jwt"
	"github.com/go-nunu/nunu-layout-advanced/pkg/limiter"
	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
	"github.com/go-nunu/nunu-layout-advanced/pkg/server/http"
	"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) {
	jwtJWT := jwt.NewJwt(viperViper)
	db := repository.NewDB(viperViper, logger)
	syncedEnforcer := repository.NewCasbinEnforcer(viperViper, logger, db)
	limiterLimiter := limiter.NewLimiter(viperViper)
	handlerFunc := middleware.NewRateLimitMiddleware(limiterLimiter)
	handlerHandler := handler.NewHandler(logger)
	client := repository.NewRedis(viperViper)
	qmgoClient := repository.NewMongoClient(viperViper)
	database := repository.NewMongoDB(qmgoClient, viperViper)
	rabbitMQ, cleanup := repository.NewRabbitMQ(viperViper, logger)
	repositoryRepository := repository.NewRepository(logger, db, client, qmgoClient, database, rabbitMQ, syncedEnforcer)
	transaction := repository.NewTransaction(repositoryRepository)
	sidSid := sid.NewSid()
	serviceService := service.NewService(transaction, logger, sidSid, jwtJWT)
	userRepository := admin.NewUserRepository(repositoryRepository)
	userService := admin2.NewUserService(serviceService, userRepository)
	userHandler := admin3.NewUserHandler(handlerHandler, userService)
	gameShieldRepository := repository.NewGameShieldRepository(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)
	gameShieldBackendRepository := repository.NewGameShieldBackendRepository(repositoryRepository)
	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)
	gameShieldHandler := handler.NewGameShieldHandler(handlerHandler, gameShieldService, crawlerService)
	gameShieldBackendService := gameShield.NewGameShieldBackendService(serviceService, gameShieldBackendRepository, gameShieldRepository, crawlerService, gameShieldPublicIpService, duedateService, formatterService, parserService, requiredService, viperViper, gameShieldService, hostService)
	gameShieldBackendHandler := handler.NewGameShieldBackendHandler(handlerHandler, gameShieldBackendService)
	webForwardingRepository := waf.NewWebForwardingRepository(repositoryRepository)
	globalLimitRepository := waf.NewGlobalLimitRepository(repositoryRepository)
	tcpforwardingRepository := waf.NewTcpforwardingRepository(repositoryRepository)
	udpForWardingRepository := waf.NewUdpForWardingRepository(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)
	requestService := service.NewRequestService(serviceService)
	cdnRepository := flexCdn.NewCdnRepository(repositoryRepository)
	cdnService := flexCdn2.NewCdnService(serviceService, viperViper, requestService, cdnRepository)
	wafFormatterService := waf2.NewWafFormatterService(serviceService, globalLimitRepository, hostRepository, requiredService, parserService, tcpforwardingRepository, udpForWardingRepository, webForwardingRepository, rabbitMQ, hostService, gatewayipRepository, gatewayipService, cdnService, cdnRepository)
	aoDunService := service.NewAoDunService(serviceService, viperViper, requestService)
	proxyRepository := flexCdn.NewProxyRepository(repositoryRepository)
	proxyService := flexCdn2.NewProxyService(serviceService, proxyRepository, cdnService)
	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)
	webForwardingHandler := waf3.NewWebForwardingHandler(handlerHandler, webForwardingService, wafLogService)
	tcpforwardingService := waf2.NewTcpforwardingService(serviceService, tcpforwardingRepository, parserService, requiredService, crawlerService, globalLimitRepository, hostRepository, wafFormatterService, cdnService, proxyService)
	tcpforwardingHandler := waf3.NewTcpforwardingHandler(handlerHandler, tcpforwardingService, wafLogService)
	udpForWardingService := waf2.NewUdpForWardingService(serviceService, udpForWardingRepository, requiredService, parserService, crawlerService, globalLimitRepository, hostRepository, wafFormatterService, cdnService, proxyService)
	udpForWardingHandler := waf3.NewUdpForWardingHandler(handlerHandler, udpForWardingService, wafLogService)
	allowAndDenyIpRepository := waf.NewAllowAndDenyIpRepository(repositoryRepository)
	allowAndDenyIpService := waf2.NewAllowAndDenyIpService(serviceService, allowAndDenyIpRepository, wafFormatterService, gatewayipService)
	buildAudunService := waf2.NewBuildAudunService(serviceService, aoDunService, gatewayipRepository, hostService)
	zzybgpService := waf2.NewZzybgpService(serviceService, gatewayipRepository, hostService, aoDunService)
	globalLimitService := waf2.NewGlobalLimitService(serviceService, globalLimitRepository, duedateService, crawlerService, viperViper, requiredService, parserService, hostService, hostRepository, cdnService, cdnRepository, tcpforwardingRepository, udpForWardingRepository, webForwardingRepository, allowAndDenyIpService, allowAndDenyIpRepository, tcpforwardingService, udpForWardingService, webForwardingService, gatewayipRepository, gatewayipService, buildAudunService, zzybgpService)
	globalLimitHandler := waf3.NewGlobalLimitHandler(handlerHandler, globalLimitService, wafLogService)
	adminRepository := admin.NewAdminRepository(repositoryRepository)
	adminService := admin2.NewAdminService(serviceService, adminRepository)
	adminHandler := admin3.NewAdminHandler(handlerHandler, adminService)
	gatewayIpAdminRepository := admin.NewGatewayIpAdminRepository(repositoryRepository)
	gatewayIpAdminService := admin2.NewGatewayIpAdminService(serviceService, gatewayIpAdminRepository, viperViper, requestService)
	gatewayIpAdminHandler := admin3.NewGatewayIpAdminHandler(handlerHandler, gatewayIpAdminService)
	allowAndDenyIpHandler := waf3.NewAllowAndDenyIpHandler(handlerHandler, allowAndDenyIpService, wafLogService)
	ccHandler := waf3.NewCcHandler(handlerHandler, ccService, wafLogService)
	ccIpListHandler := waf3.NewCcIpListHandler(handlerHandler, ccIpListService, wafLogService)
	cdnLogService := waf2.NewCdnLogService(serviceService, tcpforwardingRepository, udpForWardingRepository, webForwardingRepository, cdnService, ccIpListService)
	cdnLogHandler := waf3.NewCdnLogHandler(handlerHandler, cdnLogService)
	adminLogRepository := admin.NewLogRepository(repositoryRepository)
	adminLogService := admin2.NewLogService(serviceService, adminLogRepository)
	logHandler := admin3.NewLogHandler(handlerHandler, adminLogService)
	wafLogHandler := admin3.NewWafLogHandler(handlerHandler, wafLogService)
	httpServer := server.NewHTTPServer(logger, viperViper, jwtJWT, syncedEnforcer, limiterLimiter, handlerFunc, userHandler, gameShieldHandler, gameShieldBackendHandler, webForwardingHandler, tcpforwardingHandler, udpForWardingHandler, globalLimitHandler, adminHandler, gatewayIpAdminHandler, allowAndDenyIpHandler, ccHandler, logService, ccIpListHandler, cdnLogHandler, logHandler, wafLogHandler)
	appApp := newApp(httpServer)
	return appApp, func() {
		cleanup()
	}, nil
}

// wire.go:

var repositorySet = wire.NewSet(repository.NewDB, repository.NewRedis, repository.NewCasbinEnforcer, repository.NewMongoClient, repository.NewMongoDB, repository.NewRabbitMQ, repository.NewRepository, repository.NewTransaction, admin.NewAdminRepository, admin.NewUserRepository, repository.NewGameShieldRepository, repository.NewGameShieldPublicIpRepository, waf.NewWebForwardingRepository, waf.NewTcpforwardingRepository, waf.NewUdpForWardingRepository, repository.NewGameShieldUserIpRepository, repository.NewGameShieldBackendRepository, repository.NewGameShieldSdkIpRepository, repository.NewHostRepository, waf.NewGlobalLimitRepository, repository.NewGatewayGroupRepository, repository.NewGateWayGroupIpRepository, flexCdn.NewCdnRepository, waf.NewAllowAndDenyIpRepository, flexCdn.NewProxyRepository, flexCdn.NewCcRepository, repository.NewExpiredRepository, repository.NewLogRepository, waf.NewGatewayipRepository, admin.NewGatewayIpAdminRepository, flexCdn.NewCcIpListRepository, admin.NewLogRepository, admin.NewWafLogRepository)

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

var handlerSet = wire.NewSet(handler.NewHandler, admin3.NewUserHandler, admin3.NewAdminHandler, admin3.NewGatewayIpAdminHandler, handler.NewGameShieldHandler, handler.NewGameShieldPublicIpHandler, waf3.NewWebForwardingHandler, waf3.NewTcpforwardingHandler, waf3.NewUdpForWardingHandler, handler.NewGameShieldUserIpHandler, handler.NewGameShieldBackendHandler, handler.NewGameShieldSdkIpHandler, handler.NewHostHandler, waf3.NewGlobalLimitHandler, handler.NewGatewayGroupHandler, handler.NewGateWayGroupIpHandler, waf3.NewAllowAndDenyIpHandler, waf3.NewCcHandler, waf3.NewGatewayipHandler, waf3.NewCcIpListHandler, waf3.NewCdnLogHandler, admin3.NewLogHandler, admin3.NewWafLogHandler)

// 限流器依赖集
var limiterSet = wire.NewSet(limiter.NewLimiter, middleware.NewRateLimitMiddleware)

var serverSet = wire.NewSet(server.NewHTTPServer)

// build App
func newApp(
	httpServer *http.Server,
) *app.App {
	return app.NewApp(app.WithServer(httpServer), app.WithName("demo-server"))
}
