Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValidationError ¶
type ValidationError struct {
Field string // The field that failed validation
Message string // User-friendly error message
}
ValidationError represents a validation failure with detailed context.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
type Validator ¶
type Validator interface {
// Validate checks if the NFSProvisioner resource is valid.
//
// Parameters:
// - nfs: The NFSProvisioner resource to validate
//
// Returns:
// - error: Non-nil if validation fails, with a descriptive message
Validate(nfs *cachev1alpha1.NFSProvisioner) error
}
Validator validates NFSProvisioner resources according to business rules. Validation failures should result in user-friendly error messages that guide users to fix the issue.
Click to show internal directories.
Click to hide internal directories.