Fork API types.

All tests pass (for now...)  Rebasing this PR is a _pain_
SGTM


On Tue, Jul 22, 2014 at 10:29 PM, Daniel Smith <notifications@github.com>
wrote:

> In pkg/api/helper.go:
>
> > +		}
> > +		result.APIVersion = ""
> > +		return &result, nil
> > +	default:
> > +		fn, ok := internalFuncs[reflect.ValueOf(cObj).Elem().Type().Name()]
> > +		if !ok {
> > +			fmt.Printf("unknown object to internalize: %s", reflect.ValueOf(cObj).Type().Name())
> > +			panic(fmt.Sprintf("unknown object to internalize: %s", reflect.ValueOf(cObj).Type().Name()))
> > +		}
> > +		return fn(cObj)
> > +	}
> > +	return obj, nil
> > +}
> > +
> > +// TODO: switch to registered functions for each type.
> > +func externalize(obj interface{}) (interface{}, error) {
>
> I agree-- the interface for externalize should take the destination
> version as an additional parameter. I think we can change that later,
> though. As for placing the translation functions in the v1betaX packages,
> that may be possible-- I'm OK with it as long as only the api package has
> to include those other packages. I want to contain the ugly translations
> and keep it separate from the rest of the codebase as much as possible.
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/565/files#r15271699>
> .
>