func init() {
	api.AddKnownTypes("", Simple{}, SimpleList{})
	api.AddKnownTypes("v1beta1", Simple{}, SimpleList{})
	api.AddExternalConversion("Simple", convert)
	api.AddInternalConversion("Simple", convert)
	api.AddExternalConversion("SimpleList", convert)
	api.AddInternalConversion("SimpleList", convert)
}
Exemple #2
0
func TestParseCustomType(t *testing.T) {
	api.AddKnownTypes("", TestParseType{})
	api.AddKnownTypes("v1beta1", TestParseType{})
	parser := NewParser(map[string]interface{}{
		"custom": TestParseType{},
	})
	DoParseTest(t, "custom", TestParseType{
		JSONBase: api.JSONBase{APIVersion: "", ID: "my custom object", Kind: "TestParseType"},
		Data:     "test data",
	}, parser)
}
Exemple #3
0
func init() {
	api.AddKnownTypes("v1beta1",
		PodList{},
		Pod{},
		ReplicationControllerList{},
		ReplicationController{},
		ServiceList{},
		Service{},
		MinionList{},
		Minion{},
		Status{},
		ServerOpList{},
		ServerOp{},
		ContainerManifestList{},
		Endpoints{},
		Binding{},
	)
}
func init() {
	api.AddKnownTypes("", Simple{}, SimpleList{})
	api.AddKnownTypes("v1beta1", Simple{}, SimpleList{})
}
func init() {
	api.AddKnownTypes(Simple{}, SimpleList{})
}
func init() {
	api.AddKnownTypes("", TestResource{})
	api.AddKnownTypes("v1beta1", TestResource{})
}