 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- type ImageTaggingService
- type ImageTaggingServiceImpl
- func (impl *ImageTaggingServiceImpl) CreateOrUpdateImageTagging(ciPipelineId, appId, artifactId, userId int, ...) (*types.ImageTaggingResponseDTO, error)
- func (impl *ImageTaggingServiceImpl) FindProdEnvExists(externalCi bool, pipelineIds []int) (bool, error)
- func (impl *ImageTaggingServiceImpl) GetImageCommentsDataMapByArtifactIds(artifactIds []int) (map[int]*repository.ImageComment, error)
- func (impl *ImageTaggingServiceImpl) GetProdEnvByCdPipelineId(pipelineId int) (bool, error)
- func (impl *ImageTaggingServiceImpl) GetProdEnvFromParentAndLinkedWorkflow(ciPipelineId int) (bool, error)
- func (impl *ImageTaggingServiceImpl) GetTagsData(ciPipelineId, appId, artifactId int, externalCi bool) (*types.ImageTaggingResponseDTO, error)
- func (impl *ImageTaggingServiceImpl) GetTagsDataMapByAppId(appId int) (map[int][]*repository.ImageTag, error)
- func (impl *ImageTaggingServiceImpl) IsHardDeleteHidden() bool
- func (impl *ImageTaggingServiceImpl) ValidateImageTaggingRequest(imageTaggingRequest *types.ImageTaggingRequestDTO, appId, artifactId int) (bool, error)
 
Constants ¶
const CommentKey = "comment"
    const DuplicateTagsInAppError = "cannot create duplicate tags in the same app"
    const TagsKey = "tags"
    Variables ¶
var WireSet = wire.NewSet( read.NewImageTaggingReadServiceImpl, wire.Bind(new(read.ImageTaggingReadService), new(*read.ImageTaggingReadServiceImpl)), )
Functions ¶
This section is empty.
Types ¶
type ImageTaggingService ¶
type ImageTaggingService interface {
	// GetTagsData returns the following fields in response Object
	// ImageReleaseTags -> this will get the tags of the artifact,
	// AppReleaseTags -> all the tags of the given appId,
	// imageComment -> comment of the given artifactId,
	// ProdEnvExists -> implies the existence of prod environment in any workflow of given ciPipelineId or its child ciPipelineRequest's
	GetTagsData(ciPipelineId, appId, artifactId int, externalCi bool) (*types.ImageTaggingResponseDTO, error)
	CreateOrUpdateImageTagging(ciPipelineId, appId, artifactId, userId int, imageTaggingRequest *types.ImageTaggingRequestDTO) (*types.ImageTaggingResponseDTO, error)
	GetProdEnvFromParentAndLinkedWorkflow(ciPipelineId int) (bool, error)
	GetProdEnvByCdPipelineId(pipelineId int) (bool, error)
	// ValidateImageTaggingRequest validates the requested payload
	ValidateImageTaggingRequest(imageTaggingRequest *types.ImageTaggingRequestDTO, appId, artifactId int) (bool, error)
	// GetTagsDataMapByAppId this will fetch a map of artifact vs []tags for given appId
	GetTagsDataMapByAppId(appId int) (map[int][]*repository.ImageTag, error)
	// GetImageCommentsDataMapByArtifactIds this will fetch a map of artifact vs imageComment for given artifactIds
	GetImageCommentsDataMapByArtifactIds(artifactIds []int) (map[int]*repository.ImageComment, error)
	IsHardDeleteHidden() bool
	FindProdEnvExists(externalCi bool, pipelineIds []int) (bool, error)
}
    type ImageTaggingServiceImpl ¶
type ImageTaggingServiceImpl struct {
	// contains filtered or unexported fields
}
    func NewImageTaggingServiceImpl ¶
func NewImageTaggingServiceImpl(imageTaggingRepo repository.ImageTaggingRepository, imageTaggingReadService read.ImageTaggingReadService, ciPipelineRepository pipelineConfig.CiPipelineRepository, cdPipelineRepository pipelineConfig.PipelineRepository, environmentRepository repository3.EnvironmentRepository, logger *zap.SugaredLogger) *ImageTaggingServiceImpl
func (*ImageTaggingServiceImpl) CreateOrUpdateImageTagging ¶
func (impl *ImageTaggingServiceImpl) CreateOrUpdateImageTagging(ciPipelineId, appId, artifactId, userId int, imageTaggingRequest *types.ImageTaggingRequestDTO) (*types.ImageTaggingResponseDTO, error)
func (*ImageTaggingServiceImpl) FindProdEnvExists ¶
func (impl *ImageTaggingServiceImpl) FindProdEnvExists(externalCi bool, pipelineIds []int) (bool, error)
FindProdEnvExists returns true if the given ciPipelineIds has at least one prod env as a child TODO: should be a part of environmentReadService
func (*ImageTaggingServiceImpl) GetImageCommentsDataMapByArtifactIds ¶
func (impl *ImageTaggingServiceImpl) GetImageCommentsDataMapByArtifactIds(artifactIds []int) (map[int]*repository.ImageComment, error)
func (*ImageTaggingServiceImpl) GetProdEnvByCdPipelineId ¶
func (impl *ImageTaggingServiceImpl) GetProdEnvByCdPipelineId(pipelineId int) (bool, error)
GetProdEnvByCdPipelineId returns true if the given cdPipelineId has at least one prod env as a child TODO: should be a part of cdPipelineReadService
func (*ImageTaggingServiceImpl) GetProdEnvFromParentAndLinkedWorkflow ¶
func (impl *ImageTaggingServiceImpl) GetProdEnvFromParentAndLinkedWorkflow(ciPipelineId int) (bool, error)
GetProdEnvFromParentAndLinkedWorkflow returns true if the given ciPipelineId has at least one prod env as a child TODO: should be a part of ciPipelineReadService
func (*ImageTaggingServiceImpl) GetTagsData ¶
func (impl *ImageTaggingServiceImpl) GetTagsData(ciPipelineId, appId, artifactId int, externalCi bool) (*types.ImageTaggingResponseDTO, error)
GetTagsData returns the following fields in reponse Object ImageReleaseTags -> this will get the tags of the artifact, AppReleaseTags -> all the tags of the given appId, imageComment -> comment of the given artifactId, ProdEnvExists -> implies the existence of prod environment in any workflow of given ciPipelineId or its child ciPipelineRequest's
func (*ImageTaggingServiceImpl) GetTagsDataMapByAppId ¶
func (impl *ImageTaggingServiceImpl) GetTagsDataMapByAppId(appId int) (map[int][]*repository.ImageTag, error)
GetTagsDataMapByAppId this will fetch a map of artifact vs []tags for given appId
func (*ImageTaggingServiceImpl) IsHardDeleteHidden ¶
func (impl *ImageTaggingServiceImpl) IsHardDeleteHidden() bool
func (*ImageTaggingServiceImpl) ValidateImageTaggingRequest ¶
func (impl *ImageTaggingServiceImpl) ValidateImageTaggingRequest(imageTaggingRequest *types.ImageTaggingRequestDTO, appId, artifactId int) (bool, error)