Skip to content
This repository was archived by the owner on Jul 23, 2023. It is now read-only.

Commit 907606c

Browse files
authored
Merge pull request #21 from armosec/cluster-short-name
Add cluster short name to ContainerScanSummaryResult
2 parents 2f729f8 + 4a03fdb commit 907606c

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

containerscan/commonContainerScanSummaryResultMethods.go

+8
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ func (summary *CommonContainerScanSummaryResult) GetClusterName() string {
3434
return summary.ClusterName
3535
}
3636

37+
func (summary *CommonContainerScanSummaryResult) GetClusterShortName() string {
38+
return summary.ClusterShortName
39+
}
40+
3741
func (summary *CommonContainerScanSummaryResult) GetNamespace() string {
3842
return summary.Namespace
3943
}
@@ -125,6 +129,10 @@ func (summary *CommonContainerScanSummaryResult) SetClusterName(clusterName stri
125129
summary.ClusterName = clusterName
126130
}
127131

132+
func (summary *CommonContainerScanSummaryResult) SetClusterShortName(clusterShortName string) {
133+
summary.ClusterShortName = clusterShortName
134+
}
135+
128136
func (summary *CommonContainerScanSummaryResult) SetNamespace(namespace string) {
129137
summary.Namespace = namespace
130138
}

containerscan/commondatastructures.go

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ type CommonContainerScanSummaryResult struct {
9292
ImageID string `json:"imageHash"`
9393
ImageTag string `json:"imageTag"`
9494
ClusterName string `json:"cluster"`
95+
ClusterShortName string `json:"clusterShortName"`
9596
Namespace string `json:"namespace"`
9697
ContainerName string `json:"containerName"`
9798
ImageTagSuffix string `json:"versionImage"`

containerscan/interfaces.go

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type ContainerScanSummaryResult interface {
3434
GetSeverityStats() SeverityStats
3535
GetSeveritiesStats() []SeverityStats
3636
GetClusterName() string
37+
GetClusterShortName() string
3738
GetNamespace() string
3839
GetContainerName() string
3940
GetStatus() string
@@ -56,6 +57,7 @@ type ContainerScanSummaryResult interface {
5657
SetSeverityStats(SeverityStats)
5758
SetSeveritiesStats([]SeverityStats)
5859
SetClusterName(string)
60+
SetClusterShortName(string)
5961
SetNamespace(string)
6062
SetContainerName(string)
6163
SetStatus(string)

0 commit comments

Comments
 (0)