Skip to content

Commit 6455979

Browse files
committed
convert to pointer object
1 parent b539a2e commit 6455979

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

pkg/bean/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ type CiArtifactBean struct {
827827
CiWorkflowId int `json:"-"`
828828
RegistryType string `json:"registryType"`
829829
RegistryName string `json:"registryName"`
830-
TargetPlatforms []bean.TargetPlatform `json:"targetPlatforms"`
830+
TargetPlatforms []*bean.TargetPlatform `json:"targetPlatforms"`
831831
CiPipelineId int `json:"-"`
832832
CredentialsSourceType string `json:"-"`
833833
CredentialsSourceValue string `json:"-"`

pkg/pipeline/CdHandler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ func (impl *CdHandlerImpl) FetchCdWorkflowDetails(appId int, environmentId int,
612612
triggeredByUserEmailId = "anonymous"
613613
}
614614
ciArtifactId := workflow.CiArtifactId
615-
targetPlatforms := []pipelineBean.TargetPlatform{}
615+
targetPlatforms := []*pipelineBean.TargetPlatform{}
616616
if ciArtifactId > 0 {
617617
ciArtifact, err := impl.ciArtifactRepository.Get(ciArtifactId)
618618
if err != nil {

pkg/pipeline/adapter/adapter.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,12 +380,12 @@ func GetStepVariableDto(variable *repository.PipelineStageStepVariable) (*pipeli
380380
return variableDto, nil
381381
}
382382

383-
func GetTargetPlatformObjectFromString(targetPlatformString string) []pipelineConfigBean.TargetPlatform {
383+
func GetTargetPlatformObjectFromString(targetPlatformString string) []*pipelineConfigBean.TargetPlatform {
384384
targetPlatforms := GetTargetPlatformListFromString(targetPlatformString)
385-
var targetPlatformObject []pipelineConfigBean.TargetPlatform
385+
var targetPlatformObject []*pipelineConfigBean.TargetPlatform
386386
for _, targetPlatform := range targetPlatforms {
387387
if len(targetPlatform) == 0 {
388-
targetPlatformObject = append(targetPlatformObject, pipelineConfigBean.TargetPlatform{Name: targetPlatform})
388+
targetPlatformObject = append(targetPlatformObject, &pipelineConfigBean.TargetPlatform{Name: targetPlatform})
389389
}
390390
}
391391
return targetPlatformObject

pkg/pipeline/bean/CdHandlerBean.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type CdWorkflowWithArtifact struct {
2121
TriggeredBy int32 `json:"triggered_by"`
2222
EmailId string `json:"email_id"`
2323
Image string `json:"image"`
24-
TargetPlatforms []TargetPlatform `json:"target_platforms"`
24+
TargetPlatforms []*TargetPlatform `json:"target_platforms"`
2525
MaterialInfo string `json:"material_info,omitempty"`
2626
DataSource string `json:"data_source,omitempty"`
2727
CiArtifactId int `json:"ci_artifact_id,omitempty"`

pkg/pipeline/types/CiCdConfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ type GitTriggerInfoResponse struct {
557557
Default bool `json:"default,omitempty"`
558558
ImageTaggingData ImageTaggingResponseDTO `json:"imageTaggingData"`
559559
Image string `json:"image"`
560-
TargetPlatforms []bean.TargetPlatform `json:"targetPlatforms"`
560+
TargetPlatforms []*bean.TargetPlatform `json:"targetPlatforms"`
561561
}
562562

563563
type Trigger struct {

pkg/pipeline/types/Workflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ type WorkflowResponse struct {
660660
CustomTag *bean3.CustomTagErrorResponse `json:"customTag,omitempty"`
661661
PipelineType string `json:"pipelineType"`
662662
ReferenceWorkflowId int `json:"referenceWorkflowId"`
663-
TargetPlatforms []bean.TargetPlatform `json:"targetPlatforms"`
663+
TargetPlatforms []*bean.TargetPlatform `json:"targetPlatforms"`
664664
}
665665

666666
type ConfigMapSecretDto struct {

0 commit comments

Comments
 (0)