Documentation ¶
Index ¶
Constants ¶
View Source
const ( // WarningTypeCode indicates a warning is being returned. WarningTypeCode = 100 // ErrorTypeCode indicates an error is being returned. ErrorTypeCode = 500 )
All code responses can be used to differentiate errors for different handling by the consumer
Variables ¶
View Source
var Nop = &validate.Result{}
Nop is used for no-op validator results.
Functions ¶
This section is empty.
Types ¶
type ObjectValidator ¶
type ObjectValidator struct {
// contains filtered or unexported fields
}
ObjectValidator provides a mechanism for grouping various validators for a given object type.
func (*ObjectValidator) AddToChain ¶
func (o *ObjectValidator) AddToChain(validators ...Validator)
AddToChain adds the given validators to the internal validation chain for the ObjectValidator.
type UsingContext ¶
type UsingContext struct {
// contains filtered or unexported fields
}
UsingContext allows us to use kube-openapi validators without context usage to conform our interfaces that require it.
func NewUsingContext ¶
func NewUsingContext(k kubeValidator) *UsingContext
NewUsingContext returns a new validator that uses the provided kubeValidator with no context.
type Validation ¶
Validation represents a failure of a file condition.
func (*Validation) Code ¶
func (e *Validation) Code() int32
Code returns the code corresponding to the MetaValidation.
func (*Validation) Error ¶
func (e *Validation) Error() string
Click to show internal directories.
Click to hide internal directories.