Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExistingFieldRemoval ¶
type ExistingFieldRemoval struct{}
func (*ExistingFieldRemoval) Name ¶
func (efr *ExistingFieldRemoval) Name() string
func (*ExistingFieldRemoval) Validate ¶
func (efr *ExistingFieldRemoval) Validate(old, new *apiextensionsv1.CustomResourceDefinition) ValidationResult
type Scope ¶
type Scope struct{}
func (*Scope) Validate ¶
func (s *Scope) Validate(old, new *apiextensionsv1.CustomResourceDefinition) ValidationResult
type StoredVersionRemoval ¶
type StoredVersionRemoval struct{}
func (*StoredVersionRemoval) Name ¶
func (svr *StoredVersionRemoval) Name() string
func (*StoredVersionRemoval) Validate ¶
func (svr *StoredVersionRemoval) Validate(old, new *apiextensionsv1.CustomResourceDefinition) ValidationResult
type Validation ¶
type Validation interface { // Validate performs the validation, returning an error if the // new revision is incompatible with the old revision of the CustomResourceDefinition Validate(old, new *apiextensionsv1.CustomResourceDefinition) ValidationResult // Name is a human-readable name for this validation Name() string }
Validation is a representation of a validation that is run against two revisions of a CustomResourceDefinition
type ValidationResult ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator validates Kubernetes CustomResourceDefinitions using the configured validations
func NewValidator ¶
func NewValidator(opts ...ValidatorOption) *Validator
func (*Validator) Validate ¶
func (v *Validator) Validate(old, new *apiextensionsv1.CustomResourceDefinition) ValidatorResult
Validate runs the validations configured in the Validator
type ValidatorOption ¶
type ValidatorOption func(*Validator)
func WithValidations ¶
func WithValidations(validations ...Validation) ValidatorOption
type ValidatorResult ¶
type ValidatorResult struct {
ValidationResults []ValidationResult `json:"results"`
}
func (*ValidatorResult) Error ¶
func (vr *ValidatorResult) Error(printDepth int) error
func (*ValidatorResult) JSON ¶
func (vr *ValidatorResult) JSON() ([]byte, error)
func (*ValidatorResult) YAML ¶
func (vr *ValidatorResult) YAML() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.