Help us shape the future of Go! Take the 2026 Go Developer Survey

deploymentConfig

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigType

type ConfigType string
const (
	Custom          ConfigType = "custom"
	SystemGenerated ConfigType = "system_generated"
)

type DeploymentAppType

type DeploymentAppType string
const (
	Argo DeploymentAppType = "argo_cd"
	Helm DeploymentAppType = "helm"
)

type DeploymentConfig

type DeploymentConfig struct {
	Id                int    `sql:"id,pk"`
	AppId             int    `sql:"app_id"`
	EnvironmentId     int    `sql:"environment_id"`
	DeploymentAppType string `sql:"deployment_app_type"`
	ConfigType        string `sql:"config_type"`
	RepoUrl           string `sql:"repo_url"`
	RepoName          string `sql:"repo_name"`
	ReleaseMode       string `sql:"release_mode"`
	ReleaseConfig     string `sql:"release_config"`
	Active            bool   `sql:"active,notnull"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type Repository

type Repository interface {
	Save(tx *pg.Tx, config *DeploymentConfig) (*DeploymentConfig, error)
	SaveAll(tx *pg.Tx, configs []*DeploymentConfig) ([]*DeploymentConfig, error)
	Update(tx *pg.Tx, config *DeploymentConfig) (*DeploymentConfig, error)
	UpdateAll(tx *pg.Tx, config []*DeploymentConfig) ([]*DeploymentConfig, error)
	GetByAppIdAndEnvId(tx *pg.Tx, appId, envId int) (*DeploymentConfig, error)
	GetAppLevelConfigForDevtronApps(tx *pg.Tx, appId int) (*DeploymentConfig, error)
	GetAppAndEnvLevelConfigsInBulk(appIdToEnvIdsMap map[int][]int) ([]*DeploymentConfig, error)
	GetByAppIdAndEnvIdEvenIfInactive(appId, envId int) (*DeploymentConfig, error)
	GetConfigByAppIds(appIds []int) ([]*DeploymentConfig, error)
	GetAllConfigsForActiveApps() ([]*DeploymentConfig, error)
	GetAllEnvLevelConfigsWithReleaseMode(releaseMode string) ([]*DeploymentConfig, error)
	GetDeploymentAppTypeForChartStoreAppByAppId(appId int) (string, error)
}

type RepositoryImpl

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

func NewRepositoryImpl

func NewRepositoryImpl(dbConnection *pg.DB) *RepositoryImpl

func (*RepositoryImpl) GetAllConfigsForActiveApps added in v1.4.0

func (impl *RepositoryImpl) GetAllConfigsForActiveApps() ([]*DeploymentConfig, error)

GetAllConfigsForActiveApps returns all deployment configs for active apps INNER JOIN app a is used to filter out inactive apps NOTE: earlier we were not deleting the deployment configs on app delete, so we need to filter out inactive deployment configs

func (*RepositoryImpl) GetAllEnvLevelConfigsWithReleaseMode added in v1.4.0

func (impl *RepositoryImpl) GetAllEnvLevelConfigsWithReleaseMode(releaseMode string) ([]*DeploymentConfig, error)

GetAllEnvLevelConfigsWithReleaseMode returns all deployment configs for active apps and envs INNER JOIN app a is used to filter out inactive apps INNER JOIN environment e is used to filter out inactive envs NOTE: earlier we were not deleting the deployment configs on app delete, so we need to filter out inactive deployment configs

func (*RepositoryImpl) GetAppAndEnvLevelConfigsInBulk

func (impl *RepositoryImpl) GetAppAndEnvLevelConfigsInBulk(appIdToEnvIdsMap map[int][]int) ([]*DeploymentConfig, error)

func (*RepositoryImpl) GetAppLevelConfigForDevtronApps

func (impl *RepositoryImpl) GetAppLevelConfigForDevtronApps(tx *pg.Tx, appId int) (*DeploymentConfig, error)

func (*RepositoryImpl) GetByAppIdAndEnvId

func (impl *RepositoryImpl) GetByAppIdAndEnvId(tx *pg.Tx, appId, envId int) (*DeploymentConfig, error)

func (*RepositoryImpl) GetByAppIdAndEnvIdEvenIfInactive

func (impl *RepositoryImpl) GetByAppIdAndEnvIdEvenIfInactive(appId, envId int) (*DeploymentConfig, error)

func (*RepositoryImpl) GetConfigByAppIds added in v1.2.1

func (impl *RepositoryImpl) GetConfigByAppIds(appIds []int) ([]*DeploymentConfig, error)

func (*RepositoryImpl) GetDeploymentAppTypeForChartStoreAppByAppId added in v1.3.0

func (impl *RepositoryImpl) GetDeploymentAppTypeForChartStoreAppByAppId(appId int) (string, error)

func (*RepositoryImpl) Save

func (impl *RepositoryImpl) Save(tx *pg.Tx, config *DeploymentConfig) (*DeploymentConfig, error)

func (*RepositoryImpl) SaveAll

func (impl *RepositoryImpl) SaveAll(tx *pg.Tx, configs []*DeploymentConfig) ([]*DeploymentConfig, error)

func (*RepositoryImpl) Update

func (impl *RepositoryImpl) Update(tx *pg.Tx, config *DeploymentConfig) (*DeploymentConfig, error)

func (*RepositoryImpl) UpdateAll

func (impl *RepositoryImpl) UpdateAll(tx *pg.Tx, configs []*DeploymentConfig) ([]*DeploymentConfig, error)

Jump to

Keyboard shortcuts

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