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
I think this tests all the variations, but I understand the concern.  How about a test on kindToResource().

----- Original Message -----
> > +	"testing"
> > +)
> > +
> > +func TestDefaultRESTMapperVersionAndKindForResource(t *testing.T) {
> > +	mapper := NewDefaultRESTMapper()
> > +	testCases := map[string]struct {
> > +		Kind, APIVersion string
> > +		Err              bool
> > +	}{
> > +		"po":   {Err: true},
> > +		"pod":  {Kind: "Pod", APIVersion: Version},
> > +		"pods": {Kind: "Pod", APIVersion: Version},
> > +
> > +		"replicationcontroller":  {Kind: "ReplicationController", APIVersion:
> > Version},
> > +		"replicationcontrollers": {Kind: "ReplicationController", APIVersion:
> > Version},
> > +		"replicationControllers": {Kind: "ReplicationController", APIVersion:
> > Version},
> 
> Code coverage != does right thing :)
> 
> Specifically it's kindToResource() I'm worried about.
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/GoogleCloudPlatform/kubernetes/pull/2059/files#r19571405