github.com/cloudfoundry-community/cloudfoundry-cli@v6.44.1-0.20240130060226-cda5ed8e89a5+incompatible/resources/droplet_resource.go (about)

     1  package resources
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant"
     5  )
     6  
     7  // Droplet represents a Cloud Controller droplet's metadata. A droplet is a set of
     8  // compiled bits for a given application.
     9  type Droplet struct {
    10  	//Buildpacks are the detected buildpacks from the staging process.
    11  	Buildpacks []DropletBuildpack `json:"buildpacks,omitempty"`
    12  	// CreatedAt is the timestamp that the Cloud Controller created the droplet.
    13  	CreatedAt string `json:"created_at"`
    14  	// GUID is the unique droplet identifier.
    15  	GUID string `json:"guid"`
    16  	// Image is the Docker image name.
    17  	Image string `json:"image"`
    18  	// Stack is the root filesystem to use with the buildpack.
    19  	Stack string `json:"stack,omitempty"`
    20  	// State is the current state of the droplet.
    21  	State constant.DropletState `json:"state"`
    22  	// IsCurrent does not exist on the API layer, only on the actor layer; we ignore it w.r.t. JSON
    23  	IsCurrent bool `json:"-"`
    24  }
    25  
    26  // DropletBuildpack is the name and output of a buildpack used to create a
    27  // droplet.
    28  type DropletBuildpack struct {
    29  	// Name is the buildpack name.
    30  	Name string `json:"name"`
    31  	// BuildpackName is the the name reported by the buildpack.
    32  	BuildpackName string `json:"buildpack_name"`
    33  	// DetectOutput is the output of the buildpack detect script.
    34  	DetectOutput string `json:"detect_output"`
    35  	// Version is the version of the detected buildpack.
    36  	Version string `json:"version"`
    37  }