MCPcopy Create free account
hub / github.com/cloudfoundry/cli / AttachOrgToPlans

Method AttachOrgToPlans

cf/actors/planbuilder/plan_builder.go:40–51  ·  view source on GitHub ↗
(plans []models.ServicePlanFields, orgName string)

Source from the content-addressed store, hash-verified

38}
39
40func (builder Builder) AttachOrgToPlans(plans []models.ServicePlanFields, orgName string) ([]models.ServicePlanFields, error) {
41 visMap, err := builder.buildPlanToOrgVisibilityMap(orgName)
42 if err != nil {
43 return nil, err
44 }
45 for planIndex := range plans {
46 plan := &plans[planIndex]
47 plan.OrgNames = visMap[plan.GUID]
48 }
49
50 return plans, nil
51}
52
53func (builder Builder) AttachOrgsToPlans(plans []models.ServicePlanFields) ([]models.ServicePlanFields, error) {
54 visMap, err := builder.buildPlanToOrgsVisibilityMap()

Callers 1

Calls 1

Tested by

no test coverage detected