func autoConvert_v1beta1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error {
	out.Username = in.Username
	out.UID = in.UID
	out.Groups = *(*[]string)(unsafe.Pointer(&in.Groups))
	out.Extra = *(*map[string]authentication.ExtraValue)(unsafe.Pointer(&in.Extra))
	return nil
}
Ejemplo n.º 2
0
func autoConvert_v1beta1_UserInfo_To_authentication_UserInfo(in *UserInfo, out *authentication.UserInfo, s conversion.Scope) error {
	out.Username = in.Username
	out.UID = in.UID
	out.Groups = in.Groups
	if in.Extra != nil {
		in, out := &in.Extra, &out.Extra
		*out = make(map[string]authentication.ExtraValue, len(*in))
		for key, val := range *in {
			newVal := new(authentication.ExtraValue)
			// TODO: Inefficient conversion - can we improve it?
			if err := s.Convert(&val, newVal, 0); err != nil {
				return err
			}
			(*out)[key] = *newVal
		}
	} else {
		out.Extra = nil
	}
	return nil
}