history

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 29 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllHistoryWireSet = wire.NewSet()

Functions

This section is empty.

Types

type CiPipelineHistoryService added in v0.6.8

type CiPipelineHistoryService interface {
	SaveHistory(pipeline *pipelineConfig.CiPipeline, CiPipelineMaterial []*pipelineConfig.CiPipelineMaterial, ciTemplateBean *bean.CiTemplateBean, Trigger string) error
}

type CiPipelineHistoryServiceImpl added in v0.6.8

type CiPipelineHistoryServiceImpl struct {
	CiPipelineHistoryRepository repository.CiPipelineHistoryRepository
	// contains filtered or unexported fields
}

func NewCiPipelineHistoryServiceImpl added in v0.6.8

func NewCiPipelineHistoryServiceImpl(CiPipelineHistoryRepository repository.CiPipelineHistoryRepository,
	logger *zap.SugaredLogger, ciPipelineRepository pipelineConfig.CiPipelineRepository) *CiPipelineHistoryServiceImpl

func (*CiPipelineHistoryServiceImpl) SaveHistory added in v0.6.8

func (impl *CiPipelineHistoryServiceImpl) SaveHistory(pipeline *pipelineConfig.CiPipeline, CiPipelineMaterial []*pipelineConfig.CiPipelineMaterial, CiTemplateBean *bean.CiTemplateBean, Trigger string) error

type CiTemplateHistoryService added in v0.6.8

type CiTemplateHistoryService interface {
	SaveHistory(material *bean.CiTemplateBean, trigger string) error
}

type CiTemplateHistoryServiceImpl added in v0.6.8

type CiTemplateHistoryServiceImpl struct {
	CiTemplateHistoryRepository repository.CiTemplateHistoryRepository
	// contains filtered or unexported fields
}

func NewCiTemplateHistoryServiceImpl added in v0.6.8

func NewCiTemplateHistoryServiceImpl(CiTemplateHistoryRepository repository.CiTemplateHistoryRepository,
	logger *zap.SugaredLogger) *CiTemplateHistoryServiceImpl

func (CiTemplateHistoryServiceImpl) SaveHistory added in v0.6.8

func (impl CiTemplateHistoryServiceImpl) SaveHistory(ciTemplateBean *bean.CiTemplateBean, trigger string) error

type DeployedConfigurationHistoryService added in v0.4.4

type DeployedConfigurationHistoryService interface {
	//TODO: rethink if the below method right at this place
	CreateHistoriesForDeploymentTrigger(ctx context.Context, pipeline *pipelineConfig.Pipeline, strategy *chartConfig.PipelineStrategy, envOverride *bean2.EnvConfigOverride, deployedOn time.Time, deployedBy int32) error

	GetDeployedConfigurationByWfrId(ctx context.Context, pipelineId, wfrId int) ([]*bean3.DeploymentConfigurationDto, error)
	GetDeployedHistoryComponentList(pipelineId, baseConfigId int, historyComponent, historyComponentName string) ([]*bean3.DeployedHistoryComponentMetadataDto, error)
	GetDeployedHistoryComponentDetail(ctx context.Context, pipelineId, id int, historyComponent, historyComponentName string, userHasAdminAccess bool) (*bean3.HistoryDetailDto, error)
	GetAllDeployedConfigurationByPipelineIdAndLatestWfrId(ctx context.Context, pipelineId int, userHasAdminAccess bool) (*bean3.AllDeploymentConfigurationDetail, error)
	GetAllDeployedConfigurationByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int, userHasAdminAccess bool) (*bean3.AllDeploymentConfigurationDetail, error)
	GetLatestDeployedArtifactByPipelineId(pipelineId int) (*repository2.CiArtifact, error)
}

TODO: Prakash, merge this interface with interface in deployment/manifest/deploymentTemplate/DeploymentTemplateHistoryService.go and extract out read logic in read repo

type DeployedConfigurationHistoryServiceImpl added in v0.4.4

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

func NewDeployedConfigurationHistoryServiceImpl added in v0.4.4

