Populate 'Kind' field in all API types being returned.

This commit is contained in:
Brendan Burns
2014-06-07 21:07:20 -07:00
parent a70141307a
commit ef7cce5dad
5 changed files with 16 additions and 6 deletions

View File

@@ -60,11 +60,15 @@ func GetServiceEnvironmentVariables(registry ServiceRegistry, machine string) ([
}
func (sr *ServiceRegistryStorage) List(*url.URL) (interface{}, error) {
return sr.registry.ListServices()
list, err := sr.registry.ListServices()
list.Kind = "cluster#serviceList"
return list, err
}
func (sr *ServiceRegistryStorage) Get(id string) (interface{}, error) {
return sr.registry.GetService(id)
service, err := sr.registry.GetService(id)
service.Kind = "cluster#service"
return service, err
}
func (sr *ServiceRegistryStorage) Delete(id string) error {