Skip to content

Commit

Permalink
add resource id
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Jogeleit <frank.jogeleit@lovoo.com>
  • Loading branch information
Frank Jogeleit committed Mar 22, 2024
1 parent 45a6904 commit 446cc09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/api/v1/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ type Result struct {
Kind string `json:"kind"`
APIVersion string `json:"apiVersion"`
Name string `json:"name"`
ResourceID string `json:"resourceId"`
Message string `json:"message"`
Category string `json:"category,omitempty"`
Policy string `json:"policy"`
Expand All @@ -196,6 +197,7 @@ func MapResults(results []db.PolicyReportResult) []Result {
Kind: res.Resource.Kind,
APIVersion: res.Resource.APIVersion,
Name: res.Resource.Name,
ResourceID: res.Resource.GetID(),
Message: res.Message,
Category: res.Category,
Policy: res.Policy,
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/v2/views.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ type PolicyResult struct {
Kind string `json:"kind"`
APIVersion string `json:"apiVersion"`
Name string `json:"name"`
ResourceID string `json:"resourceId"`
Message string `json:"message"`
Category string `json:"category,omitempty"`
Policy string `json:"policy"`
Expand All @@ -261,6 +262,7 @@ func MapPolicyResults(results []db.PolicyReportResult) []PolicyResult {
Kind: res.Resource.Kind,
APIVersion: res.Resource.APIVersion,
Name: res.Resource.Name,
ResourceID: res.Resource.GetID(),
Message: res.Message,
Category: res.Category,
Policy: res.Policy,
Expand Down

0 comments on commit 446cc09

Please sign in to comment.