github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/api/resources/buildpacks.go (about) 1 package resources 2 3 import "code.cloudfoundry.org/cli/cf/models" 4 5 type BuildpackResource struct { 6 Resource 7 Entity BuildpackEntity 8 } 9 10 type BuildpackEntity struct { 11 Name string `json:"name"` 12 Stack string `json:"stack,omitempty"` 13 Position *int `json:"position,omitempty"` 14 Enabled *bool `json:"enabled,omitempty"` 15 Key string `json:"key,omitempty"` 16 Filename string `json:"filename,omitempty"` 17 Locked *bool `json:"locked,omitempty"` 18 } 19 20 func (resource BuildpackResource) ToFields() models.Buildpack { 21 return models.Buildpack{ 22 GUID: resource.Metadata.GUID, 23 Name: resource.Entity.Name, 24 Stack: resource.Entity.Stack, 25 Position: resource.Entity.Position, 26 Enabled: resource.Entity.Enabled, 27 Key: resource.Entity.Key, 28 Filename: resource.Entity.Filename, 29 Locked: resource.Entity.Locked, 30 } 31 }