2024-01-26 13:40:29 +00:00
|
|
|
package report
|
|
|
|
|
|
|
|
import (
|
|
|
|
policyreportv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2"
|
2024-01-27 08:03:01 +00:00
|
|
|
reportsv1 "github.com/kyverno/kyverno/api/reports/v1"
|
2024-01-26 13:40:29 +00:00
|
|
|
)
|
|
|
|
|
2024-06-19 08:08:15 +00:00
|
|
|
func DeepCopy(report reportsv1.ReportInterface) reportsv1.ReportInterface {
|
2024-01-26 13:40:29 +00:00
|
|
|
switch v := report.(type) {
|
|
|
|
case *policyreportv1alpha2.PolicyReport:
|
|
|
|
return v.DeepCopy()
|
|
|
|
case *policyreportv1alpha2.ClusterPolicyReport:
|
|
|
|
return v.DeepCopy()
|
2024-01-27 23:30:04 +00:00
|
|
|
case *reportsv1.EphemeralReport:
|
2024-01-26 13:40:29 +00:00
|
|
|
return v.DeepCopy()
|
2024-01-27 23:30:04 +00:00
|
|
|
case *reportsv1.ClusterEphemeralReport:
|
2024-01-26 13:40:29 +00:00
|
|
|
return v.DeepCopy()
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|