Skip to content

Commit 9b88a33

Browse files
generated: Conversions, deep copies, and protobuf
1 parent 810c565 commit 9b88a33

14 files changed

+1098
-405
lines changed

pkg/authorization/api/deep_copy_generated.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
func init() {
1616
if err := api.Scheme.AddGeneratedDeepCopyFuncs(
17-
DeepCopy_api_AuthorizationAttributes,
17+
DeepCopy_api_Action,
1818
DeepCopy_api_ClusterPolicy,
1919
DeepCopy_api_ClusterPolicyBinding,
2020
DeepCopy_api_ClusterPolicyBindingList,
@@ -48,7 +48,7 @@ func init() {
4848
}
4949
}
5050

51-
func DeepCopy_api_AuthorizationAttributes(in AuthorizationAttributes, out *AuthorizationAttributes, c *conversion.Cloner) error {
51+
func DeepCopy_api_Action(in Action, out *Action, c *conversion.Cloner) error {
5252
out.Namespace = in.Namespace
5353
out.Verb = in.Verb
5454
out.Group = in.Group
@@ -260,7 +260,7 @@ func DeepCopy_api_LocalResourceAccessReview(in LocalResourceAccessReview, out *L
260260
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
261261
return err
262262
}
263-
if err := DeepCopy_api_AuthorizationAttributes(in.Action, &out.Action, c); err != nil {
263+
if err := DeepCopy_api_Action(in.Action, &out.Action, c); err != nil {
264264
return err
265265
}
266266
return nil
@@ -270,7 +270,7 @@ func DeepCopy_api_LocalSubjectAccessReview(in LocalSubjectAccessReview, out *Loc
270270
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
271271
return err
272272
}
273-
if err := DeepCopy_api_AuthorizationAttributes(in.Action, &out.Action, c); err != nil {
273+
if err := DeepCopy_api_Action(in.Action, &out.Action, c); err != nil {
274274
return err
275275
}
276276
out.User = in.User
@@ -468,7 +468,7 @@ func DeepCopy_api_ResourceAccessReview(in ResourceAccessReview, out *ResourceAcc
468468
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
469469
return err
470470
}
471-
if err := DeepCopy_api_AuthorizationAttributes(in.Action, &out.Action, c); err != nil {
471+
if err := DeepCopy_api_Action(in.Action, &out.Action, c); err != nil {
472472
return err
473473
}
474474
return nil
@@ -623,7 +623,7 @@ func DeepCopy_api_SubjectAccessReview(in SubjectAccessReview, out *SubjectAccess
623623
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
624624
return err
625625
}
626-
if err := DeepCopy_api_AuthorizationAttributes(in.Action, &out.Action, c); err != nil {
626+
if err := DeepCopy_api_Action(in.Action, &out.Action, c); err != nil {
627627
return err
628628
}
629629
out.User = in.User

pkg/authorization/api/v1/conversion_generated.go

+166-10
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414

1515
func init() {
1616
if err := api.Scheme.AddGeneratedConversionFuncs(
17-
Convert_v1_AuthorizationAttributes_To_api_AuthorizationAttributes,
18-
Convert_api_AuthorizationAttributes_To_v1_AuthorizationAttributes,
17+
Convert_v1_Action_To_api_Action,
18+
Convert_api_Action_To_v1_Action,
1919
Convert_v1_ClusterPolicy_To_api_ClusterPolicy,
2020
Convert_api_ClusterPolicy_To_v1_ClusterPolicy,
2121
Convert_v1_ClusterPolicyBinding_To_api_ClusterPolicyBinding,
@@ -76,7 +76,7 @@ func init() {
7676
}
7777
}
7878

79-
func autoConvert_v1_AuthorizationAttributes_To_api_AuthorizationAttributes(in *AuthorizationAttributes, out *authorization_api.AuthorizationAttributes, s conversion.Scope) error {
79+
func autoConvert_v1_Action_To_api_Action(in *Action, out *authorization_api.Action, s conversion.Scope) error {
8080
out.Namespace = in.Namespace
8181
out.Verb = in.Verb
8282
out.Group = in.Group
@@ -89,11 +89,11 @@ func autoConvert_v1_AuthorizationAttributes_To_api_AuthorizationAttributes(in *A
8989
return nil
9090
}
9191

92-
func Convert_v1_AuthorizationAttributes_To_api_AuthorizationAttributes(in *AuthorizationAttributes, out *authorization_api.AuthorizationAttributes, s conversion.Scope) error {
93-
return autoConvert_v1_AuthorizationAttributes_To_api_AuthorizationAttributes(in, out, s)
92+
func Convert_v1_Action_To_api_Action(in *Action, out *authorization_api.Action, s conversion.Scope) error {
93+
return autoConvert_v1_Action_To_api_Action(in, out, s)
9494
}
9595

96-
func autoConvert_api_AuthorizationAttributes_To_v1_AuthorizationAttributes(in *authorization_api.AuthorizationAttributes, out *AuthorizationAttributes, s conversion.Scope) error {
96+
func autoConvert_api_Action_To_v1_Action(in *authorization_api.Action, out *Action, s conversion.Scope) error {
9797
out.Namespace = in.Namespace
9898
out.Verb = in.Verb
9999
out.Group = in.Group
@@ -106,8 +106,8 @@ func autoConvert_api_AuthorizationAttributes_To_v1_AuthorizationAttributes(in *a
106106
return nil
107107
}
108108

109-
func Convert_api_AuthorizationAttributes_To_v1_AuthorizationAttributes(in *authorization_api.AuthorizationAttributes, out *AuthorizationAttributes, s conversion.Scope) error {
110-
return autoConvert_api_AuthorizationAttributes_To_v1_AuthorizationAttributes(in, out, s)
109+
func Convert_api_Action_To_v1_Action(in *authorization_api.Action, out *Action, s conversion.Scope) error {
110+
return autoConvert_api_Action_To_v1_Action(in, out, s)
111111
}
112112

113113
func autoConvert_v1_ClusterPolicyBindingList_To_api_ClusterPolicyBindingList(in *ClusterPolicyBindingList, out *authorization_api.ClusterPolicyBindingList, s conversion.Scope) error {
@@ -406,6 +406,70 @@ func Convert_api_IsPersonalSubjectAccessReview_To_v1_IsPersonalSubjectAccessRevi
406406
return autoConvert_api_IsPersonalSubjectAccessReview_To_v1_IsPersonalSubjectAccessReview(in, out, s)
407407
}
408408

409+
func autoConvert_v1_LocalResourceAccessReview_To_api_LocalResourceAccessReview(in *LocalResourceAccessReview, out *authorization_api.LocalResourceAccessReview, s conversion.Scope) error {
410+
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
411+
return err
412+
}
413+
if err := Convert_v1_Action_To_api_Action(&in.Action, &out.Action, s); err != nil {
414+
return err
415+
}
416+
return nil
417+
}
418+
419+
func Convert_v1_LocalResourceAccessReview_To_api_LocalResourceAccessReview(in *LocalResourceAccessReview, out *authorization_api.LocalResourceAccessReview, s conversion.Scope) error {
420+
return autoConvert_v1_LocalResourceAccessReview_To_api_LocalResourceAccessReview(in, out, s)
421+
}
422+
423+
func autoConvert_api_LocalResourceAccessReview_To_v1_LocalResourceAccessReview(in *authorization_api.LocalResourceAccessReview, out *LocalResourceAccessReview, s conversion.Scope) error {
424+
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
425+
return err
426+
}
427+
if err := Convert_api_Action_To_v1_Action(&in.Action, &out.Action, s); err != nil {
428+
return err
429+
}
430+
return nil
431+
}
432+
433+
func Convert_api_LocalResourceAccessReview_To_v1_LocalResourceAccessReview(in *authorization_api.LocalResourceAccessReview, out *LocalResourceAccessReview, s conversion.Scope) error {
434+
return autoConvert_api_LocalResourceAccessReview_To_v1_LocalResourceAccessReview(in, out, s)
435+
}
436+
437+
func autoConvert_v1_LocalSubjectAccessReview_To_api_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *authorization_api.LocalSubjectAccessReview, s conversion.Scope) error {
438+
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
439+
return err
440+
}
441+
if err := Convert_v1_Action_To_api_Action(&in.Action, &out.Action, s); err != nil {
442+
return err
443+
}
444+
out.User = in.User
445+
if in.Scopes != nil {
446+
in, out := &in.Scopes, &out.Scopes
447+
*out = make([]string, len(*in))
448+
copy(*out, *in)
449+
} else {
450+
out.Scopes = nil
451+
}
452+
return nil
453+
}
454+
455+
func autoConvert_api_LocalSubjectAccessReview_To_v1_LocalSubjectAccessReview(in *authorization_api.LocalSubjectAccessReview, out *LocalSubjectAccessReview, s conversion.Scope) error {
456+
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
457+
return err
458+
}
459+
if err := Convert_api_Action_To_v1_Action(&in.Action, &out.Action, s); err != nil {
460+
return err
461+
}
462+
out.User = in.User
463+
if in.Scopes != nil {
464+
in, out := &in.Scopes, &out.Scopes
465+
*out = make(OptionalScopes, len(*in))
466+
copy(*out, *in)
467+
} else {
468+
out.Scopes = nil
469+
}
470+
return nil
471+
}
472+
409473
func autoConvert_v1_PolicyBindingList_To_api_PolicyBindingList(in *PolicyBindingList, out *authorization_api.PolicyBindingList, s conversion.Scope) error {
410474
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
411475
return err
@@ -506,6 +570,50 @@ func Convert_api_PolicyList_To_v1_PolicyList(in *authorization_api.PolicyList, o
506570
return autoConvert_api_PolicyList_To_v1_PolicyList(in, out, s)
507571
}
508572

573+
func autoConvert_v1_ResourceAccessReview_To_api_ResourceAccessReview(in *ResourceAccessReview, out *authorization_api.ResourceAccessReview, s conversion.Scope) error {
574+
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
575+
return err
576+
}
577+
if err := Convert_v1_Action_To_api_Action(&in.Action, &out.Action, s); err != nil {
578+
return err
579+
}
580+
return nil
581+
}
582+
583+
func Convert_v1_ResourceAccessReview_To_api_ResourceAccessReview(in *ResourceAccessReview, out *authorization_api.ResourceAccessReview, s conversion.Scope) error {
584+
return autoConvert_v1_ResourceAccessReview_To_api_ResourceAccessReview(in, out, s)
585+
}
586+
587+
func autoConvert_api_ResourceAccessReview_To_v1_ResourceAccessReview(in *authorization_api.ResourceAccessReview, out *ResourceAccessReview, s conversion.Scope) error {
588+
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
589+
return err
590+
}
591+
if err := Convert_api_Action_To_v1_Action(&in.Action, &out.Action, s); err != nil {
592+
return err
593+
}
594+
return nil
595+
}
596+
597+
func Convert_api_ResourceAccessReview_To_v1_ResourceAccessReview(in *authorization_api.ResourceAccessReview, out *ResourceAccessReview, s conversion.Scope) error {
598+
return autoConvert_api_ResourceAccessReview_To_v1_ResourceAccessReview(in, out, s)
599+
}
600+
601+
func autoConvert_v1_ResourceAccessReviewResponse_To_api_ResourceAccessReviewResponse(in *ResourceAccessReviewResponse, out *authorization_api.ResourceAccessReviewResponse, s conversion.Scope) error {
602+
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
603+
return err
604+
}
605+
out.Namespace = in.Namespace
606+
return nil
607+
}
608+
609+
func autoConvert_api_ResourceAccessReviewResponse_To_v1_ResourceAccessReviewResponse(in *authorization_api.ResourceAccessReviewResponse, out *ResourceAccessReviewResponse, s conversion.Scope) error {
610+
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
611+
return err
612+
}
613+
out.Namespace = in.Namespace
614+
return nil
615+
}
616+
509617
func autoConvert_v1_Role_To_api_Role(in *Role, out *authorization_api.Role, s conversion.Scope) error {
510618
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
511619
return err
@@ -715,7 +823,13 @@ func Convert_api_SelfSubjectRulesReview_To_v1_SelfSubjectRulesReview(in *authori
715823
}
716824

717825
func autoConvert_v1_SelfSubjectRulesReviewSpec_To_api_SelfSubjectRulesReviewSpec(in *SelfSubjectRulesReviewSpec, out *authorization_api.SelfSubjectRulesReviewSpec, s conversion.Scope) error {
718-
out.Scopes = in.Scopes
826+
if in.Scopes != nil {
827+
in, out := &in.Scopes, &out.Scopes
828+
*out = make([]string, len(*in))
829+
copy(*out, *in)
830+
} else {
831+
out.Scopes = nil
832+
}
719833
return nil
720834
}
721835

@@ -724,14 +838,56 @@ func Convert_v1_SelfSubjectRulesReviewSpec_To_api_SelfSubjectRulesReviewSpec(in
724838
}
725839

726840
func autoConvert_api_SelfSubjectRulesReviewSpec_To_v1_SelfSubjectRulesReviewSpec(in *authorization_api.SelfSubjectRulesReviewSpec, out *SelfSubjectRulesReviewSpec, s conversion.Scope) error {
727-
out.Scopes = in.Scopes
841+
if in.Scopes != nil {
842+
in, out := &in.Scopes, &out.Scopes
843+
*out = make(OptionalScopes, len(*in))
844+
copy(*out, *in)
845+
} else {
846+
out.Scopes = nil
847+
}
728848
return nil
729849
}
730850

731851
func Convert_api_SelfSubjectRulesReviewSpec_To_v1_SelfSubjectRulesReviewSpec(in *authorization_api.SelfSubjectRulesReviewSpec, out *SelfSubjectRulesReviewSpec, s conversion.Scope) error {
732852
return autoConvert_api_SelfSubjectRulesReviewSpec_To_v1_SelfSubjectRulesReviewSpec(in, out, s)
733853
}
734854

855+
func autoConvert_v1_SubjectAccessReview_To_api_SubjectAccessReview(in *SubjectAccessReview, out *authorization_api.SubjectAccessReview, s conversion.Scope) error {
856+
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
857+
return err
858+
}
859+
if err := Convert_v1_Action_To_api_Action(&in.Action, &out.Action, s); err != nil {
860+
return err
861+
}
862+
out.User = in.User
863+
if in.Scopes != nil {
864+
in, out := &in.Scopes, &out.Scopes
865+
*out = make([]string, len(*in))
866+
copy(*out, *in)
867+
} else {
868+
out.Scopes = nil
869+
}
870+
return nil
871+
}
872+
873+
func autoConvert_api_SubjectAccessReview_To_v1_SubjectAccessReview(in *authorization_api.SubjectAccessReview, out *SubjectAccessReview, s conversion.Scope) error {
874+
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
875+
return err
876+
}
877+
if err := Convert_api_Action_To_v1_Action(&in.Action, &out.Action, s); err != nil {
878+
return err
879+
}
880+
out.User = in.User
881+
if in.Scopes != nil {
882+
in, out := &in.Scopes, &out.Scopes
883+
*out = make(OptionalScopes, len(*in))
884+
copy(*out, *in)
885+
} else {
886+
out.Scopes = nil
887+
}
888+
return nil
889+
}
890+
735891
func autoConvert_v1_SubjectAccessReviewResponse_To_api_SubjectAccessReviewResponse(in *SubjectAccessReviewResponse, out *authorization_api.SubjectAccessReviewResponse, s conversion.Scope) error {
736892
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
737893
return err

0 commit comments

Comments
 (0)