mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
6e1def1004
* feat: remove v1alpha2 group Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * codegen Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * fix tests Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> --------- Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
21 lines
547 B
Go
21 lines
547 B
Go
package report
|
|
|
|
import (
|
|
policyreportv1alpha2 "github.com/kyverno/kyverno/api/policyreport/v1alpha2"
|
|
reportsv1 "github.com/kyverno/kyverno/api/reports/v1"
|
|
)
|
|
|
|
func DeepCopy(report reportsv1.ReportInterface) reportsv1.ReportInterface {
|
|
switch v := report.(type) {
|
|
case *policyreportv1alpha2.PolicyReport:
|
|
return v.DeepCopy()
|
|
case *policyreportv1alpha2.ClusterPolicyReport:
|
|
return v.DeepCopy()
|
|
case *reportsv1.EphemeralReport:
|
|
return v.DeepCopy()
|
|
case *reportsv1.ClusterEphemeralReport:
|
|
return v.DeepCopy()
|
|
default:
|
|
return nil
|
|
}
|
|
}
|