common

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertDeploymentConfigDTOToDbObj

func ConvertDeploymentConfigDTOToDbObj(config *bean.DeploymentConfig) *deploymentConfig.DeploymentConfig

func ConvertDeploymentConfigDbObjToDTO

func ConvertDeploymentConfigDbObjToDTO(dbObj *deploymentConfig.DeploymentConfig) *bean.DeploymentConfig

func GetAppIdToEnvIsMapping

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

func GetDeploymentConfigType

func GetDeploymentConfigType(isCustomGitOpsRepo bool) string

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)
	IsDeploymentConfigUsed() bool
	GetConfigForDevtronApps(appId, envId int) (*bean.DeploymentConfig, error)
	GetAndMigrateConfigIfAbsentForDevtronApps(appId, envId int) (*bean.DeploymentConfig, error)
	GetConfigForHelmApps(appId, envId int) (*bean.DeploymentConfig, error)
	GetConfigEvenIfInactive(appId, envId int) (*bean.DeploymentConfig, error)
	GetAndMigrateConfigIfAbsentForHelmApp(appId, envId int) (*bean.DeploymentConfig, error)
	GetAppLevelConfigForDevtronApp(appId int) (*bean.DeploymentConfig, error)
	UpdateRepoUrlForAppAndEnvId(repoURL string, appId, envId int) error
	GetDeploymentAppTypeForCDInBulk(pipelines []*pipelineConfig.Pipeline) (map[int]string, 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,
	installedAppRepository repository.InstalledAppRepository,
	envVariables *util.EnvironmentVariables,
) *DeploymentConfigServiceImpl

func (*DeploymentConfigServiceImpl) CreateOrUpdateConfig

func (impl *DeploymentConfigServiceImpl) CreateOrUpdateConfig(tx *pg.Tx, config *bean.DeploymentConfig, userId int32) (*bean.DeploymentConfig, 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) GetAppLevelConfigForDevtronApp

func (impl *DeploymentConfigServiceImpl) GetAppLevelConfigForDevtronApp(appId 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) GetDeploymentAppTypeForCDInBulk

func (impl *DeploymentConfigServiceImpl) GetDeploymentAppTypeForCDInBulk(pipelines []*pipelineConfig.Pipeline) (map[int]string, error)

func (*DeploymentConfigServiceImpl) IsDeploymentConfigUsed

func (impl *DeploymentConfigServiceImpl) IsDeploymentConfigUsed() bool

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