common

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GetAppIdToEnvIsMapping

func GetAppIdToEnvIsMapping[T any](configArr []T, appIdSelector func(config T) int, envIdSelector func(config T) int) map[int][]int

func IsCustomGitOpsRepo

func IsCustomGitOpsRepo(deploymentConfigType string) bool

Types

type DeploymentConfigService

type DeploymentConfigService interface {
	CreateOrUpdateConfig(tx *pg.Tx, config *bean.DeploymentConfig, userId int32) (*bean.DeploymentConfig, error)
	CreateOrUpdateConfigInBulk(tx *pg.Tx, configToBeCreated, configToBeUpdated []*bean.DeploymentConfig, userId int32) error
	GetConfigForDevtronApps(appId, envId int) (*bean.DeploymentConfig, error)
	GetAndMigrateConfigIfAbsentForDevtronApps(appId, envId int) (*bean.DeploymentConfig, error)
	GetConfigForHelmApps(appId, envId int) (*bean.DeploymentConfig, error)
	IsChartStoreAppManagedByArgoCd(appId int) (bool, error)
	GetConfigEvenIfInactive(appId, envId int) (*bean.DeploymentConfig, error)
	GetAndMigrateConfigIfAbsentForHelmApp(appId, envId int) (*bean.DeploymentConfig, error)
	UpdateRepoUrlForAppAndEnvId(repoURL string, appId, envId int) error
	GetConfigsByAppIds(appIds []int) ([]*bean.DeploymentConfig, error)
	UpdateChartLocationInDeploymentConfig(appId, envId, chartRefId int, userId int32, chartVersion string) error
	GetAllArgoAppInfosByDeploymentAppNames(deploymentAppNames []string) ([]*bean.DevtronArgoCdAppInfo, error)
	GetExternalReleaseType(appId, environmentId int) (bean.ExternalReleaseType, error)
	CheckIfURLAlreadyPresent(repoURL string) (bool, error)
	FilterPipelinesByApplicationClusterIdAndNamespace(pipelines []pipelineConfig.Pipeline, applicationObjectClusterId int, applicationObjectNamespace string) (pipelineConfig.Pipeline, error)
}

type DeploymentConfigServiceImpl

type DeploymentConfigServiceImpl struct {
	// contains filtered or unexported fields
}

func NewDeploymentConfigServiceImpl

func NewDeploymentConfigServiceImpl(
	deploymentConfigRepository deploymentConfig.Repository,
	logger *zap.SugaredLogger,
	chartRepository chartRepoRepository.ChartRepository,
	pipelineRepository pipelineConfig.PipelineRepository,
	appRepository appRepository.AppRepository,
	installedAppReadService installedAppReader.InstalledAppReadServiceEA,
	envVariables *util.EnvironmentVariables,
	envConfigOverrideService read.EnvConfigOverrideService,
	environmentRepository repository.EnvironmentRepository,
	chartRefRepository chartRepoRepository.ChartRefRepository,
	deploymentConfigReadService read2.DeploymentConfigReadService,
	acdAuthConfig *util3.ACDAuthConfig,
) *DeploymentConfigServiceImpl

func (*DeploymentConfigServiceImpl) CheckIfURLAlreadyPresent added in v1.4.0

func (impl *DeploymentConfigServiceImpl) CheckIfURLAlreadyPresent(repoURL string) (bool, error)

func (*DeploymentConfigServiceImpl) CreateOrUpdateConfig

func (impl *DeploymentConfigServiceImpl) CreateOrUpdateConfig(tx *pg.Tx, config *bean.DeploymentConfig, userId int32) (*bean.DeploymentConfig, error)

func (*DeploymentConfigServiceImpl) CreateOrUpdateConfigInBulk added in v1.2.1

func (impl *DeploymentConfigServiceImpl) CreateOrUpdateConfigInBulk(tx *pg.Tx, configToBeCreated, configToBeUpdated []*bean.DeploymentConfig, userId int32) error

func (*DeploymentConfigServiceImpl) FilterPipelinesByApplicationClusterIdAndNamespace added in v1.4.0

func (impl *DeploymentConfigServiceImpl) FilterPipelinesByApplicationClusterIdAndNamespace(pipelines []pipelineConfig.Pipeline, applicationObjectClusterId int, applicationObjectNamespace string) (pipelineConfig.Pipeline, error)

func (*DeploymentConfigServiceImpl) GetAllArgoAppInfosByDeploymentAppNames added in v1.4.0

func (impl *DeploymentConfigServiceImpl) GetAllArgoAppInfosByDeploymentAppNames(deploymentAppNames []string) ([]*bean.DevtronArgoCdAppInfo, error)

func (*DeploymentConfigServiceImpl) GetAndMigrateConfigIfAbsentForDevtronApps

func (impl *DeploymentConfigServiceImpl) GetAndMigrateConfigIfAbsentForDevtronApps(appId, envId int) (*bean.DeploymentConfig, error)

func (*DeploymentConfigServiceImpl) GetAndMigrateConfigIfAbsentForHelmApp

func (impl *DeploymentConfigServiceImpl) GetAndMigrateConfigIfAbsentForHelmApp(appId, envId int) (*bean.DeploymentConfig, error)

func (*DeploymentConfigServiceImpl) GetConfigDBObj

func (impl *DeploymentConfigServiceImpl) GetConfigDBObj(appId, envId int) (*deploymentConfig.DeploymentConfig, error)

func (*DeploymentConfigServiceImpl) GetConfigEvenIfInactive

func (impl *DeploymentConfigServiceImpl) GetConfigEvenIfInactive(appId, envId int) (*bean.DeploymentConfig, error)

func (*DeploymentConfigServiceImpl) GetConfigForDevtronApps

func (impl *DeploymentConfigServiceImpl) GetConfigForDevtronApps(appId, envId int) (*bean.DeploymentConfig, error)

func (*DeploymentConfigServiceImpl) GetConfigForHelmApps

func (impl *DeploymentConfigServiceImpl) GetConfigForHelmApps(appId, envId int) (*bean.DeploymentConfig, error)

func (*DeploymentConfigServiceImpl) GetConfigsByAppIds added in v1.2.1

func (impl *DeploymentConfigServiceImpl) GetConfigsByAppIds(appIds []int) ([]*bean.DeploymentConfig, error)

func (*DeploymentConfigServiceImpl) GetExternalReleaseType added in v1.4.0

func (impl *DeploymentConfigServiceImpl) GetExternalReleaseType(appId, environmentId int) (bean.ExternalReleaseType, error)

func (*DeploymentConfigServiceImpl) IsChartStoreAppManagedByArgoCd added in v1.3.0

func (impl *DeploymentConfigServiceImpl) IsChartStoreAppManagedByArgoCd(appId int) (bool, error)

func (*DeploymentConfigServiceImpl) UpdateChartLocationInDeploymentConfig added in v1.4.0

func (impl *DeploymentConfigServiceImpl) UpdateChartLocationInDeploymentConfig(appId, envId, chartRefId int, userId int32, chartVersion string) error

func (*DeploymentConfigServiceImpl) UpdateRepoUrlForAppAndEnvId

func (impl *DeploymentConfigServiceImpl) UpdateRepoUrlForAppAndEnvId(repoURL string, appId, envId int) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL