Documentation ¶
Index ¶
- func FieldValidatorsFromFile(t *testing.T, crdFilePath string) (validatorsByVersionByJSONPath map[string]map[string]CELValidateFunc)
- func PatternValidatorsFromFile(t *testing.T, crdFilePath string) (validatorsByVersionByJSONPath map[string]map[string]PatternValidateFunc)
- func VersionValidatorsFromFile(t *testing.T, crdFilePath string) map[string]CELValidateFunc
- type CELValidateFunc
- type PatternValidateFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldValidatorsFromFile ¶
func FieldValidatorsFromFile(t *testing.T, crdFilePath string) (validatorsByVersionByJSONPath map[string]map[string]CELValidateFunc)
FieldValidatorsFromFile extracts the CEL validators by version and JSONPath from a CRD file and returns a validator func for testing against samples.
func PatternValidatorsFromFile ¶
func PatternValidatorsFromFile(t *testing.T, crdFilePath string) (validatorsByVersionByJSONPath map[string]map[string]PatternValidateFunc)
PatternValidatorsFromFile extracts the CEL validators by version and JSONPath from a CRD file and returns a validator func for testing against samples.
func VersionValidatorsFromFile ¶
func VersionValidatorsFromFile(t *testing.T, crdFilePath string) map[string]CELValidateFunc
VersionValidatorsFromFile extracts the CEL validators by version from a CRD file and returns a validator func for testing against samples.
Types ¶
type CELValidateFunc ¶
CELValidateFunc tests a sample object against a CEL validator.
func VersionValidatorFromFile ¶
func VersionValidatorFromFile(t *testing.T, crdFilePath string, version string) (CELValidateFunc, error)
VersionValidatorFromFile extracts the CEL validators for a given version from a CRD file and returns a validator func for testing against samples.
type PatternValidateFunc ¶
type PatternValidateFunc func(obj interface{}) error