Documentation ¶
Index ¶
- Constants
- func AddBuildpackToLayersMD(layerMD BuildpackLayers, descriptor BuildpackDescriptor, diffID string)
- func BuildpackToLayerTar(dest string, bp Buildpack) (string, error)
- func GetLabel(labeled Labeled, label string, obj interface{}) (ok bool, err error)
- func LayerDiffID(layerTarPath string) (v1.Hash, error)
- func SetLabel(labelable Labelable, label string, data interface{}) error
- type Blob
- type Buildpack
- type BuildpackDescriptor
- type BuildpackInfo
- type BuildpackLayerInfo
- type BuildpackLayers
- type BuildpackRef
- type BuildpackURI
- type ImageOrURI
- type ImageRef
- type Labelable
- type Labeled
- type Order
- type OrderEntry
- type Stack
Constants ¶
View Source
const AssumedBuildpackAPIVersion = "0.1"
View Source
const BuildpackLayersLabel = "io.buildpacks.buildpack.layers"
View Source
const BuildpacksDir = "/cnb/buildpacks"
Variables ¶
This section is empty.
Functions ¶
func AddBuildpackToLayersMD ¶
func AddBuildpackToLayersMD(layerMD BuildpackLayers, descriptor BuildpackDescriptor, diffID string)
Types ¶
type Blob ¶
type Blob interface { // Open returns a io.ReadCloser for the contents of the Blob in tar format. Open() (io.ReadCloser, error) }
type Buildpack ¶
type Buildpack interface { // Open returns a reader to a tar with contents structured as per the distribution spec // (currently '/cnbs/buildpacks/{ID}/{version}/*', all entries with a zeroed-out // timestamp and root UID/GID). Open() (io.ReadCloser, error) Descriptor() BuildpackDescriptor }
func BuildpackFromBlob ¶ added in v0.10.0
func BuildpackFromBlob(bpd BuildpackDescriptor, blob Blob) Buildpack
BuildpackFromBlob constructs a buildpack from a blob. It is assumed that the buildpack contents are structured as per the distribution spec (currently '/cnbs/buildpacks/{ID}/{version}/*').
func BuildpackFromRootBlob ¶
func BuildpackFromRootBlob(blob Blob, layerWriterFactory archive.TarWriterFactory) (Buildpack, error)
BuildpackFromRootBlob constructs a buildpack from a blob. It is assumed that the buildpack contents reside at the root of the blob. The constructed buildpack contents will be structured as per the distribution spec (currently a tar with contents under '/cnbs/buildpacks/{ID}/{version}/*').
type BuildpackDescriptor ¶
type BuildpackDescriptor struct { API *api.Version `toml:"api"` Info BuildpackInfo `toml:"buildpack"` Stacks []Stack `toml:"stacks"` Order Order `toml:"order"` }
func (*BuildpackDescriptor) EnsureStackSupport ¶
func (b *BuildpackDescriptor) EnsureStackSupport(stackID string, providedMixins []string, validateRunStageMixins bool) error
func (*BuildpackDescriptor) EscapedID ¶
func (b *BuildpackDescriptor) EscapedID() string
type BuildpackInfo ¶
type BuildpackInfo struct { ID string `toml:"id" json:"id,omitempty"` Version string `toml:"version" json:"version,omitempty"` Homepage string `toml:"homepage,omitempty" json:"homepage,omitempty"` }
func (BuildpackInfo) FullName ¶
func (b BuildpackInfo) FullName() string
func (BuildpackInfo) Match ¶ added in v0.10.0
func (b BuildpackInfo) Match(o BuildpackInfo) bool
Match compares two buildpacks by ID and Version
func (BuildpackInfo) String ¶ added in v0.10.0
func (b BuildpackInfo) String() string
Satisfy stringer
type BuildpackLayerInfo ¶
type BuildpackLayers ¶
type BuildpackLayers map[string]map[string]BuildpackLayerInfo
func (BuildpackLayers) Get ¶ added in v0.13.0
func (b BuildpackLayers) Get(id, version string) (BuildpackLayerInfo, bool)
type BuildpackRef ¶
type BuildpackRef struct { BuildpackInfo Optional bool `toml:"optional,omitempty" json:"optional,omitempty"` }
type BuildpackURI ¶
type BuildpackURI struct {
URI string `toml:"uri"`
}
type ImageOrURI ¶
type ImageOrURI struct { BuildpackURI ImageRef }
type Order ¶
type Order []OrderEntry
type OrderEntry ¶
type OrderEntry struct {
Group []BuildpackRef `toml:"group" json:"group"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.