func NewDeployedConfigurationHistoryServiceImpl(logger *zap.SugaredLogger,
	userService user.UserService, deploymentTemplateHistoryService deploymentTemplate.DeploymentTemplateHistoryService,
	strategyHistoryService PipelineStrategyHistoryService, configMapHistoryService configMapAndSecret.ConfigMapHistoryService,
	cdWorkflowRepository pipelineConfig.CdWorkflowRepository,
	scopedVariableManager variables.ScopedVariableCMCSManager,
	deploymentTemplateHistoryReadService read.DeploymentTemplateHistoryReadService,
	configMapHistoryReadService read2.ConfigMapHistoryReadService,
) *DeployedConfigurationHistoryServiceImpl

func (*DeployedConfigurationHistoryServiceImpl) CreateHistoriesForDeploymentTrigger added in v0.6.29

func (impl *DeployedConfigurationHistoryServiceImpl) CreateHistoriesForDeploymentTrigger(ctx context.Context, pipeline *pipelineConfig.Pipeline, strategy *chartConfig.PipelineStrategy, envOverride *bean2.EnvConfigOverride, deployedOn time.Time, deployedBy int32) error

func (*DeployedConfigurationHistoryServiceImpl) GetAllDeployedConfigurationByPipelineIdAndLatestWfrId added in v0.6.2

func (impl *DeployedConfigurationHistoryServiceImpl) GetAllDeployedConfigurationByPipelineIdAndLatestWfrId(ctx context.Context, pipelineId int, userHasAdminAccess bool) (*bean3.AllDeploymentConfigurationDetail, error)

func (*DeployedConfigurationHistoryServiceImpl) GetAllDeployedConfigurationByPipelineIdAndWfrId added in v0.6.2

func (impl *DeployedConfigurationHistoryServiceImpl) GetAllDeployedConfigurationByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int, userHasAdminAccess bool) (*bean3.AllDeploymentConfigurationDetail, error)

func (*DeployedConfigurationHistoryServiceImpl) GetDeployedConfigurationByWfrId added in v0.4.4

func (impl *DeployedConfigurationHistoryServiceImpl) GetDeployedConfigurationByWfrId(ctx context.Context, pipelineId, wfrId int) ([]*bean3.DeploymentConfigurationDto, error)

func (*DeployedConfigurationHistoryServiceImpl) GetDeployedHistoryComponentDetail added in v0.4.4

func (impl *DeployedConfigurationHistoryServiceImpl) GetDeployedHistoryComponentDetail(ctx context.Context, pipelineId, id int, historyComponent, historyComponentName string, userHasAdminAccess bool) (*bean3.HistoryDetailDto, error)

func (*DeployedConfigurationHistoryServiceImpl) GetDeployedHistoryComponentList added in v0.4.4

func (impl *DeployedConfigurationHistoryServiceImpl) GetDeployedHistoryComponentList(pipelineId, baseConfigId int, historyComponent, historyComponentName string) ([]*bean3.DeployedHistoryComponentMetadataDto, error)

func (*DeployedConfigurationHistoryServiceImpl) GetLatestDeployedArtifactByPipelineId added in v0.6.26

func (impl *DeployedConfigurationHistoryServiceImpl) GetLatestDeployedArtifactByPipelineId(pipelineId int) (*repository2.CiArtifact, error)

type GitMaterialHistoryService added in v0.6.8

type GitMaterialHistoryService interface {
	CreateMaterialHistory(tx *pg.Tx, inputMaterial *repository2.GitMaterial) error
	CreateDeleteMaterialHistory(materials []*repository2.GitMaterial) error
	MarkMaterialDeletedAndCreateHistory(tx *pg.Tx, material *repository2.GitMaterial) error
}

type GitMaterialHistoryServiceImpl added in v0.6.8

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

func NewGitMaterialHistoryServiceImpl added in v0.6.8

func NewGitMaterialHistoryServiceImpl(gitMaterialHistoryRepository repository.GitMaterialHistoryRepository,
	logger *zap.SugaredLogger) *GitMaterialHistoryServiceImpl

