Define a mapping between REST resource name and kind/apiVersion

Allows clients to abstractly map user input to generic resource
paths as per docs/api-conventions.md

Extracted from #2000 and supports #1958
Yeah, seriously.  I'm going to push an update.


> On Oct 31, 2014, at 1:25 PM, Daniel Smith <notifications@github.com> wrote:
> 
> In pkg/api/latest/latest.go:
> 
> > @@ -83,3 +88,21 @@ func InterfacesFor(version string) (*VersionInterfaces, error) {
> >  		return nil, fmt.Errorf("unsupported storage version: %s (valid: %s)", version, strings.Join(Versions, ", "))
> >  	}
> >  }
> > +
> > +func init() {
> > +	mapper := meta.NewDefaultRESTMapper(
> > +		Versions,
> > +		func(version string) (codec runtime.Codec, accesor meta.MetadataAccessor, ok bool) {
> Wow, this is an argument against named return params if I ever saw one. @mfojtik good catch.
> 
> —
> Reply to this email directly or view it on GitHub.