dist

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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)

func BuildpackToLayerTar

func BuildpackToLayerTar(dest string, bp Buildpack) (string, error)

func GetLabel

func GetLabel(labeled Labeled, label string, obj interface{}) (ok bool, err error)

func LayerDiffID

func LayerDiffID(layerTarPath string) (v1.Hash, error)

func SetLabel

func SetLabel(labelable Labelable, label string, data interface{}) error

Types

type Blob

type Blob interface {
	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 BuildpackFromRootBlob

func BuildpackFromRootBlob(blob Blob) (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}/*').

func BuildpackFromTarBlob

func BuildpackFromTarBlob(bpd BuildpackDescriptor, blob Blob) Buildpack

BuildpackFromTarBlob constructs a buildpack from a ReadCloser to a tar. It is assumed that the buildpack contents are structured as per the distribution spec (currently '/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"`
	Version string `toml:"version" json:"version,omitempty"`
}

func (BuildpackInfo) FullName

func (b BuildpackInfo) FullName() string

type BuildpackLayerInfo

type BuildpackLayerInfo struct {
	API         *api.Version `json:"api"`
	Stacks      []Stack      `json:"stacks,omitempty"`
	Order       Order        `json:"order,omitempty"`
	LayerDiffID string       `json:"layerDiffID"`
}

type BuildpackLayers

type BuildpackLayers map[string]map[string]BuildpackLayerInfo

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 ImageRef

type ImageRef struct {
	ImageName string `toml:"image"`
}

type Labelable

type Labelable interface {
	SetLabel(name string, value string) error
}

type Labeled

type Labeled interface {
	Name() string
	Label(name string) (value string, err error)
}

type Order

type Order []OrderEntry

type OrderEntry

type OrderEntry struct {
	Group []BuildpackRef `toml:"group" json:"group"`
}

type Stack

type Stack struct {
	ID     string   `json:"id"`
	Mixins []string `json:"mixins,omitempty"`
}

Directories

Path Synopsis
Package testmocks is a generated GoMock package.
Package testmocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL