github.com/asifdxtreme/cli@v6.1.3-0.20150123051144-9ead8700b4ae+incompatible/cf/api/resources/stacks.go (about)

     1  package resources
     2  
     3  import "github.com/cloudfoundry/cli/cf/models"
     4  
     5  type PaginatedStackResources struct {
     6  	Resources []StackResource
     7  }
     8  
     9  type StackResource struct {
    10  	Resource
    11  	Entity StackEntity
    12  }
    13  
    14  type StackEntity struct {
    15  	Name        string
    16  	Description string
    17  }
    18  
    19  func (resource StackResource) ToFields() *models.Stack {
    20  	return &models.Stack{
    21  		Guid:        resource.Metadata.Guid,
    22  		Name:        resource.Entity.Name,
    23  		Description: resource.Entity.Description,
    24  	}
    25  }