Skip to content

Commit

Permalink
adding kpi datastructures
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Oct 31, 2021
1 parent 2802848 commit 78c1120
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions armotypes/kpitypes.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package armotypes

import "time"

type KPIPostureScanWrapper struct {
ReportType string `json:"reportType"`
ReportPayload KPIPostureScan `json:"reportPayload"`
}

type KPIPostureScan struct {
CustomerGUID string `json:"customerGUID"`
ReportGUID string `json:"reportGUID"`
Frameworks []string `json:"frameworks"`
Timestamp time.Time `json:"timestamp"`
ClusterName string `json:"clusterName"`
SourceType string `json:"sourceType"` //yaml,helm,running - what we actually scanned
OutputFormat string `json:"outputFormat"` // json,junit,prettyprint - output prefered by customers
CICD int `json:"CICD"` // 0 -false , 1- true , 2- unknown
IP string `json:"IP,omitempty"`
}

type KPIPLoginWrapper struct {
ReportType string `json:"reportType"`
ReportPayload KPIPostureScan `json:"reportPayload"`
}

type KPILogin struct {
CustomerGUID string `json:"tennantGUID"`
Timestamp time.Time `json:"timestamp"`
Username string `json:"username"`
Email string `json:"e-mail"`
IP string `json:"IP,omitempty"`
}
2 changes: 1 addition & 1 deletion armotypes/posturetypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type PostureResource struct {
ControlName string `json:"controlName"`
ControlID string `json:"controlID"`
FrameworkName string `json:"frameworkName"`
ControlStatus int `json:"controlStatus"`
ControlStatus int `json:"controlStatus"` // it's rather resource status within the control, control might fail but on this specific resource it might be warning
ControlStatusText string `json:"controlStatusText"`
RelatedExceptions []PostureExceptionPolicy `json:"relatedExceptions"` // configured in portal
ExceptionApplied []PostureExceptionPolicy `json:"exceptionApplied"` //actual ruleResponse
Expand Down

0 comments on commit 78c1120

Please sign in to comment.