func (GitMaterialHistoryServiceImpl) CreateDeleteMaterialHistory added in v0.6.8

func (impl GitMaterialHistoryServiceImpl) CreateDeleteMaterialHistory(materials []*repository2.GitMaterial) error

func (GitMaterialHistoryServiceImpl) CreateMaterialHistory added in v0.6.8

func (impl GitMaterialHistoryServiceImpl) CreateMaterialHistory(tx *pg.Tx, inputMaterial *repository2.GitMaterial) error

func (GitMaterialHistoryServiceImpl) MarkMaterialDeletedAndCreateHistory added in v0.6.8

func (impl GitMaterialHistoryServiceImpl) MarkMaterialDeletedAndCreateHistory(tx *pg.Tx, material *repository2.GitMaterial) error

type PipelineStrategyHistoryService

type PipelineStrategyHistoryService interface {
	CreatePipelineStrategyHistory(pipelineStrategy *chartConfig.PipelineStrategy, pipelineTriggerType pipelineConfig.TriggerType, tx *pg.Tx) (historyModel *repository.PipelineStrategyHistory, err error)
	CreateStrategyHistoryForDeploymentTrigger(strategy *chartConfig.PipelineStrategy, deployedOn time.Time, deployedBy int32, pipelineTriggerType pipelineConfig.TriggerType) error
	GetDeploymentDetailsForDeployedStrategyHistory(pipelineId int) ([]*bean.PipelineStrategyHistoryDto, error)

	GetHistoryForDeployedStrategyById(id, pipelineId int) (*bean.HistoryDetailDto, error)
	CheckIfHistoryExistsForPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int) (historyId int, exists bool, err error)
	CheckIfTriggerHistoryExistsForPipelineIdOnTime(pipelineId int, deployedOn time.Time) (exists bool, err error)
	GetDeployedHistoryList(pipelineId, baseConfigId int) ([]*bean.DeployedHistoryComponentMetadataDto, error)
	GetLatestDeployedHistoryByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int) (*bean.HistoryDetailDto, error)
}

type PipelineStrategyHistoryServiceImpl

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

func NewPipelineStrategyHistoryServiceImpl

func NewPipelineStrategyHistoryServiceImpl(logger *zap.SugaredLogger,
	pipelineStrategyHistoryRepository repository.PipelineStrategyHistoryRepository,
	userService user.UserService) *PipelineStrategyHistoryServiceImpl

func (PipelineStrategyHistoryServiceImpl) CheckIfHistoryExistsForPipelineIdAndWfrId added in v0.4.4

func (impl PipelineStrategyHistoryServiceImpl) CheckIfHistoryExistsForPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int) (historyId int, exists bool, err error)

func (PipelineStrategyHistoryServiceImpl) CheckIfTriggerHistoryExistsForPipelineIdOnTime added in v0.7.1

func (impl PipelineStrategyHistoryServiceImpl) CheckIfTriggerHistoryExistsForPipelineIdOnTime(pipelineId int, deployedOn time.Time) (exists bool, err error)

func (PipelineStrategyHistoryServiceImpl) CreatePipelineStrategyHistory

func (impl PipelineStrategyHistoryServiceImpl) CreatePipelineStrategyHistory(pipelineStrategy *chartConfig.PipelineStrategy, pipelineTriggerType pipelineConfig.TriggerType, tx *pg.Tx) (historyModel *repository.PipelineStrategyHistory, err error)

func (PipelineStrategyHistoryServiceImpl) CreateStrategyHistoryForDeploymentTrigger

func (impl PipelineStrategyHistoryServiceImpl) CreateStrategyHistoryForDeploymentTrigger(pipelineStrategy *chartConfig.PipelineStrategy, deployedOn time.Time, deployedBy int32, pipelineTriggerType pipelineConfig.TriggerType) error

func (PipelineStrategyHistoryServiceImpl) GetDeployedHistoryList added in v0.4.4

