Exemplo n.º 1
0
func autoConvert_v1_ScopeRestriction_To_api_ScopeRestriction(in *ScopeRestriction, out *api.ScopeRestriction, s conversion.Scope) error {
	out.ExactValues = in.ExactValues
	if in.ClusterRole != nil {
		in, out := &in.ClusterRole, &out.ClusterRole
		*out = new(api.ClusterRoleScopeRestriction)
		if err := Convert_v1_ClusterRoleScopeRestriction_To_api_ClusterRoleScopeRestriction(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.ClusterRole = nil
	}
	return nil
}
Exemplo n.º 2
0
func autoConvert_v1_ScopeRestriction_To_api_ScopeRestriction(in *ScopeRestriction, out *oauth_api.ScopeRestriction, s conversion.Scope) error {
	if in.ExactValues != nil {
		in, out := &in.ExactValues, &out.ExactValues
		*out = make([]string, len(*in))
		copy(*out, *in)
	} else {
		out.ExactValues = nil
	}
	if in.ClusterRole != nil {
		in, out := &in.ClusterRole, &out.ClusterRole
		*out = new(oauth_api.ClusterRoleScopeRestriction)
		if err := Convert_v1_ClusterRoleScopeRestriction_To_api_ClusterRoleScopeRestriction(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.ClusterRole = nil
	}
	return nil
}
Exemplo n.º 3
0
func autoConvert_v1_ScopeRestriction_To_api_ScopeRestriction(in *ScopeRestriction, out *oauth_api.ScopeRestriction, s conversion.Scope) error {
	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
		defaulting.(func(*ScopeRestriction))(in)
	}
	if in.ExactValues != nil {
		in, out := &in.ExactValues, &out.ExactValues
		*out = make([]string, len(*in))
		copy(*out, *in)
	} else {
		out.ExactValues = nil
	}
	if in.ClusterRole != nil {
		in, out := &in.ClusterRole, &out.ClusterRole
		*out = new(oauth_api.ClusterRoleScopeRestriction)
		if err := Convert_v1_ClusterRoleScopeRestriction_To_api_ClusterRoleScopeRestriction(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.ClusterRole = nil
	}
	return nil
}
Exemplo n.º 4
0
func autoConvert_v1_ScopeRestriction_To_api_ScopeRestriction(in *ScopeRestriction, out *api.ScopeRestriction, s conversion.Scope) error {
	out.ExactValues = *(*[]string)(unsafe.Pointer(&in.ExactValues))
	out.ClusterRole = (*api.ClusterRoleScopeRestriction)(unsafe.Pointer(in.ClusterRole))
	return nil
}