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

Function buildPlanDetailsLookup

actor/v7action/service_instance_list.go:98–121  ·  view source on GitHub ↗
(included ccv3.IncludedResources)

Source from the content-addressed store, hash-verified

96}
97
98func buildPlanDetailsLookup(included ccv3.IncludedResources) map[string]planDetails {
99 brokerLookup := lookuptable.NameFromGUID(included.ServiceBrokers)
100
101 type twoNames struct{ broker, offering string }
102 offeringLookup := make(map[string]twoNames)
103 for _, o := range included.ServiceOfferings {
104 brokerName := brokerLookup[o.ServiceBrokerGUID]
105 offeringLookup[o.GUID] = twoNames{
106 broker: brokerName,
107 offering: o.Name,
108 }
109 }
110
111 planLookup := make(map[string]planDetails)
112 for _, p := range included.ServicePlans {
113 names := offeringLookup[p.ServiceOfferingGUID]
114 planLookup[p.GUID] = planDetails{
115 broker: names.broker,
116 offering: names.offering,
117 plan: p.Name,
118 }
119 }
120 return planLookup
121}
122
123func buildBoundAppsLookup(bindings []resources.ServiceCredentialBinding, spaceGUID string) map[string][]string {
124 type bindingKey struct {

Callers 1

Calls 1

NameFromGUIDFunction · 0.92

Tested by

no test coverage detected