// Code generated by Wire. DO NOT EDIT.

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

package server

import (
	"github.com/1340691923/ElasticView/pkg/api"
	"github.com/1340691923/ElasticView/pkg/infrastructure/access_control"
	"github.com/1340691923/ElasticView/pkg/infrastructure/config"
	"github.com/1340691923/ElasticView/pkg/infrastructure/logger"
	"github.com/1340691923/ElasticView/pkg/infrastructure/sqlstore"
	"github.com/1340691923/ElasticView/pkg/infrastructure/web_engine"
	"github.com/1340691923/ElasticView/pkg/jwt_svr"
	"github.com/1340691923/ElasticView/pkg/middleware"
	"github.com/1340691923/ElasticView/pkg/registry"
	"github.com/1340691923/ElasticView/pkg/request"
	"github.com/1340691923/ElasticView/pkg/response"
	"github.com/1340691923/ElasticView/pkg/server/backgroundsvcs"
	"github.com/1340691923/ElasticView/pkg/services/alias_service"
	"github.com/1340691923/ElasticView/pkg/services/cat_service"
	"github.com/1340691923/ElasticView/pkg/services/cluser_settings_service"
	"github.com/1340691923/ElasticView/pkg/services/es"
	"github.com/1340691923/ElasticView/pkg/services/es_backup"
	"github.com/1340691923/ElasticView/pkg/services/es_doc_service"
	"github.com/1340691923/ElasticView/pkg/services/es_link_service"
	"github.com/1340691923/ElasticView/pkg/services/es_service"
	"github.com/1340691923/ElasticView/pkg/services/es_task_service"
	"github.com/1340691923/ElasticView/pkg/services/gm_operater_log"
	"github.com/1340691923/ElasticView/pkg/services/gm_role"
	"github.com/1340691923/ElasticView/pkg/services/gm_user"
	"github.com/1340691923/ElasticView/pkg/services/index_service"
	"github.com/1340691923/ElasticView/pkg/services/navicat_service"
	"github.com/1340691923/ElasticView/pkg/web"
	"github.com/google/wire"
)

// Injectors from wire.go:

func Initialize(args *config.CommandLineArgs) (*Server, error) {
	configConfig, err := config.InitConfig(args)
	if err != nil {
		return nil, err
	}
	zapLogger, err := logger.InitLog(configConfig)
	if err != nil {
		return nil, err
	}
	sqlStore, err := sqlstore.NewSqlStore(configConfig, zapLogger)
	if err != nil {
		return nil, err
	}
	webEngine := web_engine.NewWebEngine()
	rbac, err := access_control.NewRbac(configConfig, zapLogger)
	if err != nil {
		return nil, err
	}
	jwt := jwt_svr.NewJwt(configConfig, zapLogger)
	responseResponse := response.NewResponse(zapLogger)
	gmUserService := gm_user.NewGmUserService(zapLogger, sqlStore, jwt)
	middleWareService := middleware.NewMiddleWareService(configConfig, sqlStore, zapLogger, rbac, jwt, responseResponse, gmUserService, webEngine)
	requestRequest := request.NewRequest()
	baseController := api.NewBaseController(requestRequest, responseResponse)
	gmOperaterLogService := gm_operater_log.NewGmOperaterLogService(zapLogger, sqlStore)
	gmOperaterController := api.NewGmOperaterController(baseController, zapLogger, gmOperaterLogService, configConfig, sqlStore)
	gmRoleService := gm_role.NewGmRoleService(zapLogger, sqlStore)
	managerRoleController := api.NewManagerRoleController(baseController, rbac, zapLogger, configConfig, sqlStore, jwt, gmRoleService)
	managerUserController := api.NewManagerUserController(baseController, webEngine, zapLogger, configConfig, sqlStore, jwt, gmUserService)
	esCache := es.NewEsCache()
	esClientService := es.NewEsClientService(esCache, configConfig, sqlStore)
	esLinkService := es_link_service.NewEsLinkService(sqlStore, zapLogger)
	esLinkController := api.NewEsLinkController(baseController, zapLogger, esClientService, sqlStore, esCache, esLinkService)
	dslHistoryController := api.NewDslHistoryController(jwt, sqlStore, zapLogger, baseController)
	clusterSettingsService := cluser_settings_service.NewClusterSettingsService()
	esBackUpService := es_backup.NewEsBackUpService(clusterSettingsService)
	esBackUpController := api.NewEsBackUpController(baseController, zapLogger, esClientService, esBackUpService)
	catService := cat_service.NewCatService()
	esService := es_service.NewEsService()
	esController := api.NewEsController(baseController, zapLogger, esClientService, catService, esService, jwt, sqlStore)
	navicatService := navicat_service.NewNavicatService()
	esCrudController := api.NewEsCrudController(baseController, esClientService, zapLogger, navicatService)
	esDocService := es_doc_service.NewEsDocService()
	esDocController := api.NewEsDocController(baseController, zapLogger, esClientService, esDocService)
	indexService := index_service.NewIndexService()
	esIndexController := api.NewEsIndexController(baseController, zapLogger, esClientService, indexService)
	esMappingController := api.NewEsMappingController(baseController, zapLogger, esClientService, indexService)
	esTaskService := es_task_service.NewEsTaskService()
	esTaskController := api.NewEsTaskController(baseController, zapLogger, esClientService, esTaskService)
	guidController := api.NewGuidController(baseController, zapLogger, jwt, esClientService, sqlStore)
	webServer := web.NewWebServer(webEngine, zapLogger, configConfig, rbac, middleWareService, gmOperaterController, managerRoleController, managerUserController, esLinkController, dslHistoryController, esBackUpController, esController, esCrudController, esDocController, esIndexController, esMappingController, esTaskController, guidController)
	backgroundServiceRegistry := backgroundsvcs.ProvideBackgroundServiceRegistry(webServer)
	server := NewServer(configConfig, zapLogger, sqlStore, backgroundServiceRegistry, esLinkService)
	return server, nil
}

// wire.go:

var wireSet = wire.NewSet(wire.Bind(new(registry.BackgroundServiceRegistry), new(*backgroundsvcs.BackgroundServiceRegistry)), config.InitConfig, logger.InitLog, sqlstore.NewSqlStore, request.NewRequest, response.NewResponse, api.NewBaseController, api.NewDslHistoryController, api.NewEsBackUpController, api.NewEsController, api.NewEsIndexController, api.NewEsLinkController, api.NewEsMappingController, api.NewEsTaskController, api.NewGuidController, es.NewEsClientService, es.NewEsCache, alias_service.NewAliasService, cat_service.NewCatService, cluser_settings_service.NewClusterSettingsService, es_backup.NewEsBackUpService, api.NewEsDocController, es_task_service.NewEsTaskService, index_service.NewIndexService, navicat_service.NewNavicatService, es_doc_service.NewEsDocService, api.NewEsCrudController, es_link_service.NewEsLinkService, es_service.NewEsService, api.NewGmOperaterController, gm_operater_log.NewGmOperaterLogService, api.NewManagerRoleController, gm_role.NewGmRoleService, api.NewManagerUserController, gm_user.NewGmUserService, jwt_svr.NewJwt, middleware.NewMiddleWareService, backgroundsvcs.ProvideBackgroundServiceRegistry, access_control.NewRbac, web_engine.NewWebEngine, web.NewWebServer, NewServer)
