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

Method Search

cf/api/service_plan.go:59–71  ·  view source on GitHub ↗
(queryParams map[string]string)

Source from the content-addressed store, hash-verified

57}
58
59func (repo CloudControllerServicePlanRepository) Search(queryParams map[string]string) (plans []models.ServicePlanFields, err error) {
60 err = repo.gateway.ListPaginatedResources(
61 repo.config.APIEndpoint(),
62 combineQueryParametersWithURI("/v2/service_plans", queryParams),
63 resources.ServicePlanResource{},
64 func(resource interface{}) bool {
65 if sp, ok := resource.(resources.ServicePlanResource); ok {
66 plans = append(plans, sp.ToFields())
67 }
68 return true
69 })
70 return
71}
72
73func combineQueryParametersWithURI(uri string, queryParams map[string]string) string {
74 if len(queryParams) == 0 {

Callers

nothing calls this directly

Calls 4

APIEndpointMethod · 0.65
ToFieldsMethod · 0.65

Tested by

no test coverage detected