Documentation ¶
Index ¶
- type Chart
- type ChartRef
- type ChartRefRepository
- type ChartRefRepositoryImpl
- type ChartRepo
- type ChartRepoRepository
- type ChartRepoRepositoryImpl
- func (impl ChartRepoRepositoryImpl) FindAll() ([]*ChartRepo, error)
- func (impl ChartRepoRepositoryImpl) FindById(id int) (*ChartRepo, error)
- func (impl ChartRepoRepositoryImpl) GetConnection() *pg.DB
- func (impl ChartRepoRepositoryImpl) GetDefault() (*ChartRepo, error)
- func (impl ChartRepoRepositoryImpl) Save(chartRepo *ChartRepo, tx *pg.Tx) error
- func (impl ChartRepoRepositoryImpl) Update(chartRepo *ChartRepo, tx *pg.Tx) error
- type ChartRepository
- type ChartRepositoryImpl
- func (repositoryImpl ChartRepositoryImpl) FindActiveChart(appId int) (chart *Chart, err error)
- func (repositoryImpl ChartRepositoryImpl) FindActiveChartsByAppId(appId int) (charts []*Chart, err error)
- func (repositoryImpl ChartRepositoryImpl) FindById(id int) (chart *Chart, err error)
- func (repositoryImpl ChartRepositoryImpl) FindChartByAppIdAndRefId(appId int, chartRefId int) (chart *Chart, err error)
- func (repositoryImpl ChartRepositoryImpl) FindCurrentChartVersion(chartRepo, chartName, chartVersionPattern string) (string, error)
- func (repositoryImpl ChartRepositoryImpl) FindLatestByAppId(appId int) (chart *Chart, err error)
- func (repositoryImpl ChartRepositoryImpl) FindLatestChartForAppByAppId(appId int) (chart *Chart, err error)
- func (repositoryImpl ChartRepositoryImpl) FindLatestChartForAppByAppIdAndEnvId(appId int, envId int) (chart *Chart, err error)
- func (repositoryImpl ChartRepositoryImpl) FindNoLatestChartForAppByAppId(appId int) ([]*Chart, error)
- func (repositoryImpl ChartRepositoryImpl) FindOne(chartRepo, chartName, chartVersion string) (*Chart, error)
- func (repositoryImpl ChartRepositoryImpl) FindPreviousChartByAppId(appId int) (chart *Chart, err error)
- func (repositoryImpl ChartRepositoryImpl) Save(chart *Chart) error
- func (repositoryImpl ChartRepositoryImpl) Update(chart *Chart) error
- type ConfigMapAppModel
- type ConfigMapEnvModel
- type ConfigMapRepository
- type ConfigMapRepositoryImpl
- func (impl ConfigMapRepositoryImpl) CreateAppLevel(model *ConfigMapAppModel) (*ConfigMapAppModel, error)
- func (impl ConfigMapRepositoryImpl) CreateEnvLevel(model *ConfigMapEnvModel) (*ConfigMapEnvModel, error)
- func (impl ConfigMapRepositoryImpl) GetAllAppLevel() ([]ConfigMapAppModel, error)
- func (impl ConfigMapRepositoryImpl) GetAllEnvLevel() ([]ConfigMapEnvModel, error)
- func (impl ConfigMapRepositoryImpl) GetByAppIdAndEnvIdEnvLevel(appId int, envId int) (*ConfigMapEnvModel, error)
- func (impl ConfigMapRepositoryImpl) GetByAppIdAppLevel(appId int) (*ConfigMapAppModel, error)
- func (impl ConfigMapRepositoryImpl) GetByIdAppLevel(id int) (*ConfigMapAppModel, error)
- func (impl ConfigMapRepositoryImpl) GetByIdEnvLevel(id int) (*ConfigMapEnvModel, error)
- func (impl ConfigMapRepositoryImpl) UpdateAppLevel(model *ConfigMapAppModel) (*ConfigMapAppModel, error)
- func (impl ConfigMapRepositoryImpl) UpdateEnvLevel(model *ConfigMapEnvModel) (*ConfigMapEnvModel, error)
- type EnvConfigOverride
- type EnvConfigOverrideRepository
- type EnvConfigOverrideRepositoryImpl
- func (r EnvConfigOverrideRepositoryImpl) ActiveEnvConfigOverride(appId, environmentId int) (*EnvConfigOverride, error)
- func (r EnvConfigOverrideRepositoryImpl) Delete(envConfigOverride *EnvConfigOverride) error
- func (r EnvConfigOverrideRepositoryImpl) FindChartByAppIdAndEnvIdAndChartRefId(appId, targetEnvironmentId int, chartRefId int) (*EnvConfigOverride, error)
- func (r EnvConfigOverrideRepositoryImpl) FindChartForAppByAppIdAndEnvId(appId, targetEnvironmentId int) (*EnvConfigOverride, error)
- func (r EnvConfigOverrideRepositoryImpl) FindLatestChartForAppByAppIdAndEnvId(appId, targetEnvironmentId int) (*EnvConfigOverride, error)
- func (r EnvConfigOverrideRepositoryImpl) Get(id int) (*EnvConfigOverride, error)
- func (r EnvConfigOverrideRepositoryImpl) GetByChartAndEnvironment(chartId, targetEnvironmentId int) (*EnvConfigOverride, error)
- func (r EnvConfigOverrideRepositoryImpl) GetByEnvironment(targetEnvironmentId int) ([]EnvConfigOverride, error)
- func (r EnvConfigOverrideRepositoryImpl) GetEnvConfigByChartId(chartId int) ([]EnvConfigOverride, error)
- func (r EnvConfigOverrideRepositoryImpl) Save(override *EnvConfigOverride) error
- func (r EnvConfigOverrideRepositoryImpl) SaveWithTxn(override *EnvConfigOverride, tx *pg.Tx) error
- func (r EnvConfigOverrideRepositoryImpl) Update(envConfigOverride *EnvConfigOverride) (*EnvConfigOverride, error)
- func (r EnvConfigOverrideRepositoryImpl) UpdateEnvConfigStatus(config *EnvConfigOverride) error
- func (r EnvConfigOverrideRepositoryImpl) UpdateProperties(config *EnvConfigOverride) error
- func (r EnvConfigOverrideRepositoryImpl) UpdateWithTxn(envConfigOverride *EnvConfigOverride, tx *pg.Tx) (*EnvConfigOverride, error)
- type PipelineConfigRepository
- type PipelineConfigRepositoryImpl
- func (impl PipelineConfigRepositoryImpl) Delete(pipelineStrategy *PipelineStrategy, tx *pg.Tx) error
- func (impl PipelineConfigRepositoryImpl) FindById(id int) (pipelineStrategy *PipelineStrategy, err error)
- func (impl PipelineConfigRepositoryImpl) FindByStrategy(strategy pipelineConfig.DeploymentTemplate) (pipelineStrategy *PipelineStrategy, err error)
- func (impl PipelineConfigRepositoryImpl) FindByStrategyAndPipelineId(strategy pipelineConfig.DeploymentTemplate, pipelineId int) (pipelineStrategy *PipelineStrategy, err error)
- func (impl PipelineConfigRepositoryImpl) GetAllStrategyByPipelineId(pipelineId int) ([]*PipelineStrategy, error)
- func (impl PipelineConfigRepositoryImpl) GetDefaultStrategyByPipelineId(pipelineId int) (pipelineStrategy *PipelineStrategy, err error)
- func (impl PipelineConfigRepositoryImpl) Save(pipelineStrategy *PipelineStrategy, tx *pg.Tx) error
- func (impl PipelineConfigRepositoryImpl) Update(pipelineStrategy *PipelineStrategy, tx *pg.Tx) error
- type PipelineOverride
- type PipelineOverrideRepository
- type PipelineOverrideRepositoryImpl
- func (impl PipelineOverrideRepositoryImpl) FindById(id int) (*PipelineOverride, error)
- func (impl PipelineOverrideRepositoryImpl) FindByPipelineTriggerGitHash(gitHash string) (pipelineOverride *PipelineOverride, err error)
- func (impl PipelineOverrideRepositoryImpl) GetAllRelease(appId, environmentId int) (pipelineOverrides []*PipelineOverride, err error)
- func (impl PipelineOverrideRepositoryImpl) GetByDeployedImage(appId, environmentId int, images []string) (pipelineOverride *PipelineOverride, err error)
- func (impl PipelineOverrideRepositoryImpl) GetByPipelineIdAndReleaseNo(pipelineId, releaseNo int) (pipelineOverrides []*PipelineOverride, err error)
- func (impl PipelineOverrideRepositoryImpl) GetCurrentPipelineReleaseCounter(pipelineId int) (releaseCounter int, err error)
- func (impl PipelineOverrideRepositoryImpl) GetLatestConfigByEnvironmentConfigOverrideId(envConfigOverrideId int) (pipelineOverride *PipelineOverride, err error)
- func (impl PipelineOverrideRepositoryImpl) GetLatestConfigByRequestIdentifier(requestIdentifier string) (pipelineOverride *PipelineOverride, err error)
- func (impl PipelineOverrideRepositoryImpl) GetLatestRelease(appId, environmentId int) (pipelineOverrides *PipelineOverride, err error)
- func (impl PipelineOverrideRepositoryImpl) GetLatestReleaseByPipelineIds(pipelineIds []int) (pipelineOverrides []*PipelineOverride, err error)
- func (impl PipelineOverrideRepositoryImpl) GetLatestReleaseDeploymentType(pipelineIds []int) ([]*PipelineOverride, error)
- func (impl PipelineOverrideRepositoryImpl) Save(pipelineOverride *PipelineOverride) error
- func (impl PipelineOverrideRepositoryImpl) Update(pipelineOverride *PipelineOverride) error
- func (impl PipelineOverrideRepositoryImpl) UpdateStatusByRequestIdentifier(requestId string, newStatus models.ChartStatus) (int, error)
- type PipelineStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chart ¶
type Chart struct { Id int `sql:"id,pk"` AppId int `sql:"app_id"` ChartRepoId int `sql:"chart_repo_id"` ChartName string `sql:"chart_name"` //use composite key as unique id ChartVersion string `sql:"chart_version"` ChartRepo string `sql:"chart_repo"` ChartRepoUrl string `sql:"chart_repo_url"` Values string `sql:"values_yaml"` //json format // used at for release. this should be always updated GlobalOverride string `sql:"global_override"` //json format // global overrides visible to user only ReleaseOverride string `sql:"release_override"` //json format //image descriptor template used for injecting tigger metadata injection PipelineOverride string `sql:"pipeline_override"` //json format // pipeline values -> strategy values Status models.ChartStatus `sql:"status"` //(new , deployment-in-progress, deployed-To-production, error ) Active bool `sql:"active"` GitRepoUrl string `sql:"git_repo_url"` //git repository where chart is stored ChartLocation string `sql:"chart_location"` //location within git repo where current chart is pointing ReferenceTemplate string `sql:"reference_template"` ImageDescriptorTemplate string `sql:"image_descriptor_template"` ChartRefId int `sql:"chart_ref_id"` Latest bool `sql:"latest,notnull"` Previous bool `sql:"previous,notnull"` models.AuditLog // contains filtered or unexported fields }
type ChartRefRepository ¶
type ChartRefRepositoryImpl ¶
type ChartRefRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewChartRefRepositoryImpl ¶
func NewChartRefRepositoryImpl(dbConnection *pg.DB) *ChartRefRepositoryImpl
func (ChartRefRepositoryImpl) FindById ¶
func (impl ChartRefRepositoryImpl) FindById(id int) (*ChartRef, error)
func (ChartRefRepositoryImpl) GetAll ¶
func (impl ChartRefRepositoryImpl) GetAll() ([]*ChartRef, error)
func (ChartRefRepositoryImpl) GetDefault ¶
func (impl ChartRefRepositoryImpl) GetDefault() (*ChartRef, error)
func (ChartRefRepositoryImpl) Save ¶
func (impl ChartRefRepositoryImpl) Save(chartRepo *ChartRef) error
type ChartRepo ¶
type ChartRepo struct { Id int `sql:"id,pk"` Name string `sql:"name"` Url string `sql:"url"` Active bool `sql:"active,notnull"` Default bool `sql:"is_default,notnull"` UserName string `sql:"user_name"` Password string `sql:"password"` SshKey string `sql:"ssh_key"` AccessToken string `sql:"access_token"` AuthMode repository.AuthMode `sql:"auth_mode,notnull"` External bool `sql:"external,notnull"` models.AuditLog // contains filtered or unexported fields }
type ChartRepoRepository ¶
type ChartRepoRepositoryImpl ¶
type ChartRepoRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewChartRepoRepositoryImpl ¶
func NewChartRepoRepositoryImpl(dbConnection *pg.DB) *ChartRepoRepositoryImpl
func (ChartRepoRepositoryImpl) FindAll ¶
func (impl ChartRepoRepositoryImpl) FindAll() ([]*ChartRepo, error)
func (ChartRepoRepositoryImpl) FindById ¶
func (impl ChartRepoRepositoryImpl) FindById(id int) (*ChartRepo, error)
func (ChartRepoRepositoryImpl) GetConnection ¶
func (impl ChartRepoRepositoryImpl) GetConnection() *pg.DB
func (ChartRepoRepositoryImpl) GetDefault ¶
func (impl ChartRepoRepositoryImpl) GetDefault() (*ChartRepo, error)
type ChartRepository ¶
type ChartRepository interface { //ChartReleasedToProduction(chartRepo, appName, chartVersion string) (bool, error) FindOne(chartRepo, appName, chartVersion string) (*Chart, error) Save(*Chart) error FindCurrentChartVersion(chartRepo, chartName, chartVersionPattern string) (string, error) FindActiveChart(appId int) (chart *Chart, err error) FindLatestByAppId(appId int) (chart *Chart, err error) FindById(id int) (chart *Chart, err error) Update(chart *Chart) error FindActiveChartsByAppId(appId int) (charts []*Chart, err error) FindLatestChartForAppByAppId(appId int) (chart *Chart, err error) FindChartByAppIdAndRefId(appId int, chartRefId int) (chart *Chart, err error) FindNoLatestChartForAppByAppId(appId int) ([]*Chart, error) FindPreviousChartByAppId(appId int) (chart *Chart, err error) }
type ChartRepositoryImpl ¶
type ChartRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewChartRepository ¶
func NewChartRepository(dbConnection *pg.DB) *ChartRepositoryImpl
func (ChartRepositoryImpl) FindActiveChart ¶
func (repositoryImpl ChartRepositoryImpl) FindActiveChart(appId int) (chart *Chart, err error)
Deprecated
func (ChartRepositoryImpl) FindActiveChartsByAppId ¶
func (repositoryImpl ChartRepositoryImpl) FindActiveChartsByAppId(appId int) (charts []*Chart, err error)
func (ChartRepositoryImpl) FindById ¶
func (repositoryImpl ChartRepositoryImpl) FindById(id int) (chart *Chart, err error)
func (ChartRepositoryImpl) FindChartByAppIdAndRefId ¶
func (repositoryImpl ChartRepositoryImpl) FindChartByAppIdAndRefId(appId int, chartRefId int) (chart *Chart, err error)
func (ChartRepositoryImpl) FindCurrentChartVersion ¶
func (repositoryImpl ChartRepositoryImpl) FindCurrentChartVersion(chartRepo, chartName, chartVersionPattern string) (string, error)
func (ChartRepositoryImpl) FindLatestByAppId ¶
func (repositoryImpl ChartRepositoryImpl) FindLatestByAppId(appId int) (chart *Chart, err error)
Deprecated
func (ChartRepositoryImpl) FindLatestChartForAppByAppId ¶
func (repositoryImpl ChartRepositoryImpl) FindLatestChartForAppByAppId(appId int) (chart *Chart, err error)
func (ChartRepositoryImpl) FindLatestChartForAppByAppIdAndEnvId ¶
func (repositoryImpl ChartRepositoryImpl) FindLatestChartForAppByAppIdAndEnvId(appId int, envId int) (chart *Chart, err error)
func (ChartRepositoryImpl) FindNoLatestChartForAppByAppId ¶
func (repositoryImpl ChartRepositoryImpl) FindNoLatestChartForAppByAppId(appId int) ([]*Chart, error)
func (ChartRepositoryImpl) FindOne ¶
func (repositoryImpl ChartRepositoryImpl) FindOne(chartRepo, chartName, chartVersion string) (*Chart, error)
func (ChartRepositoryImpl) FindPreviousChartByAppId ¶
func (repositoryImpl ChartRepositoryImpl) FindPreviousChartByAppId(appId int) (chart *Chart, err error)
func (ChartRepositoryImpl) Save ¶
func (repositoryImpl ChartRepositoryImpl) Save(chart *Chart) error
func (ChartRepositoryImpl) Update ¶
func (repositoryImpl ChartRepositoryImpl) Update(chart *Chart) error
type ConfigMapAppModel ¶
type ConfigMapEnvModel ¶
type ConfigMapEnvModel struct { TableName struct{} `sql:"config_map_env_level" pg:",discard_unknown_columns"` Id int `sql:"id,pk"` AppId int `sql:"app_id,notnull"` EnvironmentId int `sql:"environment_id,notnull"` ConfigMapData string `sql:"config_map_data"` SecretData string `sql:"secret_data"` models.AuditLog }
type ConfigMapRepository ¶
type ConfigMapRepository interface { CreateAppLevel(model *ConfigMapAppModel) (*ConfigMapAppModel, error) GetByIdAppLevel(id int) (*ConfigMapAppModel, error) GetAllAppLevel() ([]ConfigMapAppModel, error) UpdateAppLevel(model *ConfigMapAppModel) (*ConfigMapAppModel, error) CreateEnvLevel(model *ConfigMapEnvModel) (*ConfigMapEnvModel, error) GetByIdEnvLevel(id int) (*ConfigMapEnvModel, error) GetAllEnvLevel() ([]ConfigMapEnvModel, error) UpdateEnvLevel(model *ConfigMapEnvModel) (*ConfigMapEnvModel, error) GetByAppIdAppLevel(appId int) (*ConfigMapAppModel, error) GetByAppIdAndEnvIdEnvLevel(appId int, envId int) (*ConfigMapEnvModel, error) }
type ConfigMapRepositoryImpl ¶
type ConfigMapRepositoryImpl struct { Logger *zap.SugaredLogger // contains filtered or unexported fields }
func NewConfigMapRepositoryImpl ¶
func NewConfigMapRepositoryImpl(Logger *zap.SugaredLogger, dbConnection *pg.DB) *ConfigMapRepositoryImpl
func (ConfigMapRepositoryImpl) CreateAppLevel ¶
func (impl ConfigMapRepositoryImpl) CreateAppLevel(model *ConfigMapAppModel) (*ConfigMapAppModel, error)
func (ConfigMapRepositoryImpl) CreateEnvLevel ¶
func (impl ConfigMapRepositoryImpl) CreateEnvLevel(model *ConfigMapEnvModel) (*ConfigMapEnvModel, error)
func (ConfigMapRepositoryImpl) GetAllAppLevel ¶
func (impl ConfigMapRepositoryImpl) GetAllAppLevel() ([]ConfigMapAppModel, error)
func (ConfigMapRepositoryImpl) GetAllEnvLevel ¶
func (impl ConfigMapRepositoryImpl) GetAllEnvLevel() ([]ConfigMapEnvModel, error)
func (ConfigMapRepositoryImpl) GetByAppIdAndEnvIdEnvLevel ¶
func (impl ConfigMapRepositoryImpl) GetByAppIdAndEnvIdEnvLevel(appId int, envId int) (*ConfigMapEnvModel, error)
func (ConfigMapRepositoryImpl) GetByAppIdAppLevel ¶
func (impl ConfigMapRepositoryImpl) GetByAppIdAppLevel(appId int) (*ConfigMapAppModel, error)
func (ConfigMapRepositoryImpl) GetByIdAppLevel ¶
func (impl ConfigMapRepositoryImpl) GetByIdAppLevel(id int) (*ConfigMapAppModel, error)
func (ConfigMapRepositoryImpl) GetByIdEnvLevel ¶
func (impl ConfigMapRepositoryImpl) GetByIdEnvLevel(id int) (*ConfigMapEnvModel, error)
func (ConfigMapRepositoryImpl) UpdateAppLevel ¶
func (impl ConfigMapRepositoryImpl) UpdateAppLevel(model *ConfigMapAppModel) (*ConfigMapAppModel, error)
func (ConfigMapRepositoryImpl) UpdateEnvLevel ¶
func (impl ConfigMapRepositoryImpl) UpdateEnvLevel(model *ConfigMapEnvModel) (*ConfigMapEnvModel, error)
type EnvConfigOverride ¶
type EnvConfigOverride struct { Id int `sql:"id,pk"` ChartId int `sql:"chart_id,notnull"` TargetEnvironment int `sql:"target_environment,notnull"` //target environment EnvOverrideValues string `sql:"env_override_yaml,notnull"` Status models.ChartStatus `sql:"status,notnull"` //new, deployment-in-progress, error, rollbacked, su ManualReviewed bool `sql:"reviewed,notnull"` Active bool `sql:"active,notnull"` Namespace string `sql:"namespace,notnull"` Chart *Chart Environment *cluster.Environment `sql:"-"` Latest bool `sql:"latest,notnull"` Previous bool `sql:"previous,notnull"` IsOverride bool `sql:"is_override,notnull"` models.AuditLog // contains filtered or unexported fields }
type EnvConfigOverrideRepository ¶
type EnvConfigOverrideRepository interface { Save(*EnvConfigOverride) error GetByChartAndEnvironment(chartId, targetEnvironmentId int) (*EnvConfigOverride, error) ActiveEnvConfigOverride(appId, environmentId int) (*EnvConfigOverride, error) //successful env config Get(id int) (*EnvConfigOverride, error) //this api updates only EnvOverrideValues, EnvMergedValues, Status, ManualReviewed, active based on id UpdateProperties(config *EnvConfigOverride) error GetByEnvironment(targetEnvironmentId int) ([]EnvConfigOverride, error) GetEnvConfigByChartId(chartId int) ([]EnvConfigOverride, error) UpdateEnvConfigStatus(config *EnvConfigOverride) error Delete(envConfigOverride *EnvConfigOverride) error FindLatestChartForAppByAppIdAndEnvId(appId, targetEnvironmentId int) (*EnvConfigOverride, error) FindChartByAppIdAndEnvIdAndChartRefId(appId, targetEnvironmentId int, chartRefId int) (*EnvConfigOverride, error) Update(envConfigOverride *EnvConfigOverride) (*EnvConfigOverride, error) FindChartForAppByAppIdAndEnvId(appId, targetEnvironmentId int) (*EnvConfigOverride, error) SaveWithTxn(model *EnvConfigOverride, tx *pg.Tx) error UpdateWithTxn(envConfigOverride *EnvConfigOverride, tx *pg.Tx) (*EnvConfigOverride, error) }
type EnvConfigOverrideRepositoryImpl ¶
type EnvConfigOverrideRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewEnvConfigOverrideRepository ¶
func NewEnvConfigOverrideRepository(dbConnection *pg.DB) *EnvConfigOverrideRepositoryImpl
func (EnvConfigOverrideRepositoryImpl) ActiveEnvConfigOverride ¶
func (r EnvConfigOverrideRepositoryImpl) ActiveEnvConfigOverride(appId, environmentId int) (*EnvConfigOverride, error)
func (EnvConfigOverrideRepositoryImpl) Delete ¶
func (r EnvConfigOverrideRepositoryImpl) Delete(envConfigOverride *EnvConfigOverride) error
func (EnvConfigOverrideRepositoryImpl) FindChartByAppIdAndEnvIdAndChartRefId ¶
func (r EnvConfigOverrideRepositoryImpl) FindChartByAppIdAndEnvIdAndChartRefId(appId, targetEnvironmentId int, chartRefId int) (*EnvConfigOverride, error)
func (EnvConfigOverrideRepositoryImpl) FindChartForAppByAppIdAndEnvId ¶
func (r EnvConfigOverrideRepositoryImpl) FindChartForAppByAppIdAndEnvId(appId, targetEnvironmentId int) (*EnvConfigOverride, error)
func (EnvConfigOverrideRepositoryImpl) FindLatestChartForAppByAppIdAndEnvId ¶
func (r EnvConfigOverrideRepositoryImpl) FindLatestChartForAppByAppIdAndEnvId(appId, targetEnvironmentId int) (*EnvConfigOverride, error)
func (EnvConfigOverrideRepositoryImpl) Get ¶
func (r EnvConfigOverrideRepositoryImpl) Get(id int) (*EnvConfigOverride, error)
func (EnvConfigOverrideRepositoryImpl) GetByChartAndEnvironment ¶
func (r EnvConfigOverrideRepositoryImpl) GetByChartAndEnvironment(chartId, targetEnvironmentId int) (*EnvConfigOverride, error)
func (EnvConfigOverrideRepositoryImpl) GetByEnvironment ¶
func (r EnvConfigOverrideRepositoryImpl) GetByEnvironment(targetEnvironmentId int) ([]EnvConfigOverride, error)
func (EnvConfigOverrideRepositoryImpl) GetEnvConfigByChartId ¶
func (r EnvConfigOverrideRepositoryImpl) GetEnvConfigByChartId(chartId int) ([]EnvConfigOverride, error)
func (EnvConfigOverrideRepositoryImpl) Save ¶
func (r EnvConfigOverrideRepositoryImpl) Save(override *EnvConfigOverride) error
func (EnvConfigOverrideRepositoryImpl) SaveWithTxn ¶ added in v0.2.27
func (r EnvConfigOverrideRepositoryImpl) SaveWithTxn(override *EnvConfigOverride, tx *pg.Tx) error
func (EnvConfigOverrideRepositoryImpl) Update ¶
func (r EnvConfigOverrideRepositoryImpl) Update(envConfigOverride *EnvConfigOverride) (*EnvConfigOverride, error)
func (EnvConfigOverrideRepositoryImpl) UpdateEnvConfigStatus ¶
func (r EnvConfigOverrideRepositoryImpl) UpdateEnvConfigStatus(config *EnvConfigOverride) error
func (EnvConfigOverrideRepositoryImpl) UpdateProperties ¶
func (r EnvConfigOverrideRepositoryImpl) UpdateProperties(config *EnvConfigOverride) error
this api updates only EnvOverrideValues, EnvMergedValues, Status, ManualReviewed, active based on id
func (EnvConfigOverrideRepositoryImpl) UpdateWithTxn ¶ added in v0.2.27
func (r EnvConfigOverrideRepositoryImpl) UpdateWithTxn(envConfigOverride *EnvConfigOverride, tx *pg.Tx) (*EnvConfigOverride, error)
type PipelineConfigRepository ¶
type PipelineConfigRepository interface { Save(pipelineStrategy *PipelineStrategy, tx *pg.Tx) error Update(pipelineStrategy *PipelineStrategy, tx *pg.Tx) error FindById(id int) (chart *PipelineStrategy, err error) FindByStrategy(strategy pipelineConfig.DeploymentTemplate) (pipelineStrategy *PipelineStrategy, err error) FindByStrategyAndPipelineId(strategy pipelineConfig.DeploymentTemplate, pipelineId int) (pipelineStrategy *PipelineStrategy, err error) GetAllStrategyByPipelineId(pipelineId int) ([]*PipelineStrategy, error) GetDefaultStrategyByPipelineId(pipelineId int) (pipelineStrategy *PipelineStrategy, err error) Delete(pipelineStrategy *PipelineStrategy, tx *pg.Tx) error }
type PipelineConfigRepositoryImpl ¶
type PipelineConfigRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewPipelineConfigRepository ¶
func NewPipelineConfigRepository(dbConnection *pg.DB) *PipelineConfigRepositoryImpl
func (PipelineConfigRepositoryImpl) Delete ¶
func (impl PipelineConfigRepositoryImpl) Delete(pipelineStrategy *PipelineStrategy, tx *pg.Tx) error
func (PipelineConfigRepositoryImpl) FindById ¶
func (impl PipelineConfigRepositoryImpl) FindById(id int) (pipelineStrategy *PipelineStrategy, err error)
func (PipelineConfigRepositoryImpl) FindByStrategy ¶
func (impl PipelineConfigRepositoryImpl) FindByStrategy(strategy pipelineConfig.DeploymentTemplate) (pipelineStrategy *PipelineStrategy, err error)
func (PipelineConfigRepositoryImpl) FindByStrategyAndPipelineId ¶
func (impl PipelineConfigRepositoryImpl) FindByStrategyAndPipelineId(strategy pipelineConfig.DeploymentTemplate, pipelineId int) (pipelineStrategy *PipelineStrategy, err error)
func (PipelineConfigRepositoryImpl) GetAllStrategyByPipelineId ¶
func (impl PipelineConfigRepositoryImpl) GetAllStrategyByPipelineId(pipelineId int) ([]*PipelineStrategy, error)
it will return for multiple pipeline config for pipeline, per pipeline single pipeline config(blue green, canary)
func (PipelineConfigRepositoryImpl) GetDefaultStrategyByPipelineId ¶
func (impl PipelineConfigRepositoryImpl) GetDefaultStrategyByPipelineId(pipelineId int) (pipelineStrategy *PipelineStrategy, err error)
it will return single latest pipeline config for requested pipeline
func (PipelineConfigRepositoryImpl) Save ¶
func (impl PipelineConfigRepositoryImpl) Save(pipelineStrategy *PipelineStrategy, tx *pg.Tx) error
func (PipelineConfigRepositoryImpl) Update ¶
func (impl PipelineConfigRepositoryImpl) Update(pipelineStrategy *PipelineStrategy, tx *pg.Tx) error
type PipelineOverride ¶
type PipelineOverride struct { Id int `sql:"id,pk"` RequestIdentifier string `sql:"request_identifier,unique,notnull"` EnvConfigOverrideId int `sql:"env_config_override_id, notnull"` PipelineOverrideValues string `sql:"pipeline_override_yaml,notnull"` PipelineMergedValues string `sql:"merged_values_yaml, notnull"` //merge of appOverride, envOverride, pipelineOverride Status models.ChartStatus `sql:"status,notnull"` // new , deployment-in-progress, success, rollbacked GitHash string `sql:"git_hash"` PipelineId int `sql:"pipeline_id"` CiArtifactId int `sql:"ci_artifact_id"` PipelineReleaseCounter int `sql:"pipeline_release_counter"` //built index CdWorkflowId int `sql:"cd_workflow_id"` //built index DeploymentType models.DeploymentType `sql:"deployment_type"` // deployment type models.AuditLog EnvConfigOverride *EnvConfigOverride CiArtifact *repository.CiArtifact Pipeline *pipelineConfig.Pipeline // contains filtered or unexported fields }
type PipelineOverrideRepository ¶
type PipelineOverrideRepository interface { Save(*PipelineOverride) error UpdateStatusByRequestIdentifier(requestId string, newStatus models.ChartStatus) (int, error) GetLatestConfigByRequestIdentifier(requestIdentifier string) (pipelineOverride *PipelineOverride, err error) GetLatestConfigByEnvironmentConfigOverrideId(envConfigOverrideId int) (pipelineOverride *PipelineOverride, err error) Update(pipelineOverride *PipelineOverride) error GetCurrentPipelineReleaseCounter(pipelineId int) (releaseCounter int, err error) GetByPipelineIdAndReleaseNo(pipelineId, releaseNo int) (pipelineOverrides []*PipelineOverride, err error) GetAllRelease(appId, environmentId int) (pipelineOverrides []*PipelineOverride, err error) FindByPipelineTriggerGitHash(gitHash string) (pipelineOverride *PipelineOverride, err error) GetLatestRelease(appId, environmentId int) (pipelineOverrides *PipelineOverride, err error) FindById(id int) (*PipelineOverride, error) GetByDeployedImage(appId, environmentId int, images []string) (pipelineOverride *PipelineOverride, err error) GetLatestReleaseByPipelineIds(pipelineIds []int) (pipelineOverrides []*PipelineOverride, err error) GetLatestReleaseDeploymentType(pipelineIds []int) ([]*PipelineOverride, error) }
type PipelineOverrideRepositoryImpl ¶
type PipelineOverrideRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewPipelineOverrideRepository ¶
func NewPipelineOverrideRepository(dbConnection *pg.DB) *PipelineOverrideRepositoryImpl
func (PipelineOverrideRepositoryImpl) FindById ¶
func (impl PipelineOverrideRepositoryImpl) FindById(id int) (*PipelineOverride, error)
func (PipelineOverrideRepositoryImpl) FindByPipelineTriggerGitHash ¶
func (impl PipelineOverrideRepositoryImpl) FindByPipelineTriggerGitHash(gitHash string) (pipelineOverride *PipelineOverride, err error)
func (PipelineOverrideRepositoryImpl) GetAllRelease ¶
func (impl PipelineOverrideRepositoryImpl) GetAllRelease(appId, environmentId int) (pipelineOverrides []*PipelineOverride, err error)
func (PipelineOverrideRepositoryImpl) GetByDeployedImage ¶
func (impl PipelineOverrideRepositoryImpl) GetByDeployedImage(appId, environmentId int, images []string) (pipelineOverride *PipelineOverride, err error)
func (PipelineOverrideRepositoryImpl) GetByPipelineIdAndReleaseNo ¶
func (impl PipelineOverrideRepositoryImpl) GetByPipelineIdAndReleaseNo(pipelineId, releaseNo int) (pipelineOverrides []*PipelineOverride, err error)
func (PipelineOverrideRepositoryImpl) GetCurrentPipelineReleaseCounter ¶
func (impl PipelineOverrideRepositoryImpl) GetCurrentPipelineReleaseCounter(pipelineId int) (releaseCounter int, err error)
func (PipelineOverrideRepositoryImpl) GetLatestConfigByEnvironmentConfigOverrideId ¶
func (impl PipelineOverrideRepositoryImpl) GetLatestConfigByEnvironmentConfigOverrideId(envConfigOverrideId int) (pipelineOverride *PipelineOverride, err error)
func (PipelineOverrideRepositoryImpl) GetLatestConfigByRequestIdentifier ¶
func (impl PipelineOverrideRepositoryImpl) GetLatestConfigByRequestIdentifier(requestIdentifier string) (pipelineOverride *PipelineOverride, err error)
func (PipelineOverrideRepositoryImpl) GetLatestRelease ¶
func (impl PipelineOverrideRepositoryImpl) GetLatestRelease(appId, environmentId int) (pipelineOverrides *PipelineOverride, err error)
func (PipelineOverrideRepositoryImpl) GetLatestReleaseByPipelineIds ¶
func (impl PipelineOverrideRepositoryImpl) GetLatestReleaseByPipelineIds(pipelineIds []int) (pipelineOverrides []*PipelineOverride, err error)
func (PipelineOverrideRepositoryImpl) GetLatestReleaseDeploymentType ¶
func (impl PipelineOverrideRepositoryImpl) GetLatestReleaseDeploymentType(pipelineIds []int) ([]*PipelineOverride, error)
func (PipelineOverrideRepositoryImpl) Save ¶
func (impl PipelineOverrideRepositoryImpl) Save(pipelineOverride *PipelineOverride) error
func (PipelineOverrideRepositoryImpl) Update ¶
func (impl PipelineOverrideRepositoryImpl) Update(pipelineOverride *PipelineOverride) error
func (PipelineOverrideRepositoryImpl) UpdateStatusByRequestIdentifier ¶
func (impl PipelineOverrideRepositoryImpl) UpdateStatusByRequestIdentifier(requestId string, newStatus models.ChartStatus) (int, error)
type PipelineStrategy ¶
type PipelineStrategy struct { Id int `sql:"id,pk"` PipelineId int `sql:"pipeline_id"` Strategy pipelineConfig.DeploymentTemplate `sql:"strategy,notnull"` Config string `sql:"config"` Default bool `sql:"default,notnull"` Deleted bool `sql:"deleted,notnull"` models.AuditLog // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.