Documentation
¶
Index ¶
- Constants
- Variables
- func AdmissionUnknownErrorReason() string
- type DuplicateValidator
- func (v DuplicateValidator) ValidateCreate(ctx context.Context, logger logr.Logger, namespace, newName string) error
- func (v DuplicateValidator) ValidateDelete(ctx context.Context, logger logr.Logger, namespace, oldName string) error
- func (v DuplicateValidator) ValidateUpdate(ctx context.Context, logger logr.Logger, namespace, oldName, newName string) error
- type NameRegistry
- type PlacementValidator
- type ValidationError
Constants ¶
View Source
const ( UnknownErrorType = "UnknownError" UnknownErrorMessage = "An unknown error has occurred" )
View Source
const ( OrgPlacementErrorType = "OrgPlacementError" OrgPlacementErrorMessage = "Organization '%s' must be placed in the root 'cf' namespace" SpacePlacementErrorMessage = "Organization '%s' does not exist for Space '%s'" )
Variables ¶
View Source
var ErrorDuplicateName = errors.New("name already used in namespace")
Functions ¶
func AdmissionUnknownErrorReason ¶
func AdmissionUnknownErrorReason() string
Types ¶
type DuplicateValidator ¶
type DuplicateValidator struct {
// contains filtered or unexported fields
}
func NewDuplicateValidator ¶
func NewDuplicateValidator(nameRegistry NameRegistry) *DuplicateValidator
func (DuplicateValidator) ValidateCreate ¶
func (DuplicateValidator) ValidateDelete ¶
func (DuplicateValidator) ValidateUpdate ¶
type NameRegistry ¶
type PlacementValidator ¶
type PlacementValidator struct {
// contains filtered or unexported fields
}
func NewPlacementValidator ¶
func NewPlacementValidator(client client.Client, rootNamespace string) *PlacementValidator
func (PlacementValidator) ValidateOrgCreate ¶
func (v PlacementValidator) ValidateOrgCreate(org v1alpha1.CFOrg) error
func (PlacementValidator) ValidateSpaceCreate ¶
func (v PlacementValidator) ValidateSpaceCreate(space v1alpha1.CFSpace) error
type ValidationError ¶
type ValidationError struct { Type string `json:"validationErrorType"` Message string `json:"message"` }
func WebhookErrorToValidationError ¶
func WebhookErrorToValidationError(err error) (ValidationError, bool)
func (ValidationError) Error ¶
func (v ValidationError) Error() string
func (ValidationError) Marshal ¶
func (v ValidationError) Marshal() string
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
fake
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
fake
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
fake
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.