Skip to content

Commit

Permalink
main-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivam-nagar23 committed Feb 8, 2024
2 parents 9dd58b6 + 322cf1d commit 9efa163
Show file tree
Hide file tree
Showing 112 changed files with 3,905 additions and 6,311 deletions.
119 changes: 69 additions & 50 deletions Wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,26 @@ import (
"github.com/devtron-labs/devtron/api/k8s"
"github.com/devtron-labs/devtron/api/module"
"github.com/devtron-labs/devtron/api/restHandler"
pipeline2 "github.com/devtron-labs/devtron/api/restHandler/app"
"github.com/devtron-labs/devtron/api/restHandler/app/appInfo"
appList2 "github.com/devtron-labs/devtron/api/restHandler/app/appList"
pipeline3 "github.com/devtron-labs/devtron/api/restHandler/app/pipeline"
pipeline2 "github.com/devtron-labs/devtron/api/restHandler/app/pipeline/configure"
"github.com/devtron-labs/devtron/api/restHandler/app/pipeline/history"
status2 "github.com/devtron-labs/devtron/api/restHandler/app/pipeline/status"
"github.com/devtron-labs/devtron/api/restHandler/app/pipeline/trigger"
"github.com/devtron-labs/devtron/api/restHandler/app/pipeline/webhook"
"github.com/devtron-labs/devtron/api/restHandler/app/workflow"
"github.com/devtron-labs/devtron/api/restHandler/scopedVariable"
"github.com/devtron-labs/devtron/api/router"
app3 "github.com/devtron-labs/devtron/api/router/app"
appInfo2 "github.com/devtron-labs/devtron/api/router/app/appInfo"
"github.com/devtron-labs/devtron/api/router/app/appList"
pipeline5 "github.com/devtron-labs/devtron/api/router/app/pipeline"
pipeline4 "github.com/devtron-labs/devtron/api/router/app/pipeline/configure"
history2 "github.com/devtron-labs/devtron/api/router/app/pipeline/history"
status3 "github.com/devtron-labs/devtron/api/router/app/pipeline/status"
trigger2 "github.com/devtron-labs/devtron/api/router/app/pipeline/trigger"
workflow2 "github.com/devtron-labs/devtron/api/router/app/workflow"
"github.com/devtron-labs/devtron/api/router/pubsub"
"github.com/devtron-labs/devtron/api/server"
"github.com/devtron-labs/devtron/api/sse"
Expand Down Expand Up @@ -81,16 +98,16 @@ import (
resourceGroup "github.com/devtron-labs/devtron/internal/sql/repository/resourceGroup"
security2 "github.com/devtron-labs/devtron/internal/sql/repository/security"
"github.com/devtron-labs/devtron/internal/util"
"github.com/devtron-labs/devtron/internal/util/ArgoUtil"
"github.com/devtron-labs/devtron/pkg/app"
"github.com/devtron-labs/devtron/pkg/app/status"
"github.com/devtron-labs/devtron/pkg/appClone"
"github.com/devtron-labs/devtron/pkg/appClone/batch"
"github.com/devtron-labs/devtron/pkg/appStatus"
"github.com/devtron-labs/devtron/pkg/appStore/chartGroup"
repository4 "github.com/devtron-labs/devtron/pkg/appStore/chartGroup/repository"
"github.com/devtron-labs/devtron/pkg/appStore/deployment/service"
appStoreDeploymentGitopsTool "github.com/devtron-labs/devtron/pkg/appStore/deployment/tool"
"github.com/devtron-labs/devtron/pkg/appStore/installedApp/service/FullMode"
deployment3 "github.com/devtron-labs/devtron/pkg/appStore/installedApp/service/FullMode/deployment"
"github.com/devtron-labs/devtron/pkg/appStore/installedApp/service/FullMode/resource"
"github.com/devtron-labs/devtron/pkg/appWorkflow"
"github.com/devtron-labs/devtron/pkg/attributes"
"github.com/devtron-labs/devtron/pkg/bulkAction"
Expand Down Expand Up @@ -183,8 +200,8 @@ func InitializeApp() (*App, error) {
wire.Bind(new(session2.ServiceClient), new(*middleware.LoginService)),

sse.NewSSE,
router.NewPipelineTriggerRouter,
wire.Bind(new(router.PipelineTriggerRouter), new(*router.PipelineTriggerRouterImpl)),
trigger2.NewPipelineTriggerRouter,
wire.Bind(new(trigger2.PipelineTriggerRouter), new(*trigger2.PipelineTriggerRouterImpl)),

//---- pprof start ----
restHandler.NewPProfRestHandler,
Expand All @@ -194,8 +211,8 @@ func InitializeApp() (*App, error) {
wire.Bind(new(router.PProfRouter), new(*router.PProfRouterImpl)),
//---- pprof end ----

restHandler.NewPipelineRestHandler,
wire.Bind(new(restHandler.PipelineTriggerRestHandler), new(*restHandler.PipelineTriggerRestHandlerImpl)),
trigger.NewPipelineRestHandler,
wire.Bind(new(trigger.PipelineTriggerRestHandler), new(*trigger.PipelineTriggerRestHandlerImpl)),
app.GetAppServiceConfig,
app.NewAppService,
wire.Bind(new(app.AppService), new(*app.AppServiceImpl)),
Expand Down Expand Up @@ -249,13 +266,25 @@ func InitializeApp() (*App, error) {
wire.Bind(new(pipeline.CdPipelineConfigService), new(*pipeline.CdPipelineConfigServiceImpl)),
pipeline.NewDevtronAppConfigServiceImpl,
wire.Bind(new(pipeline.DevtronAppConfigService), new(*pipeline.DevtronAppConfigServiceImpl)),
pipeline3.NewDevtronAppAutoCompleteRestHandlerImpl,
wire.Bind(new(pipeline3.DevtronAppAutoCompleteRestHandler), new(*pipeline3.DevtronAppAutoCompleteRestHandlerImpl)),

util5.NewLoggingMiddlewareImpl,
wire.Bind(new(util5.LoggingMiddleware), new(*util5.LoggingMiddlewareImpl)),
pipeline2.NewPipelineRestHandlerImpl,
wire.Bind(new(pipeline2.PipelineConfigRestHandler), new(*pipeline2.PipelineConfigRestHandlerImpl)),
router.NewPipelineRouterImpl,
wire.Bind(new(router.PipelineConfigRouter), new(*router.PipelineConfigRouterImpl)),

pipeline4.NewPipelineRouterImpl,
wire.Bind(new(pipeline4.PipelineConfigRouter), new(*pipeline4.PipelineConfigRouterImpl)),
history2.NewPipelineHistoryRouterImpl,
wire.Bind(new(history2.PipelineHistoryRouter), new(*history2.PipelineHistoryRouterImpl)),
status3.NewPipelineStatusRouterImpl,
wire.Bind(new(status3.PipelineStatusRouter), new(*status3.PipelineStatusRouterImpl)),
pipeline5.NewDevtronAppAutoCompleteRouterImpl,
wire.Bind(new(pipeline5.DevtronAppAutoCompleteRouter), new(*pipeline5.DevtronAppAutoCompleteRouterImpl)),
workflow2.NewAppWorkflowRouterImpl,
wire.Bind(new(workflow2.AppWorkflowRouter), new(*workflow2.AppWorkflowRouterImpl)),

pipeline.NewCiCdPipelineOrchestrator,
wire.Bind(new(pipeline.CiCdPipelineOrchestrator), new(*pipeline.CiCdPipelineOrchestratorImpl)),
pipelineConfig.NewMaterialRepositoryImpl,
Expand Down Expand Up @@ -304,10 +333,15 @@ func InitializeApp() (*App, error) {
pipeline.NewGitRegistryConfigImpl,
wire.Bind(new(pipeline.GitRegistryConfig), new(*pipeline.GitRegistryConfigImpl)),

router.NewAppListingRouterImpl,
wire.Bind(new(router.AppListingRouter), new(*router.AppListingRouterImpl)),
restHandler.NewAppListingRestHandlerImpl,
wire.Bind(new(restHandler.AppListingRestHandler), new(*restHandler.AppListingRestHandlerImpl)),
appList.NewAppFilteringRouterImpl,
wire.Bind(new(appList.AppFilteringRouter), new(*appList.AppFilteringRouterImpl)),
appList2.NewAppFilteringRestHandlerImpl,
wire.Bind(new(appList2.AppFilteringRestHandler), new(*appList2.AppFilteringRestHandlerImpl)),

appList.NewAppListingRouterImpl,
wire.Bind(new(appList.AppListingRouter), new(*appList.AppListingRouterImpl)),
appList2.NewAppListingRestHandlerImpl,
wire.Bind(new(appList2.AppListingRestHandler), new(*appList2.AppListingRestHandlerImpl)),
app.NewAppListingServiceImpl,
wire.Bind(new(app.AppListingService), new(*app.AppListingServiceImpl)),
repository.NewAppListingRepositoryImpl,
Expand Down Expand Up @@ -357,28 +391,9 @@ func InitializeApp() (*App, error) {
repository2.NewServiceClientImpl,
wire.Bind(new(repository2.ServiceClient), new(*repository2.ServiceClientImpl)),
wire.Bind(new(connector.Pump), new(*connector.PumpImpl)),
restHandler.NewArgoApplicationRestHandlerImpl,
wire.Bind(new(restHandler.ArgoApplicationRestHandler), new(*restHandler.ArgoApplicationRestHandlerImpl)),
router.NewApplicationRouterImpl,
wire.Bind(new(router.ApplicationRouter), new(*router.ApplicationRouterImpl)),

//app.GetConfig,

router.NewCDRouterImpl,
wire.Bind(new(router.CDRouter), new(*router.CDRouterImpl)),
restHandler.NewCDRestHandlerImpl,
wire.Bind(new(restHandler.CDRestHandler), new(*restHandler.CDRestHandlerImpl)),

ArgoUtil.GetArgoConfig,
ArgoUtil.NewArgoSession,
ArgoUtil.NewResourceServiceImpl,
wire.Bind(new(ArgoUtil.ResourceService), new(*ArgoUtil.ResourceServiceImpl)),
//ArgoUtil.NewApplicationServiceImpl,
//wire.Bind(new(ArgoUtil.ApplicationService), new(ArgoUtil.ApplicationServiceImpl)),
//ArgoUtil.NewRepositoryService,
//wire.Bind(new(ArgoUtil.RepositoryService), new(ArgoUtil.RepositoryServiceImpl)),

//ArgoUtil.NewClusterServiceImpl,
//wire.Bind(new(ArgoUtil.ClusterService), new(ArgoUtil.ClusterServiceImpl)),
pipeline.GetEcrConfig,
//otel.NewOtelTracingServiceImpl,
//wire.Bind(new(otel.OtelTracingService), new(*otel.OtelTracingServiceImpl)),
Expand Down Expand Up @@ -504,14 +519,16 @@ func InitializeApp() (*App, error) {
wire.Bind(new(appStoreRestHandler.AppStoreStatusTimelineRestHandler), new(*appStoreRestHandler.AppStoreStatusTimelineRestHandlerImpl)),
appStoreRestHandler.NewInstalledAppRestHandlerImpl,
wire.Bind(new(appStoreRestHandler.InstalledAppRestHandler), new(*appStoreRestHandler.InstalledAppRestHandlerImpl)),
service.NewInstalledAppServiceImpl,
wire.Bind(new(service.InstalledAppService), new(*service.InstalledAppServiceImpl)),
FullMode.NewInstalledAppDBExtendedServiceImpl,
wire.Bind(new(FullMode.InstalledAppDBExtendedService), new(*FullMode.InstalledAppDBExtendedServiceImpl)),
resource.NewInstalledAppResourceServiceImpl,
wire.Bind(new(resource.InstalledAppResourceService), new(*resource.InstalledAppResourceServiceImpl)),

appStoreRestHandler.NewAppStoreRouterImpl,
wire.Bind(new(appStoreRestHandler.AppStoreRouter), new(*appStoreRestHandler.AppStoreRouterImpl)),

restHandler.NewAppWorkflowRestHandlerImpl,
wire.Bind(new(restHandler.AppWorkflowRestHandler), new(*restHandler.AppWorkflowRestHandlerImpl)),
workflow.NewAppWorkflowRestHandlerImpl,
wire.Bind(new(workflow.AppWorkflowRestHandler), new(*workflow.AppWorkflowRestHandlerImpl)),

appWorkflow.NewAppWorkflowServiceImpl,
wire.Bind(new(appWorkflow.AppWorkflowService), new(*appWorkflow.AppWorkflowServiceImpl)),
Expand Down Expand Up @@ -701,13 +718,15 @@ func InitializeApp() (*App, error) {
wire.Bind(new(repository.WebhookEventDataRepository), new(*repository.WebhookEventDataRepositoryImpl)),
pipeline.NewWebhookEventDataConfigImpl,
wire.Bind(new(pipeline.WebhookEventDataConfig), new(*pipeline.WebhookEventDataConfigImpl)),
restHandler.NewWebhookDataRestHandlerImpl,
wire.Bind(new(restHandler.WebhookDataRestHandler), new(*restHandler.WebhookDataRestHandlerImpl)),
webhook.NewWebhookDataRestHandlerImpl,
wire.Bind(new(webhook.WebhookDataRestHandler), new(*webhook.WebhookDataRestHandlerImpl)),

router.NewAppRouterImpl,
wire.Bind(new(router.AppRouter), new(*router.AppRouterImpl)),
restHandler.NewAppRestHandlerImpl,
wire.Bind(new(restHandler.AppRestHandler), new(*restHandler.AppRestHandlerImpl)),
app3.NewAppRouterImpl,
wire.Bind(new(app3.AppRouter), new(*app3.AppRouterImpl)),
appInfo2.NewAppInfoRouterImpl,
wire.Bind(new(appInfo2.AppInfoRouter), new(*appInfo2.AppInfoRouterImpl)),
appInfo.NewAppInfoRestHandlerImpl,
wire.Bind(new(appInfo.AppInfoRestHandler), new(*appInfo.AppInfoRestHandlerImpl)),

app.NewAppCrudOperationServiceImpl,
wire.Bind(new(app.AppCrudOperationService), new(*app.AppCrudOperationServiceImpl)),
Expand All @@ -719,13 +738,13 @@ func InitializeApp() (*App, error) {
delete2.NewDeleteServiceFullModeImpl,
wire.Bind(new(delete2.DeleteServiceFullMode), new(*delete2.DeleteServiceFullModeImpl)),

appStoreDeploymentGitopsTool.NewAppStoreDeploymentArgoCdServiceImpl,
wire.Bind(new(appStoreDeploymentGitopsTool.AppStoreDeploymentArgoCdService), new(*appStoreDeploymentGitopsTool.AppStoreDeploymentArgoCdServiceImpl)),
deployment3.NewFullModeDeploymentServiceImpl,
wire.Bind(new(deployment3.FullModeDeploymentService), new(*deployment3.FullModeDeploymentServiceImpl)),
// util2.NewGoJsonSchemaCustomFormatChecker,

//history starts
restHandler.NewPipelineHistoryRestHandlerImpl,
wire.Bind(new(restHandler.PipelineHistoryRestHandler), new(*restHandler.PipelineHistoryRestHandlerImpl)),
history.NewPipelineHistoryRestHandlerImpl,
wire.Bind(new(history.PipelineHistoryRestHandler), new(*history.PipelineHistoryRestHandlerImpl)),

repository3.NewConfigMapHistoryRepositoryImpl,
wire.Bind(new(repository3.ConfigMapHistoryRepository), new(*repository3.ConfigMapHistoryRepositoryImpl)),
Expand Down Expand Up @@ -814,8 +833,8 @@ func InitializeApp() (*App, error) {
cron.NewCiTriggerCronImpl,
wire.Bind(new(cron.CiTriggerCron), new(*cron.CiTriggerCronImpl)),

restHandler.NewPipelineStatusTimelineRestHandlerImpl,
wire.Bind(new(restHandler.PipelineStatusTimelineRestHandler), new(*restHandler.PipelineStatusTimelineRestHandlerImpl)),
status2.NewPipelineStatusTimelineRestHandlerImpl,
wire.Bind(new(status2.PipelineStatusTimelineRestHandler), new(*status2.PipelineStatusTimelineRestHandlerImpl)),

status.NewPipelineStatusTimelineServiceImpl,
wire.Bind(new(status.PipelineStatusTimelineService), new(*status.PipelineStatusTimelineServiceImpl)),
Expand Down
Loading

0 comments on commit 9efa163

Please sign in to comment.