Skip to content

Commit

Permalink
feat: Add apiVersion to scan upload data
Browse files Browse the repository at this point in the history
  • Loading branch information
langecode committed Mar 8, 2024
1 parent 8e62c8b commit f8b39c9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions pkg/dependencies/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ type ScanResult struct {
}

type WorkloadRef struct {
FQDN string `json:"cluster"`
NRN string `json:"nrn"`
Kind string `json:"kind"`
Namespace string `json:"namespace"`
Name string `json:"name"`
FQDN string `json:"cluster"`
NRN string `json:"nrn"`
ApiVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Namespace string `json:"namespace"`
Name string `json:"name"`
}

type Service interface {
Expand Down Expand Up @@ -229,8 +230,9 @@ func (c *client) PushScan(ctx context.Context, repo string, res *ScanResult) err

func RefFromKind(obj kc.Object) WorkloadRef {
return WorkloadRef{
Kind: obj.GetObjectKind().GroupVersionKind().Kind,
Namespace: obj.GetNamespace(),
Name: obj.GetName(),
Kind: obj.GetObjectKind().GroupVersionKind().Kind,
ApiVersion: obj.GetObjectKind().GroupVersionKind().GroupVersion().Identifier(),
Namespace: obj.GetNamespace(),
Name: obj.GetName(),
}
}

0 comments on commit f8b39c9

Please sign in to comment.