github.com/sleungcy-sap/cli@v7.1.0+incompatible/actor/v7action/service_offering.go (about)

     1  package v7action
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/actor/actionerror"
     5  )
     6  
     7  func (actor Actor) PurgeServiceOfferingByNameAndBroker(serviceOfferingName, serviceBrokerName string) (Warnings, error) {
     8  	serviceOffering, warnings, err := actor.CloudControllerClient.GetServiceOfferingByNameAndBroker(serviceOfferingName, serviceBrokerName)
     9  	allWarnings := Warnings(warnings)
    10  	if err != nil {
    11  		return allWarnings, actionerror.EnrichAPIErrors(err)
    12  	}
    13  
    14  	warnings, err = actor.CloudControllerClient.PurgeServiceOffering(serviceOffering.GUID)
    15  	allWarnings = append(allWarnings, warnings...)
    16  	return allWarnings, err
    17  }