Documentation ¶
Overview ¶
Package validation provides validation for Bundles
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JoinErrors ¶
JoinErrors joins a collection of errors together for convenience, returning nil if there were no errors in the slice.
Types ¶
type BundleValidator ¶
type BundleValidator struct {
Bundle *bpb.ClusterBundle
}
BundleValidator validates bundles.
func NewBundleValidator ¶
func NewBundleValidator(b *bpb.ClusterBundle) *BundleValidator
NewBundleValidator creates a new Bundle Validator
func (*BundleValidator) Validate ¶
func (b *BundleValidator) Validate() []error
Validate validates Bundles, providing as many errors as it can.
type CustomResourceOptions ¶
type CustomResourceOptions struct { // Should the validation be strict? In other words, if a Custom Resource is // not specified in the Bundle via a CRD and Strict is enabled, it will // result in an error. Strict bool }
CustomResourceOptions contains options for custom resource validation.
type CustomResourceValidator ¶
type CustomResourceValidator struct { // Bundle represents a Cluster Bundle Bundle *bpb.ClusterBundle // Options for validation. Options *CustomResourceOptions }
CustomResourceValidator validates custom resources for Bundle customization.
func NewCustomResourceValidator ¶
func NewCustomResourceValidator(bundle *bpb.ClusterBundle, options *CustomResourceOptions) (*CustomResourceValidator, error)
NewCustomResourceValidator creates a new CustomResourceValidator.
func (*CustomResourceValidator) Validate ¶
func (c *CustomResourceValidator) Validate(customResource interface{}) error
Validate checks whether a custom resource conforms to the spec given in the CRD.
Click to show internal directories.
Click to hide internal directories.