1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
kyverno/pkg/openapi/fake.go
Charles-Edouard Brétéché b3021f5a57
refactor: openapi controller part 2 (#4910)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2022-10-12 22:24:16 +05:30

20 lines
454 B
Go

package openapi
import (
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
func NewFake() ValidateInterface {
return &fakeValidation{}
}
type fakeValidation struct{}
func (f *fakeValidation) ValidateResource(resource unstructured.Unstructured, apiVersion, kind string) error {
return nil
}
func (f *fakeValidation) ValidatePolicyMutation(kyvernov1.PolicyInterface) error {
return nil
}