Ejemplo n.º 1
0
func autoConvert_v1_LocalSubjectAccessReview_To_api_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *api.LocalSubjectAccessReview, s conversion.Scope) error {
	if err := Convert_v1_Action_To_api_Action(&in.Action, &out.Action, s); err != nil {
		return err
	}
	out.User = in.User
	// INFO: in.GroupsSlice opted out of conversion generation
	out.Scopes = *(*[]string)(unsafe.Pointer(&in.Scopes))
	return nil
}
Ejemplo n.º 2
0
func autoConvert_v1_LocalSubjectAccessReview_To_api_LocalSubjectAccessReview(in *LocalSubjectAccessReview, out *api.LocalSubjectAccessReview, s conversion.Scope) error {
	if err := pkg_api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
		return err
	}
	if err := Convert_v1_Action_To_api_Action(&in.Action, &out.Action, s); err != nil {
		return err
	}
	out.User = in.User
	if in.Scopes != nil {
		in, out := &in.Scopes, &out.Scopes
		*out = make([]string, len(*in))
		copy(*out, *in)
	} else {
		out.Scopes = nil
	}
	return nil
}