Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrTopLevelDescriptionFound = errors.New("top-level description field found")
ErrTopLevelDescriptionFound is the error returned if a policy contains a top-level description field. Instead this field should be moved to under (Rule).Description.
Functions ¶
This section is empty.
Types ¶
type ErrUnknownFields ¶
type ErrUnknownFields struct {
// contains filtered or unexported fields
}
ErrUnknownFields is an error representing the condition where unknown fields were found within a policy during validation. Fields that are not expected to be in the policy will be put inside the "extras" slice.
func (ErrUnknownFields) Error ¶
func (e ErrUnknownFields) Error() string
type ErrUnknownKind ¶
type ErrUnknownKind struct {
// contains filtered or unexported fields
}
ErrUnknownKind is an error representing an unknown Kubernetes object kind that is passed to the validator.
func (ErrUnknownKind) Error ¶
func (e ErrUnknownKind) Error() string
type NPValidator ¶
type NPValidator struct {
// contains filtered or unexported fields
}
NPValidator is a validator structure used to validate CNP and CCNP.
func NewNPValidator ¶
func NewNPValidator() (*NPValidator, error)
func (*NPValidator) ValidateCCNP ¶
func (n *NPValidator) ValidateCCNP(ccnp *unstructured.Unstructured) error
ValidateCCNP validates the given CCNP accordingly the CCNP validation schema.
func (*NPValidator) ValidateCNP ¶
func (n *NPValidator) ValidateCNP(cnp *unstructured.Unstructured) error
ValidateCNP validates the given CNP accordingly the CNP validation schema.