MCPcopy Index your code
hub / github.com/cloudfoundry/cli / ToModel

Method ToModel

cf/api/app_summary.go:72–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70}
71
72func (resource ApplicationFromSummary) ToModel() models.Application {
73 var app models.Application
74
75 app.ApplicationFields = resource.ToFields()
76
77 routes := []models.RouteSummary{}
78 for _, route := range resource.Routes {
79 routes = append(routes, route.ToModel())
80 }
81 app.Routes = routes
82
83 services := []models.ServicePlanSummary{}
84 for _, service := range resource.Services {
85 services = append(services, service.ToModel())
86 }
87
88 app.Routes = routes
89 app.Services = services
90
91 return app
92}
93
94type RouteSummary struct {
95 GUID string

Callers

nothing calls this directly

Calls 2

ToFieldsMethod · 0.95
ToModelMethod · 0.45

Tested by

no test coverage detected