Rename JSONBase -> TypeMeta in preparation for v1beta3

Will make subsequent refactor much easier
This commit is contained in:
Clayton Coleman
2014-10-07 11:12:16 -04:00
parent e294cef9d4
commit d3e51a0f24
69 changed files with 464 additions and 464 deletions

View File

@@ -24,18 +24,18 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
)
type JSONBase struct {
type TypeMeta struct {
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`
}
type InternalSimple struct {
JSONBase `json:",inline" yaml:",inline"`
TypeMeta `json:",inline" yaml:",inline"`
TestString string `json:"testString" yaml:"testString"`
}
type ExternalSimple struct {
JSONBase `json:",inline" yaml:",inline"`
TypeMeta `json:",inline" yaml:",inline"`
TestString string `json:"testString" yaml:"testString"`
}
@@ -59,7 +59,7 @@ func TestScheme(t *testing.T) {
if e, a := "externalVersion", scope.Meta().DestVersion; e != a {
t.Errorf("Expected '%v', got '%v'", e, a)
}
scope.Convert(&in.JSONBase, &out.JSONBase, 0)
scope.Convert(&in.TypeMeta, &out.TypeMeta, 0)
scope.Convert(&in.TestString, &out.TestString, 0)
internalToExternalCalls++
return nil
@@ -71,7 +71,7 @@ func TestScheme(t *testing.T) {
if e, a := "", scope.Meta().DestVersion; e != a {
t.Errorf("Expected '%v', got '%v'", e, a)
}
scope.Convert(&in.JSONBase, &out.JSONBase, 0)
scope.Convert(&in.TypeMeta, &out.TypeMeta, 0)
scope.Convert(&in.TestString, &out.TestString, 0)
externalToInternalCalls++
return nil
@@ -150,12 +150,12 @@ type ExtensionB struct {
}
type ExternalExtensionType struct {
JSONBase `json:",inline" yaml:",inline"`
TypeMeta `json:",inline" yaml:",inline"`
Extension runtime.RawExtension `json:"extension" yaml:"extension"`
}
type InternalExtensionType struct {
JSONBase `json:",inline" yaml:",inline"`
TypeMeta `json:",inline" yaml:",inline"`
Extension runtime.EmbeddedObject `json:"extension" yaml:"extension"`
}