github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/cf/api/resources/service_bindings.go (about)

     1  package resources
     2  
     3  import "code.cloudfoundry.org/cli/cf/models"
     4  
     5  type ServiceBindingResource struct {
     6  	Resource
     7  	Entity ServiceBindingEntity
     8  }
     9  
    10  type ServiceBindingEntity struct {
    11  	AppGUID string `json:"app_guid"`
    12  }
    13  
    14  func (resource ServiceBindingResource) ToFields() models.ServiceBindingFields {
    15  	return models.ServiceBindingFields{
    16  		URL:     resource.Metadata.URL,
    17  		GUID:    resource.Metadata.GUID,
    18  		AppGUID: resource.Entity.AppGUID,
    19  	}
    20  }