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

     1  package resources
     2  
     3  import "code.cloudfoundry.org/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  }