mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04:00
Add whitespace in DV register func
This commit is contained in:
parent
9df1be6658
commit
8950aac006
173 changed files with 3549 additions and 1778 deletions
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type ValidatingAdmissionPolicyBinding
|
||||
scheme.AddValidationFunc((*admissionregistrationv1.ValidatingAdmissionPolicyBinding)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ValidatingAdmissionPolicyBinding(ctx, op, nil /* fldPath */, obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding), safe.Cast[*admissionregistrationv1.ValidatingAdmissionPolicyBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*admissionregistrationv1.ValidatingAdmissionPolicyBinding)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ValidatingAdmissionPolicyBinding(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding),
|
||||
safe.Cast[*admissionregistrationv1.ValidatingAdmissionPolicyBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type ValidatingAdmissionPolicyBinding
|
||||
scheme.AddValidationFunc((*admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ValidatingAdmissionPolicyBinding(ctx, op, nil /* fldPath */, obj.(*admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding), safe.Cast[*admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ValidatingAdmissionPolicyBinding(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding),
|
||||
safe.Cast[*admissionregistrationv1alpha1.ValidatingAdmissionPolicyBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type ValidatingAdmissionPolicyBinding
|
||||
scheme.AddValidationFunc((*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ValidatingAdmissionPolicyBinding(ctx, op, nil /* fldPath */, obj.(*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding), safe.Cast[*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ValidatingAdmissionPolicyBinding(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding),
|
||||
safe.Cast[*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/apps/v1beta1/zz_generated.validations.go
generated
21
pkg/apis/apps/v1beta1/zz_generated.validations.go
generated
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type Scale
|
||||
scheme.AddValidationFunc((*appsv1beta1.Scale)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/scale":
|
||||
return Validate_Scale(ctx, op, nil /* fldPath */, obj.(*appsv1beta1.Scale), safe.Cast[*appsv1beta1.Scale](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*appsv1beta1.Scale)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/scale":
|
||||
return Validate_Scale(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*appsv1beta1.Scale),
|
||||
safe.Cast[*appsv1beta1.Scale](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/apps/v1beta2/zz_generated.validations.go
generated
21
pkg/apis/apps/v1beta2/zz_generated.validations.go
generated
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type Scale
|
||||
scheme.AddValidationFunc((*appsv1beta2.Scale)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/scale":
|
||||
return Validate_Scale(ctx, op, nil /* fldPath */, obj.(*appsv1beta2.Scale), safe.Cast[*appsv1beta2.Scale](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*appsv1beta2.Scale)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/scale":
|
||||
return Validate_Scale(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*appsv1beta2.Scale),
|
||||
safe.Cast[*appsv1beta2.Scale](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
42
pkg/apis/autoscaling/v1/zz_generated.validations.go
generated
42
pkg/apis/autoscaling/v1/zz_generated.validations.go
generated
|
|
@ -40,21 +40,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type HorizontalPodAutoscaler
|
||||
scheme.AddValidationFunc((*autoscalingv1.HorizontalPodAutoscaler)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_HorizontalPodAutoscaler(ctx, op, nil /* fldPath */, obj.(*autoscalingv1.HorizontalPodAutoscaler), safe.Cast[*autoscalingv1.HorizontalPodAutoscaler](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*autoscalingv1.HorizontalPodAutoscaler)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_HorizontalPodAutoscaler(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*autoscalingv1.HorizontalPodAutoscaler),
|
||||
safe.Cast[*autoscalingv1.HorizontalPodAutoscaler](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type Scale
|
||||
scheme.AddValidationFunc((*autoscalingv1.Scale)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/scale":
|
||||
return Validate_Scale(ctx, op, nil /* fldPath */, obj.(*autoscalingv1.Scale), safe.Cast[*autoscalingv1.Scale](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*autoscalingv1.Scale)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/scale":
|
||||
return Validate_Scale(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*autoscalingv1.Scale),
|
||||
safe.Cast[*autoscalingv1.Scale](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/autoscaling/v2/zz_generated.validations.go
generated
21
pkg/apis/autoscaling/v2/zz_generated.validations.go
generated
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type HorizontalPodAutoscaler
|
||||
scheme.AddValidationFunc((*autoscalingv2.HorizontalPodAutoscaler)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_HorizontalPodAutoscaler(ctx, op, nil /* fldPath */, obj.(*autoscalingv2.HorizontalPodAutoscaler), safe.Cast[*autoscalingv2.HorizontalPodAutoscaler](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*autoscalingv2.HorizontalPodAutoscaler)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_HorizontalPodAutoscaler(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*autoscalingv2.HorizontalPodAutoscaler),
|
||||
safe.Cast[*autoscalingv2.HorizontalPodAutoscaler](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/batch/v1/zz_generated.validations.go
generated
21
pkg/apis/batch/v1/zz_generated.validations.go
generated
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type CronJob
|
||||
scheme.AddValidationFunc((*batchv1.CronJob)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_CronJob(ctx, op, nil /* fldPath */, obj.(*batchv1.CronJob), safe.Cast[*batchv1.CronJob](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*batchv1.CronJob)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_CronJob(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*batchv1.CronJob),
|
||||
safe.Cast[*batchv1.CronJob](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/batch/v1beta1/zz_generated.validations.go
generated
21
pkg/apis/batch/v1beta1/zz_generated.validations.go
generated
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type CronJob
|
||||
scheme.AddValidationFunc((*batchv1beta1.CronJob)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_CronJob(ctx, op, nil /* fldPath */, obj.(*batchv1beta1.CronJob), safe.Cast[*batchv1beta1.CronJob](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*batchv1beta1.CronJob)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_CronJob(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*batchv1beta1.CronJob),
|
||||
safe.Cast[*batchv1beta1.CronJob](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/certificates/v1/zz_generated.validations.go
generated
21
pkg/apis/certificates/v1/zz_generated.validations.go
generated
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type CertificateSigningRequest
|
||||
scheme.AddValidationFunc((*certificatesv1.CertificateSigningRequest)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/approval", "/status":
|
||||
return Validate_CertificateSigningRequest(ctx, op, nil /* fldPath */, obj.(*certificatesv1.CertificateSigningRequest), safe.Cast[*certificatesv1.CertificateSigningRequest](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*certificatesv1.CertificateSigningRequest)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/approval", "/status":
|
||||
return Validate_CertificateSigningRequest(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*certificatesv1.CertificateSigningRequest),
|
||||
safe.Cast[*certificatesv1.CertificateSigningRequest](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type CertificateSigningRequest
|
||||
scheme.AddValidationFunc((*certificatesv1beta1.CertificateSigningRequest)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/approval", "/status":
|
||||
return Validate_CertificateSigningRequest(ctx, op, nil /* fldPath */, obj.(*certificatesv1beta1.CertificateSigningRequest), safe.Cast[*certificatesv1beta1.CertificateSigningRequest](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*certificatesv1beta1.CertificateSigningRequest)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/approval", "/status":
|
||||
return Validate_CertificateSigningRequest(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*certificatesv1beta1.CertificateSigningRequest),
|
||||
safe.Cast[*certificatesv1beta1.CertificateSigningRequest](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/core/v1/zz_generated.validations.go
generated
21
pkg/apis/core/v1/zz_generated.validations.go
generated
|
|
@ -41,13 +41,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type ReplicationController
|
||||
scheme.AddValidationFunc((*corev1.ReplicationController)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/scale", "/status":
|
||||
return Validate_ReplicationController(ctx, op, nil /* fldPath */, obj.(*corev1.ReplicationController), safe.Cast[*corev1.ReplicationController](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*corev1.ReplicationController)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/scale", "/status":
|
||||
return Validate_ReplicationController(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*corev1.ReplicationController),
|
||||
safe.Cast[*corev1.ReplicationController](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/discovery/v1/zz_generated.validations.go
generated
21
pkg/apis/discovery/v1/zz_generated.validations.go
generated
|
|
@ -41,13 +41,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type EndpointSlice
|
||||
scheme.AddValidationFunc((*discoveryv1.EndpointSlice)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_EndpointSlice(ctx, op, nil /* fldPath */, obj.(*discoveryv1.EndpointSlice), safe.Cast[*discoveryv1.EndpointSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*discoveryv1.EndpointSlice)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_EndpointSlice(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*discoveryv1.EndpointSlice),
|
||||
safe.Cast[*discoveryv1.EndpointSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,13 +41,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type EndpointSlice
|
||||
scheme.AddValidationFunc((*discoveryv1beta1.EndpointSlice)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_EndpointSlice(ctx, op, nil /* fldPath */, obj.(*discoveryv1beta1.EndpointSlice), safe.Cast[*discoveryv1beta1.EndpointSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*discoveryv1beta1.EndpointSlice)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_EndpointSlice(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*discoveryv1beta1.EndpointSlice),
|
||||
safe.Cast[*discoveryv1beta1.EndpointSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/flowcontrol/v1/zz_generated.validations.go
generated
21
pkg/apis/flowcontrol/v1/zz_generated.validations.go
generated
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type PriorityLevelConfiguration
|
||||
scheme.AddValidationFunc((*flowcontrolv1.PriorityLevelConfiguration)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_PriorityLevelConfiguration(ctx, op, nil /* fldPath */, obj.(*flowcontrolv1.PriorityLevelConfiguration), safe.Cast[*flowcontrolv1.PriorityLevelConfiguration](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*flowcontrolv1.PriorityLevelConfiguration)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_PriorityLevelConfiguration(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*flowcontrolv1.PriorityLevelConfiguration),
|
||||
safe.Cast[*flowcontrolv1.PriorityLevelConfiguration](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type PriorityLevelConfiguration
|
||||
scheme.AddValidationFunc((*flowcontrolv1beta1.PriorityLevelConfiguration)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_PriorityLevelConfiguration(ctx, op, nil /* fldPath */, obj.(*flowcontrolv1beta1.PriorityLevelConfiguration), safe.Cast[*flowcontrolv1beta1.PriorityLevelConfiguration](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*flowcontrolv1beta1.PriorityLevelConfiguration)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_PriorityLevelConfiguration(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*flowcontrolv1beta1.PriorityLevelConfiguration),
|
||||
safe.Cast[*flowcontrolv1beta1.PriorityLevelConfiguration](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type PriorityLevelConfiguration
|
||||
scheme.AddValidationFunc((*flowcontrolv1beta2.PriorityLevelConfiguration)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_PriorityLevelConfiguration(ctx, op, nil /* fldPath */, obj.(*flowcontrolv1beta2.PriorityLevelConfiguration), safe.Cast[*flowcontrolv1beta2.PriorityLevelConfiguration](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*flowcontrolv1beta2.PriorityLevelConfiguration)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_PriorityLevelConfiguration(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*flowcontrolv1beta2.PriorityLevelConfiguration),
|
||||
safe.Cast[*flowcontrolv1beta2.PriorityLevelConfiguration](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type PriorityLevelConfiguration
|
||||
scheme.AddValidationFunc((*flowcontrolv1beta3.PriorityLevelConfiguration)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_PriorityLevelConfiguration(ctx, op, nil /* fldPath */, obj.(*flowcontrolv1beta3.PriorityLevelConfiguration), safe.Cast[*flowcontrolv1beta3.PriorityLevelConfiguration](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*flowcontrolv1beta3.PriorityLevelConfiguration)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_PriorityLevelConfiguration(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*flowcontrolv1beta3.PriorityLevelConfiguration),
|
||||
safe.Cast[*flowcontrolv1beta3.PriorityLevelConfiguration](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
63
pkg/apis/networking/v1/zz_generated.validations.go
generated
63
pkg/apis/networking/v1/zz_generated.validations.go
generated
|
|
@ -40,29 +40,50 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type IPAddress
|
||||
scheme.AddValidationFunc((*networkingv1.IPAddress)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_IPAddress(ctx, op, nil /* fldPath */, obj.(*networkingv1.IPAddress), safe.Cast[*networkingv1.IPAddress](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*networkingv1.IPAddress)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_IPAddress(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*networkingv1.IPAddress),
|
||||
safe.Cast[*networkingv1.IPAddress](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type IngressClass
|
||||
scheme.AddValidationFunc((*networkingv1.IngressClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_IngressClass(ctx, op, nil /* fldPath */, obj.(*networkingv1.IngressClass), safe.Cast[*networkingv1.IngressClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*networkingv1.IngressClass)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_IngressClass(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*networkingv1.IngressClass),
|
||||
safe.Cast[*networkingv1.IngressClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type NetworkPolicy
|
||||
scheme.AddValidationFunc((*networkingv1.NetworkPolicy)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_NetworkPolicy(ctx, op, nil /* fldPath */, obj.(*networkingv1.NetworkPolicy), safe.Cast[*networkingv1.NetworkPolicy](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*networkingv1.NetworkPolicy)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_NetworkPolicy(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*networkingv1.NetworkPolicy),
|
||||
safe.Cast[*networkingv1.NetworkPolicy](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,21 +40,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type IPAddress
|
||||
scheme.AddValidationFunc((*networkingv1beta1.IPAddress)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_IPAddress(ctx, op, nil /* fldPath */, obj.(*networkingv1beta1.IPAddress), safe.Cast[*networkingv1beta1.IPAddress](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*networkingv1beta1.IPAddress)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_IPAddress(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*networkingv1beta1.IPAddress),
|
||||
safe.Cast[*networkingv1beta1.IPAddress](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type IngressClass
|
||||
scheme.AddValidationFunc((*networkingv1beta1.IngressClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_IngressClass(ctx, op, nil /* fldPath */, obj.(*networkingv1beta1.IngressClass), safe.Cast[*networkingv1beta1.IngressClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*networkingv1beta1.IngressClass)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_IngressClass(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*networkingv1beta1.IngressClass),
|
||||
safe.Cast[*networkingv1beta1.IngressClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/node/v1/zz_generated.validations.go
generated
21
pkg/apis/node/v1/zz_generated.validations.go
generated
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type RuntimeClass
|
||||
scheme.AddValidationFunc((*nodev1.RuntimeClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RuntimeClass(ctx, op, nil /* fldPath */, obj.(*nodev1.RuntimeClass), safe.Cast[*nodev1.RuntimeClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*nodev1.RuntimeClass)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RuntimeClass(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*nodev1.RuntimeClass),
|
||||
safe.Cast[*nodev1.RuntimeClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/node/v1alpha1/zz_generated.validations.go
generated
21
pkg/apis/node/v1alpha1/zz_generated.validations.go
generated
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type RuntimeClass
|
||||
scheme.AddValidationFunc((*nodev1alpha1.RuntimeClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RuntimeClass(ctx, op, nil /* fldPath */, obj.(*nodev1alpha1.RuntimeClass), safe.Cast[*nodev1alpha1.RuntimeClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*nodev1alpha1.RuntimeClass)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RuntimeClass(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*nodev1alpha1.RuntimeClass),
|
||||
safe.Cast[*nodev1alpha1.RuntimeClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
21
pkg/apis/node/v1beta1/zz_generated.validations.go
generated
21
pkg/apis/node/v1beta1/zz_generated.validations.go
generated
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type RuntimeClass
|
||||
scheme.AddValidationFunc((*nodev1beta1.RuntimeClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RuntimeClass(ctx, op, nil /* fldPath */, obj.(*nodev1beta1.RuntimeClass), safe.Cast[*nodev1beta1.RuntimeClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*nodev1beta1.RuntimeClass)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RuntimeClass(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*nodev1beta1.RuntimeClass),
|
||||
safe.Cast[*nodev1beta1.RuntimeClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
84
pkg/apis/rbac/v1/zz_generated.validations.go
generated
84
pkg/apis/rbac/v1/zz_generated.validations.go
generated
|
|
@ -40,37 +40,65 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type ClusterRole
|
||||
scheme.AddValidationFunc((*rbacv1.ClusterRole)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRole(ctx, op, nil /* fldPath */, obj.(*rbacv1.ClusterRole), safe.Cast[*rbacv1.ClusterRole](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1.ClusterRole)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRole(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1.ClusterRole),
|
||||
safe.Cast[*rbacv1.ClusterRole](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ClusterRoleBinding
|
||||
scheme.AddValidationFunc((*rbacv1.ClusterRoleBinding)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRoleBinding(ctx, op, nil /* fldPath */, obj.(*rbacv1.ClusterRoleBinding), safe.Cast[*rbacv1.ClusterRoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1.ClusterRoleBinding)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRoleBinding(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1.ClusterRoleBinding),
|
||||
safe.Cast[*rbacv1.ClusterRoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type Role
|
||||
scheme.AddValidationFunc((*rbacv1.Role)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Role(ctx, op, nil /* fldPath */, obj.(*rbacv1.Role), safe.Cast[*rbacv1.Role](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1.Role)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Role(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1.Role),
|
||||
safe.Cast[*rbacv1.Role](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type RoleBinding
|
||||
scheme.AddValidationFunc((*rbacv1.RoleBinding)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RoleBinding(ctx, op, nil /* fldPath */, obj.(*rbacv1.RoleBinding), safe.Cast[*rbacv1.RoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1.RoleBinding)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RoleBinding(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1.RoleBinding),
|
||||
safe.Cast[*rbacv1.RoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
84
pkg/apis/rbac/v1alpha1/zz_generated.validations.go
generated
84
pkg/apis/rbac/v1alpha1/zz_generated.validations.go
generated
|
|
@ -40,37 +40,65 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type ClusterRole
|
||||
scheme.AddValidationFunc((*rbacv1alpha1.ClusterRole)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRole(ctx, op, nil /* fldPath */, obj.(*rbacv1alpha1.ClusterRole), safe.Cast[*rbacv1alpha1.ClusterRole](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1alpha1.ClusterRole)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRole(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1alpha1.ClusterRole),
|
||||
safe.Cast[*rbacv1alpha1.ClusterRole](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ClusterRoleBinding
|
||||
scheme.AddValidationFunc((*rbacv1alpha1.ClusterRoleBinding)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRoleBinding(ctx, op, nil /* fldPath */, obj.(*rbacv1alpha1.ClusterRoleBinding), safe.Cast[*rbacv1alpha1.ClusterRoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1alpha1.ClusterRoleBinding)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRoleBinding(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1alpha1.ClusterRoleBinding),
|
||||
safe.Cast[*rbacv1alpha1.ClusterRoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type Role
|
||||
scheme.AddValidationFunc((*rbacv1alpha1.Role)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Role(ctx, op, nil /* fldPath */, obj.(*rbacv1alpha1.Role), safe.Cast[*rbacv1alpha1.Role](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1alpha1.Role)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Role(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1alpha1.Role),
|
||||
safe.Cast[*rbacv1alpha1.Role](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type RoleBinding
|
||||
scheme.AddValidationFunc((*rbacv1alpha1.RoleBinding)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RoleBinding(ctx, op, nil /* fldPath */, obj.(*rbacv1alpha1.RoleBinding), safe.Cast[*rbacv1alpha1.RoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1alpha1.RoleBinding)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RoleBinding(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1alpha1.RoleBinding),
|
||||
safe.Cast[*rbacv1alpha1.RoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
84
pkg/apis/rbac/v1beta1/zz_generated.validations.go
generated
84
pkg/apis/rbac/v1beta1/zz_generated.validations.go
generated
|
|
@ -40,37 +40,65 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type ClusterRole
|
||||
scheme.AddValidationFunc((*rbacv1beta1.ClusterRole)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRole(ctx, op, nil /* fldPath */, obj.(*rbacv1beta1.ClusterRole), safe.Cast[*rbacv1beta1.ClusterRole](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1beta1.ClusterRole)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRole(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1beta1.ClusterRole),
|
||||
safe.Cast[*rbacv1beta1.ClusterRole](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ClusterRoleBinding
|
||||
scheme.AddValidationFunc((*rbacv1beta1.ClusterRoleBinding)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRoleBinding(ctx, op, nil /* fldPath */, obj.(*rbacv1beta1.ClusterRoleBinding), safe.Cast[*rbacv1beta1.ClusterRoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1beta1.ClusterRoleBinding)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ClusterRoleBinding(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1beta1.ClusterRoleBinding),
|
||||
safe.Cast[*rbacv1beta1.ClusterRoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type Role
|
||||
scheme.AddValidationFunc((*rbacv1beta1.Role)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Role(ctx, op, nil /* fldPath */, obj.(*rbacv1beta1.Role), safe.Cast[*rbacv1beta1.Role](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1beta1.Role)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Role(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1beta1.Role),
|
||||
safe.Cast[*rbacv1beta1.Role](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type RoleBinding
|
||||
scheme.AddValidationFunc((*rbacv1beta1.RoleBinding)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RoleBinding(ctx, op, nil /* fldPath */, obj.(*rbacv1beta1.RoleBinding), safe.Cast[*rbacv1beta1.RoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*rbacv1beta1.RoleBinding)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_RoleBinding(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*rbacv1beta1.RoleBinding),
|
||||
safe.Cast[*rbacv1beta1.RoleBinding](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
84
pkg/apis/resource/v1/zz_generated.validations.go
generated
84
pkg/apis/resource/v1/zz_generated.validations.go
generated
|
|
@ -43,37 +43,65 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type DeviceClass
|
||||
scheme.AddValidationFunc((*resourcev1.DeviceClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_DeviceClass(ctx, op, nil /* fldPath */, obj.(*resourcev1.DeviceClass), safe.Cast[*resourcev1.DeviceClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1.DeviceClass)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_DeviceClass(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1.DeviceClass),
|
||||
safe.Cast[*resourcev1.DeviceClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ResourceClaim
|
||||
scheme.AddValidationFunc((*resourcev1.ResourceClaim)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_ResourceClaim(ctx, op, nil /* fldPath */, obj.(*resourcev1.ResourceClaim), safe.Cast[*resourcev1.ResourceClaim](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1.ResourceClaim)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_ResourceClaim(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1.ResourceClaim),
|
||||
safe.Cast[*resourcev1.ResourceClaim](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ResourceClaimTemplate
|
||||
scheme.AddValidationFunc((*resourcev1.ResourceClaimTemplate)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceClaimTemplate(ctx, op, nil /* fldPath */, obj.(*resourcev1.ResourceClaimTemplate), safe.Cast[*resourcev1.ResourceClaimTemplate](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1.ResourceClaimTemplate)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceClaimTemplate(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1.ResourceClaimTemplate),
|
||||
safe.Cast[*resourcev1.ResourceClaimTemplate](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ResourceSlice
|
||||
scheme.AddValidationFunc((*resourcev1.ResourceSlice)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceSlice(ctx, op, nil /* fldPath */, obj.(*resourcev1.ResourceSlice), safe.Cast[*resourcev1.ResourceSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1.ResourceSlice)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceSlice(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1.ResourceSlice),
|
||||
safe.Cast[*resourcev1.ResourceSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,21 +42,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type DeviceTaintRule
|
||||
scheme.AddValidationFunc((*resourcev1alpha3.DeviceTaintRule)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_DeviceTaintRule(ctx, op, nil /* fldPath */, obj.(*resourcev1alpha3.DeviceTaintRule), safe.Cast[*resourcev1alpha3.DeviceTaintRule](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1alpha3.DeviceTaintRule)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_DeviceTaintRule(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1alpha3.DeviceTaintRule),
|
||||
safe.Cast[*resourcev1alpha3.DeviceTaintRule](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ResourcePoolStatusRequest
|
||||
scheme.AddValidationFunc((*resourcev1alpha3.ResourcePoolStatusRequest)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_ResourcePoolStatusRequest(ctx, op, nil /* fldPath */, obj.(*resourcev1alpha3.ResourcePoolStatusRequest), safe.Cast[*resourcev1alpha3.ResourcePoolStatusRequest](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1alpha3.ResourcePoolStatusRequest)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_ResourcePoolStatusRequest(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1alpha3.ResourcePoolStatusRequest),
|
||||
safe.Cast[*resourcev1alpha3.ResourcePoolStatusRequest](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,37 +43,65 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type DeviceClass
|
||||
scheme.AddValidationFunc((*resourcev1beta1.DeviceClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_DeviceClass(ctx, op, nil /* fldPath */, obj.(*resourcev1beta1.DeviceClass), safe.Cast[*resourcev1beta1.DeviceClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1beta1.DeviceClass)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_DeviceClass(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1beta1.DeviceClass),
|
||||
safe.Cast[*resourcev1beta1.DeviceClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ResourceClaim
|
||||
scheme.AddValidationFunc((*resourcev1beta1.ResourceClaim)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_ResourceClaim(ctx, op, nil /* fldPath */, obj.(*resourcev1beta1.ResourceClaim), safe.Cast[*resourcev1beta1.ResourceClaim](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1beta1.ResourceClaim)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_ResourceClaim(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1beta1.ResourceClaim),
|
||||
safe.Cast[*resourcev1beta1.ResourceClaim](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ResourceClaimTemplate
|
||||
scheme.AddValidationFunc((*resourcev1beta1.ResourceClaimTemplate)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceClaimTemplate(ctx, op, nil /* fldPath */, obj.(*resourcev1beta1.ResourceClaimTemplate), safe.Cast[*resourcev1beta1.ResourceClaimTemplate](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1beta1.ResourceClaimTemplate)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceClaimTemplate(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1beta1.ResourceClaimTemplate),
|
||||
safe.Cast[*resourcev1beta1.ResourceClaimTemplate](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ResourceSlice
|
||||
scheme.AddValidationFunc((*resourcev1beta1.ResourceSlice)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceSlice(ctx, op, nil /* fldPath */, obj.(*resourcev1beta1.ResourceSlice), safe.Cast[*resourcev1beta1.ResourceSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1beta1.ResourceSlice)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceSlice(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1beta1.ResourceSlice),
|
||||
safe.Cast[*resourcev1beta1.ResourceSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
105
pkg/apis/resource/v1beta2/zz_generated.validations.go
generated
105
pkg/apis/resource/v1beta2/zz_generated.validations.go
generated
|
|
@ -43,45 +43,80 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type DeviceClass
|
||||
scheme.AddValidationFunc((*resourcev1beta2.DeviceClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_DeviceClass(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.DeviceClass), safe.Cast[*resourcev1beta2.DeviceClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1beta2.DeviceClass)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_DeviceClass(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1beta2.DeviceClass),
|
||||
safe.Cast[*resourcev1beta2.DeviceClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type DeviceTaintRule
|
||||
scheme.AddValidationFunc((*resourcev1beta2.DeviceTaintRule)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_DeviceTaintRule(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.DeviceTaintRule), safe.Cast[*resourcev1beta2.DeviceTaintRule](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1beta2.DeviceTaintRule)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_DeviceTaintRule(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1beta2.DeviceTaintRule),
|
||||
safe.Cast[*resourcev1beta2.DeviceTaintRule](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ResourceClaim
|
||||
scheme.AddValidationFunc((*resourcev1beta2.ResourceClaim)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_ResourceClaim(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.ResourceClaim), safe.Cast[*resourcev1beta2.ResourceClaim](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1beta2.ResourceClaim)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_ResourceClaim(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1beta2.ResourceClaim),
|
||||
safe.Cast[*resourcev1beta2.ResourceClaim](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ResourceClaimTemplate
|
||||
scheme.AddValidationFunc((*resourcev1beta2.ResourceClaimTemplate)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceClaimTemplate(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.ResourceClaimTemplate), safe.Cast[*resourcev1beta2.ResourceClaimTemplate](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1beta2.ResourceClaimTemplate)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceClaimTemplate(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1beta2.ResourceClaimTemplate),
|
||||
safe.Cast[*resourcev1beta2.ResourceClaimTemplate](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type ResourceSlice
|
||||
scheme.AddValidationFunc((*resourcev1beta2.ResourceSlice)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceSlice(ctx, op, nil /* fldPath */, obj.(*resourcev1beta2.ResourceSlice), safe.Cast[*resourcev1beta2.ResourceSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*resourcev1beta2.ResourceSlice)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ResourceSlice(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*resourcev1beta2.ResourceSlice),
|
||||
safe.Cast[*resourcev1beta2.ResourceSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,21 +41,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type PodGroup
|
||||
scheme.AddValidationFunc((*schedulingv1alpha2.PodGroup)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_PodGroup(ctx, op, nil /* fldPath */, obj.(*schedulingv1alpha2.PodGroup), safe.Cast[*schedulingv1alpha2.PodGroup](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*schedulingv1alpha2.PodGroup)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_PodGroup(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*schedulingv1alpha2.PodGroup),
|
||||
safe.Cast[*schedulingv1alpha2.PodGroup](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type Workload
|
||||
scheme.AddValidationFunc((*schedulingv1alpha2.Workload)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Workload(ctx, op, nil /* fldPath */, obj.(*schedulingv1alpha2.Workload), safe.Cast[*schedulingv1alpha2.Workload](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*schedulingv1alpha2.Workload)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Workload(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*schedulingv1alpha2.Workload),
|
||||
safe.Cast[*schedulingv1alpha2.Workload](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
42
pkg/apis/storage/v1/zz_generated.validations.go
generated
42
pkg/apis/storage/v1/zz_generated.validations.go
generated
|
|
@ -41,21 +41,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type StorageClass
|
||||
scheme.AddValidationFunc((*storagev1.StorageClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StorageClass(ctx, op, nil /* fldPath */, obj.(*storagev1.StorageClass), safe.Cast[*storagev1.StorageClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*storagev1.StorageClass)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StorageClass(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*storagev1.StorageClass),
|
||||
safe.Cast[*storagev1.StorageClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type VolumeAttachment
|
||||
scheme.AddValidationFunc((*storagev1.VolumeAttachment)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_VolumeAttachment(ctx, op, nil /* fldPath */, obj.(*storagev1.VolumeAttachment), safe.Cast[*storagev1.VolumeAttachment](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*storagev1.VolumeAttachment)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_VolumeAttachment(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*storagev1.VolumeAttachment),
|
||||
safe.Cast[*storagev1.VolumeAttachment](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,13 +40,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type VolumeAttachment
|
||||
scheme.AddValidationFunc((*storagev1alpha1.VolumeAttachment)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_VolumeAttachment(ctx, op, nil /* fldPath */, obj.(*storagev1alpha1.VolumeAttachment), safe.Cast[*storagev1alpha1.VolumeAttachment](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*storagev1alpha1.VolumeAttachment)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_VolumeAttachment(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*storagev1alpha1.VolumeAttachment),
|
||||
safe.Cast[*storagev1alpha1.VolumeAttachment](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
42
pkg/apis/storage/v1beta1/zz_generated.validations.go
generated
42
pkg/apis/storage/v1beta1/zz_generated.validations.go
generated
|
|
@ -41,21 +41,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type StorageClass
|
||||
scheme.AddValidationFunc((*storagev1beta1.StorageClass)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StorageClass(ctx, op, nil /* fldPath */, obj.(*storagev1beta1.StorageClass), safe.Cast[*storagev1beta1.StorageClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*storagev1beta1.StorageClass)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StorageClass(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*storagev1beta1.StorageClass),
|
||||
safe.Cast[*storagev1beta1.StorageClass](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type VolumeAttachment
|
||||
scheme.AddValidationFunc((*storagev1beta1.VolumeAttachment)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_VolumeAttachment(ctx, op, nil /* fldPath */, obj.(*storagev1beta1.VolumeAttachment), safe.Cast[*storagev1beta1.VolumeAttachment](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*storagev1beta1.VolumeAttachment)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/", "/status":
|
||||
return Validate_VolumeAttachment(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*storagev1beta1.VolumeAttachment),
|
||||
safe.Cast[*storagev1beta1.VolumeAttachment](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,21 +39,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *runtime.Scheme) error {
|
||||
// type NetworkPolicy
|
||||
scheme.AddValidationFunc((*NetworkPolicy)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_NetworkPolicy(ctx, op, nil /* fldPath */, obj.(*NetworkPolicy), safe.Cast[*NetworkPolicy](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*NetworkPolicy)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_NetworkPolicy(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*NetworkPolicy),
|
||||
safe.Cast[*NetworkPolicy](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type Scale
|
||||
scheme.AddValidationFunc((*Scale)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/scale":
|
||||
return Validate_Scale(ctx, op, nil /* fldPath */, obj.(*Scale), safe.Cast[*Scale](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Scale)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/scale":
|
||||
return Validate_Scale(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Scale),
|
||||
safe.Cast[*Scale](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,29 +38,50 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T2
|
||||
scheme.AddValidationFunc((*T2)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T2(ctx, op, nil /* fldPath */, obj.(*T2), safe.Cast[*T2](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T2)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T2(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T2),
|
||||
safe.Cast[*T2](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T4
|
||||
scheme.AddValidationFunc((*T4)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T4(ctx, op, nil /* fldPath */, obj.(*T4), safe.Cast[*T4](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T4)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T4(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T4),
|
||||
safe.Cast[*T4](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,21 +38,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type E1
|
||||
scheme.AddValidationFunc((*E1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_E1(ctx, op, nil /* fldPath */, obj.(*E1), safe.Cast[*E1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*E1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_E1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*E1),
|
||||
safe.Cast[*E1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T
|
||||
scheme.AddValidationFunc((*T)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T(ctx, op, nil /* fldPath */, obj.(*T), safe.Cast[*T](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T),
|
||||
safe.Cast[*T](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,13 +42,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,45 +38,80 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T00
|
||||
scheme.AddValidationFunc((*T00)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T00(ctx, op, nil /* fldPath */, obj.(*T00), safe.Cast[*T00](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T00)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T00(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T00),
|
||||
safe.Cast[*T00](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T01
|
||||
scheme.AddValidationFunc((*T01)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T01(ctx, op, nil /* fldPath */, obj.(*T01), safe.Cast[*T01](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T01)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T01(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T01),
|
||||
safe.Cast[*T01](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T02
|
||||
scheme.AddValidationFunc((*T02)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T02(ctx, op, nil /* fldPath */, obj.(*T02), safe.Cast[*T02](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T02)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T02(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T02),
|
||||
safe.Cast[*T02](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T03
|
||||
scheme.AddValidationFunc((*T03)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T03(ctx, op, nil /* fldPath */, obj.(*T03), safe.Cast[*T03](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T03)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T03(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T03),
|
||||
safe.Cast[*T03](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type TMultiple
|
||||
scheme.AddValidationFunc((*TMultiple)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_TMultiple(ctx, op, nil /* fldPath */, obj.(*TMultiple), safe.Cast[*TMultiple](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*TMultiple)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_TMultiple(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*TMultiple),
|
||||
safe.Cast[*TMultiple](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,37 +38,65 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type E01
|
||||
scheme.AddValidationFunc((*E01)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_E01(ctx, op, nil /* fldPath */, obj.(*E01), safe.Cast[*E01](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*E01)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_E01(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*E01),
|
||||
safe.Cast[*E01](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type E02
|
||||
scheme.AddValidationFunc((*E02)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_E02(ctx, op, nil /* fldPath */, obj.(*E02), safe.Cast[*E02](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*E02)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_E02(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*E02),
|
||||
safe.Cast[*E02](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type E03
|
||||
scheme.AddValidationFunc((*E03)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_E03(ctx, op, nil /* fldPath */, obj.(*E03), safe.Cast[*E03](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*E03)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_E03(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*E03),
|
||||
safe.Cast[*E03](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type EMultiple
|
||||
scheme.AddValidationFunc((*EMultiple)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_EMultiple(ctx, op, nil /* fldPath */, obj.(*EMultiple), safe.Cast[*EMultiple](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*EMultiple)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_EMultiple(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*EMultiple),
|
||||
safe.Cast[*EMultiple](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,53 +39,95 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type MixComparableStruct
|
||||
scheme.AddValidationFunc((*MixComparableStruct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_MixComparableStruct(ctx, op, nil /* fldPath */, obj.(*MixComparableStruct), safe.Cast[*MixComparableStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*MixComparableStruct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_MixComparableStruct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*MixComparableStruct),
|
||||
safe.Cast[*MixComparableStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type StructEmbedded
|
||||
scheme.AddValidationFunc((*StructEmbedded)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructEmbedded(ctx, op, nil /* fldPath */, obj.(*StructEmbedded), safe.Cast[*StructEmbedded](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*StructEmbedded)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructEmbedded(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*StructEmbedded),
|
||||
safe.Cast[*StructEmbedded](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type StructMap
|
||||
scheme.AddValidationFunc((*StructMap)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructMap(ctx, op, nil /* fldPath */, obj.(*StructMap), safe.Cast[*StructMap](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*StructMap)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructMap(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*StructMap),
|
||||
safe.Cast[*StructMap](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type StructPrimitive
|
||||
scheme.AddValidationFunc((*StructPrimitive)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructPrimitive(ctx, op, nil /* fldPath */, obj.(*StructPrimitive), safe.Cast[*StructPrimitive](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*StructPrimitive)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructPrimitive(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*StructPrimitive),
|
||||
safe.Cast[*StructPrimitive](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type StructSlice
|
||||
scheme.AddValidationFunc((*StructSlice)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructSlice(ctx, op, nil /* fldPath */, obj.(*StructSlice), safe.Cast[*StructSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*StructSlice)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructSlice(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*StructSlice),
|
||||
safe.Cast[*StructSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type StructStruct
|
||||
scheme.AddValidationFunc((*StructStruct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructStruct(ctx, op, nil /* fldPath */, obj.(*StructStruct), safe.Cast[*StructStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*StructStruct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructStruct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*StructStruct),
|
||||
safe.Cast[*StructStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,21 +39,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type ItemList
|
||||
scheme.AddValidationFunc((*ItemList)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ItemList(ctx, op, nil /* fldPath */, obj.(*ItemList), safe.Cast[*ItemList](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*ItemList)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ItemList(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*ItemList),
|
||||
safe.Cast[*ItemList](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type StructSlice
|
||||
scheme.AddValidationFunc((*StructSlice)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructSlice(ctx, op, nil /* fldPath */, obj.(*StructSlice), safe.Cast[*StructSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*StructSlice)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructSlice(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*StructSlice),
|
||||
safe.Cast[*StructSlice](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type StructWithMaps
|
||||
scheme.AddValidationFunc((*StructWithMaps)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructWithMaps(ctx, op, nil /* fldPath */, obj.(*StructWithMaps), safe.Cast[*StructWithMaps](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*StructWithMaps)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructWithMaps(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*StructWithMaps),
|
||||
safe.Cast[*StructWithMaps](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,21 +39,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type StructWithSubfield
|
||||
scheme.AddValidationFunc((*StructWithSubfield)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructWithSubfield(ctx, op, nil /* fldPath */, obj.(*StructWithSubfield), safe.Cast[*StructWithSubfield](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*StructWithSubfield)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructWithSubfield(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*StructWithSubfield),
|
||||
safe.Cast[*StructWithSubfield](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,37 +39,65 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T2
|
||||
scheme.AddValidationFunc((*T2)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T2(ctx, op, nil /* fldPath */, obj.(*T2), safe.Cast[*T2](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T2)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T2(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T2),
|
||||
safe.Cast[*T2](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T3
|
||||
scheme.AddValidationFunc((*T3)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T3(ctx, op, nil /* fldPath */, obj.(*T3), safe.Cast[*T3](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T3)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T3(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T3),
|
||||
safe.Cast[*T3](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T4
|
||||
scheme.AddValidationFunc((*T4)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T4(ctx, op, nil /* fldPath */, obj.(*T4), safe.Cast[*T4](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T4)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T4(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T4),
|
||||
safe.Cast[*T4](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,29 +39,50 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T2
|
||||
scheme.AddValidationFunc((*T2)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T2(ctx, op, nil /* fldPath */, obj.(*T2), safe.Cast[*T2](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T2)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T2(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T2),
|
||||
safe.Cast[*T2](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T3
|
||||
scheme.AddValidationFunc((*T3)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T3(ctx, op, nil /* fldPath */, obj.(*T3), safe.Cast[*T3](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T3)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T3(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T3),
|
||||
safe.Cast[*T3](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,37 +39,65 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type T1
|
||||
scheme.AddValidationFunc((*T1)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(ctx, op, nil /* fldPath */, obj.(*T1), safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T1)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T1(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T1),
|
||||
safe.Cast[*T1](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T2
|
||||
scheme.AddValidationFunc((*T2)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T2(ctx, op, nil /* fldPath */, obj.(*T2), safe.Cast[*T2](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T2)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T2(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T2),
|
||||
safe.Cast[*T2](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T3
|
||||
scheme.AddValidationFunc((*T3)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T3(ctx, op, nil /* fldPath */, obj.(*T3), safe.Cast[*T3](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T3)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T3(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T3),
|
||||
safe.Cast[*T3](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type T4
|
||||
scheme.AddValidationFunc((*T4)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T4(ctx, op, nil /* fldPath */, obj.(*T4), safe.Cast[*T4](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*T4)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_T4(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*T4),
|
||||
safe.Cast[*T4](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,21 +39,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type ConditionalStruct
|
||||
scheme.AddValidationFunc((*ConditionalStruct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ConditionalStruct(ctx, op, nil /* fldPath */, obj.(*ConditionalStruct), safe.Cast[*ConditionalStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*ConditionalStruct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ConditionalStruct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*ConditionalStruct),
|
||||
safe.Cast[*ConditionalStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type MyType
|
||||
scheme.AddValidationFunc((*MyType)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_MyType(ctx, op, nil /* fldPath */, obj.(*MyType), safe.Cast[*MyType](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*MyType)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_MyType(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*MyType),
|
||||
safe.Cast[*MyType](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,13 +38,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type MyType
|
||||
scheme.AddValidationFunc((*MyType)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_MyType(ctx, op, nil /* fldPath */, obj.(*MyType), safe.Cast[*MyType](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*MyType)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_MyType(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*MyType),
|
||||
safe.Cast[*MyType](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,21 +39,35 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
// type StructWithNestedTypedef
|
||||
scheme.AddValidationFunc((*StructWithNestedTypedef)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructWithNestedTypedef(ctx, op, nil /* fldPath */, obj.(*StructWithNestedTypedef), safe.Cast[*StructWithNestedTypedef](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*StructWithNestedTypedef)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_StructWithNestedTypedef(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*StructWithNestedTypedef),
|
||||
safe.Cast[*StructWithNestedTypedef](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type AtomicSliceStruct
|
||||
scheme.AddValidationFunc((*AtomicSliceStruct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_AtomicSliceStruct(ctx, op, nil /* fldPath */, obj.(*AtomicSliceStruct), safe.Cast[*AtomicSliceStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*AtomicSliceStruct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_AtomicSliceStruct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*AtomicSliceStruct),
|
||||
safe.Cast[*AtomicSliceStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type Struct
|
||||
scheme.AddValidationFunc((*Struct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(ctx, op, nil /* fldPath */, obj.(*Struct), safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*Struct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_Struct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*Struct),
|
||||
safe.Cast[*Struct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type ListKeyStruct
|
||||
scheme.AddValidationFunc((*ListKeyStruct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ListKeyStruct(ctx, op, nil /* fldPath */, obj.(*ListKeyStruct), safe.Cast[*ListKeyStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*ListKeyStruct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ListKeyStruct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*ListKeyStruct),
|
||||
safe.Cast[*ListKeyStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type ListMapItemStruct
|
||||
scheme.AddValidationFunc((*ListMapItemStruct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ListMapItemStruct(ctx, op, nil /* fldPath */, obj.(*ListMapItemStruct), safe.Cast[*ListMapItemStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*ListMapItemStruct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ListMapItemStruct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*ListMapItemStruct),
|
||||
safe.Cast[*ListMapItemStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,20 @@ func init() { localSchemeBuilder.Register(RegisterValidations) }
|
|||
// Public to allow building arbitrary schemes.
|
||||
func RegisterValidations(scheme *testscheme.Scheme) error {
|
||||
// type ListSetStruct
|
||||
scheme.AddValidationFunc((*ListSetStruct)(nil), func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ListSetStruct(ctx, op, nil /* fldPath */, obj.(*ListSetStruct), safe.Cast[*ListSetStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath()))}
|
||||
})
|
||||
scheme.AddValidationFunc(
|
||||
(*ListSetStruct)(nil),
|
||||
func(ctx context.Context, op operation.Operation, obj, oldObj interface{}) field.ErrorList {
|
||||
switch op.Request.SubresourcePath() {
|
||||
case "/":
|
||||
return Validate_ListSetStruct(
|
||||
ctx, op, nil, /* fldPath */
|
||||
obj.(*ListSetStruct),
|
||||
safe.Cast[*ListSetStruct](oldObj))
|
||||
}
|
||||
return field.ErrorList{
|
||||
field.InternalError(nil, fmt.Errorf("no validation found for %T, subresource: %v", obj, op.Request.SubresourcePath())),
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue