Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureNonNil ¶
func EnsureNonNil(value interface{}, results ResultCollector)
EnsureNonNil adds a validation failure to the validation.ResultCollector, in case the value is nil
Types ¶
type ResultCollector ¶
type ResultCollector interface { // Failures returns the collected v1.StatusCause each representing a validation error Failures() []v1.StatusCause // AddFailure adds a message denoting the a failed validation the current field AddFailure(message string) // AppendField appends the provided suffix to the field and returns a new ResultCollector for the field AppendField(suffix string) ResultCollector }
ResultCollector denotes a collector for failures which can be used descending an object hierarchy
func NewResultCollector ¶
func NewResultCollector() ResultCollector
type Validator ¶
type Validator interface { kewl.NamedObject codec.SchemeExtension // Validate validates the runtime.Object representation collecting the result using the ResultCollector or yielding an // error if the validator fails to run Validate(oldObject, newObject runtime.Object, results ResultCollector) error }
Validator denotes a validator for any interface{}
Click to show internal directories.
Click to hide internal directories.