func (impl PipelineStrategyHistoryServiceImpl) GetDeployedHistoryList(pipelineId, baseConfigId int) ([]*bean.DeployedHistoryComponentMetadataDto, error)

func (PipelineStrategyHistoryServiceImpl) GetDeploymentDetailsForDeployedStrategyHistory

func (impl PipelineStrategyHistoryServiceImpl) GetDeploymentDetailsForDeployedStrategyHistory(pipelineId int) ([]*bean.PipelineStrategyHistoryDto, error)

func (PipelineStrategyHistoryServiceImpl) GetHistoryForDeployedStrategyById

func (impl PipelineStrategyHistoryServiceImpl) GetHistoryForDeployedStrategyById(id, pipelineId int) (*bean.HistoryDetailDto, error)

func (PipelineStrategyHistoryServiceImpl) GetLatestDeployedHistoryByPipelineIdAndWfrId added in v0.6.2

func (impl PipelineStrategyHistoryServiceImpl) GetLatestDeployedHistoryByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int) (*bean.HistoryDetailDto, error)

type PrePostCdScriptHistoryService

type PrePostCdScriptHistoryService interface {
	CreatePrePostCdScriptHistory(pipeline *pipelineConfig.Pipeline, tx *pg.Tx, stage repository.CdStageType, deployed bool, deployedBy int32, deployedOn time.Time) error
	GetHistoryForDeployedPrePostCdScript(pipelineId int, stage repository.CdStageType) ([]*bean2.PrePostCdScriptHistoryDto, error)
}

type PrePostCdScriptHistoryServiceImpl

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

func NewPrePostCdScriptHistoryServiceImpl

func NewPrePostCdScriptHistoryServiceImpl(logger *zap.SugaredLogger, prePostCdScriptHistoryRepository repository.PrePostCdScriptHistoryRepository,
	configMapRepository chartConfig.ConfigMapRepository, configMapHistoryService configMapAndSecret.ConfigMapHistoryService) *PrePostCdScriptHistoryServiceImpl

func (PrePostCdScriptHistoryServiceImpl) CreatePrePostCdScriptHistory

func (impl PrePostCdScriptHistoryServiceImpl) CreatePrePostCdScriptHistory(pipeline *pipelineConfig.Pipeline, tx *pg.Tx, stage repository.CdStageType, deployed bool, deployedBy int32, deployedOn time.Time) (err error)

func (PrePostCdScriptHistoryServiceImpl) GetConfigMapSecretData

func (impl PrePostCdScriptHistoryServiceImpl) GetConfigMapSecretData(pipeline *pipelineConfig.Pipeline, stage repository.CdStageType) (configMapData, secretData string, err error)

func (PrePostCdScriptHistoryServiceImpl) GetHistoryForDeployedPrePostCdScript

func (impl PrePostCdScriptHistoryServiceImpl) GetHistoryForDeployedPrePostCdScript(pipelineId int, stage repository.CdStageType) ([]*bean2.PrePostCdScriptHistoryDto, error)

type PrePostCiScriptHistoryService

type PrePostCiScriptHistoryService interface {
	CreatePrePostCiScriptHistory(ciPipelineScript *pipelineConfig.CiPipelineScript, tx *pg.Tx, built bool, builtBy int32, builtOn time.Time) (historyModel *repository.PrePostCiScriptHistory, err error)
}

type PrePostCiScriptHistoryServiceImpl

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

func NewPrePostCiScriptHistoryServiceImpl

func NewPrePostCiScriptHistoryServiceImpl(logger *zap.SugaredLogger, prePostCiScriptHistoryRepository repository.PrePostCiScriptHistoryRepository) *PrePostCiScriptHistoryServiceImpl

func (PrePostCiScriptHistoryServiceImpl) CreatePrePostCiScriptHistory

func (impl PrePostCiScriptHistoryServiceImpl) CreatePrePostCiScriptHistory(ciPipelineScript *pipelineConfig.CiPipelineScript, tx *pg.Tx, built bool, builtBy int32, builtOn time.Time) (historyModel *repository.PrePostCiScriptHistory, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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