Skip to content

Commit

Permalink
Merge pull request #390 from armosec/cspm_consts
Browse files Browse the repository at this point in the history
add checkType map
  • Loading branch information
idohuber authored Nov 14, 2024
2 parents c587fcc + feb65f1 commit 58f031f
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions armotypes/cloudposturetypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ const (
CloudCheckStatusManual = "MANUAL"
CloudCheckStatusPass = "PASS"
CloudCheckStatusSkipped = "SKIPPED"

CloudAutomatedCheckType = "AUTOMATED"
CloudManualCheckType = CloudCheckStatusManual
CloudManualAndAutomated = CloudAutomatedCheckType + "/" + CloudManualCheckType
)

var CloudCheckStatusToInt = map[string]int{
Expand All @@ -57,6 +53,28 @@ var CloudIntToCheckStatus = map[int]string{
40: CloudCheckStatusSkipped,
}

// cloud check types
const (
CloudEmptyCheckType = "EMPTY"
CloudAutomatedCheckType = "AUTOMATED"
CloudManualCheckType = CloudCheckStatusManual
CloudManualAndAutomated = CloudAutomatedCheckType + "/" + CloudManualCheckType
)

var CloudCheckTypeToInt = map[string]int{
CloudEmptyCheckType: -1,
CloudAutomatedCheckType: 10,
CloudManualCheckType: 20,
CloudManualAndAutomated: 30,
}

var CloudIntToCheckType = map[int]string{
-1: CloudEmptyCheckType,
10: CloudAutomatedCheckType,
20: CloudManualCheckType,
30: CloudManualAndAutomated,
}

// cloud posture scans statuses
var CloudPostureScanStatusToInt = map[string]int{
ScanFailed: 1,
Expand Down

0 comments on commit 58f031f

Please sign in to comment.