Documentation
¶
Index ¶
- Constants
- func AFECsToValidationOptions(features []arm.Feature) []string
- func CIDRv4(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func DifferentResourceGroupName(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func DifferentResourceGroupNameFromResourceID(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func EQ[T comparable](_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *T, ...) field.ErrorList
- func EachMapKey[K ~string, T any](ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func EqualFold(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func GenericResourceID(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func IPv4(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func ImageRegistry(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func KubeLabelValue(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func KubeQualifiedName(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func MatchesRegex(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func MaxItems[T any](_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ []T, ...) field.ErrorList
- func MaxLen(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func Maximum[T constraints.Integer](_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *T, ...) field.ErrorList
- func MaximumIfNoAZ[T constraints.Integer](ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func MinItems[T any](_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ []T, ...) field.ErrorList
- func MinLen(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func NoExtraWhitespace(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func OpenShiftWithOptionalPrerelease(_ context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func OpenshiftVersionWithOptionalMicro(_ context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func OpenshiftVersionWithoutMicro(_ context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func Or[T any](ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func ResourceID(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func RestrictedResourceIDWithResourceGroup(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func RestrictedResourceIDWithoutResourceGroup(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func RewriteValidationFieldPaths(internalValidationErrors field.ErrorList, ...)
- func SameSubscription(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func URL(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func ValidateCluster(ctx context.Context, op operation.Operation, ...) field.ErrorList
- func ValidateExternalAuthCreate(ctx context.Context, newObj *api.HCPOpenShiftClusterExternalAuth) field.ErrorList
- func ValidateExternalAuthUpdate(ctx context.Context, newObj, oldObj *api.HCPOpenShiftClusterExternalAuth) field.ErrorList
- func ValidateNodePool(ctx context.Context, op operation.Operation, ...) field.ErrorList
- func ValidatePEM(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func ValidateSubscriptionCreate(ctx context.Context, newObj *arm.Subscription) field.ErrorList
- func ValidateUUID(_ context.Context, _ operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func ValidateUserAssignedIdentityLocation(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func VersionMayNotDecrease(_ context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
- func VersionMustBeAtLeast(_ context.Context, op operation.Operation, fldPath *field.Path, ...) field.ErrorList
Constants ¶
const ( // ManagedIdentitiesDataPlaneIdentityURLOptionalOperationOption is an operation option that indicates that the managed identities // data plane identity URL is optional during validation. This is used on ARM Preflight requests on the // Cluster resource. ManagedIdentitiesDataPlaneIdentityURLOptionalOperationOption = "ManagedIdentitiesDataPlaneIdentityURLOptional" )
Variables ¶
This section is empty.
Functions ¶
func AFECsToValidationOptions ¶
AFECsToValidationOptions converts the API logic into validation compatible options. Feature names are normalized to lowercase for case-insensitive comparison.
func EQ ¶
func EQ[T comparable](_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *T, allowed T) field.ErrorList
EQ matches validate.NEQ
func EachMapKey ¶
func EachMapKey[K ~string, T any](ctx context.Context, op operation.Operation, fldPath *field.Path, newMap, oldMap map[K]T, validator validate.ValidateFunc[*K]) field.ErrorList
EachMapKey validates each element of newMap with the specified validation function. This is a copy from validate.EachMapKey except that the field path includes the key because its more useful for us that way.
func EqualFold ¶
func EqualFold(_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *string, requiredValue string) field.ErrorList
EqualFold verifies that the specified string is equal to the required value ignoring case.
func GenericResourceID ¶
func GenericResourceID(ctx context.Context, op operation.Operation, fldPath *field.Path, value, oldValue *azcorearm.ResourceID) field.ErrorList
GenericResourceID 1. has subscription 2. has name 3. has any resource type 4. may or may not have a resource group name
func ImageRegistry ¶
func KubeLabelValue ¶
func KubeQualifiedName ¶
func MatchesRegex ¶
func MaxLen ¶
func MaxLen(_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *string, maxLen int) field.ErrorList
MaxLen verifies that the specified string is less than or equal to maxLen long
func Maximum ¶
func Maximum[T constraints.Integer](_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *T, max T) field.ErrorList
Minimum verifies that the specified value is less than or equal to max.
func MaximumIfNoAZ ¶
func MaximumIfNoAZ[T constraints.Integer](ctx context.Context, op operation.Operation, fldPath *field.Path, value, oldValue *T, max T, availabilityZone string) field.ErrorList
MaximumIfNoAZ validates that a value doesn't exceed max ONLY when availabilityZone is empty. When availabilityZone is set, no maximum limit is enforced.
func MinLen ¶
func MinLen(_ context.Context, _ operation.Operation, fldPath *field.Path, value, _ *string, minLen int) field.ErrorList
MinLen verifies that the specified string is greater than or equal to minLen long
func NoExtraWhitespace ¶
func ResourceID ¶
func ResourceID(ctx context.Context, op operation.Operation, fldPath *field.Path, value, oldValue *azcorearm.ResourceID) field.ErrorList
ResourceID 1. has subscription 2. has name 3. has any resource type 4. has a resource group name
func RestrictedResourceIDWithResourceGroup ¶
func RestrictedResourceIDWithResourceGroup(ctx context.Context, op operation.Operation, fldPath *field.Path, value, oldValue *azcorearm.ResourceID, resourceTypeRestriction string) field.ErrorList
RestrictedResourceIDWithResourceGroup 1. has subscription 2. has name 3. has a particular resource type 4. has a resource group name
func RestrictedResourceIDWithoutResourceGroup ¶
func RestrictedResourceIDWithoutResourceGroup(ctx context.Context, op operation.Operation, fldPath *field.Path, value, oldValue *azcorearm.ResourceID, resourceTypeRestriction string) field.ErrorList
RestrictedResourceIDWithoutResourceGroup 1. has subscription 2. has name 3. has particular type 4. has no resource group name
func RewriteValidationFieldPaths ¶
func RewriteValidationFieldPaths(internalValidationErrors field.ErrorList, validationPathMapperFn api.ValidationPathMapperFunc)
func SameSubscription ¶
func ValidateCluster ¶
func ValidateCluster(ctx context.Context, op operation.Operation, newCluster, oldCluster *api.HCPOpenShiftCluster, validationPathMapper api.ValidationPathMapperFunc) field.ErrorList
func ValidateNodePool ¶
func ValidatePEM ¶
func ValidatePEM(ctx context.Context, op operation.Operation, fldPath *field.Path, value, _ *string) field.ErrorList
TODO this is compatible with what existed before, but still allows much invalid content
func ValidateUUID ¶
func VersionMayNotDecrease ¶
Types ¶
This section is empty.