buildpackage

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const MetadataLabel = "io.buildpacks.buildpackage.metadata"

Variables

This section is empty.

Functions

func BuildpacksFromOCILayoutBlob

func BuildpacksFromOCILayoutBlob(blob dist.Blob) (mainBP dist.Buildpack, dependencies []dist.Buildpack, err error)

BuildpackFromOCILayoutBlob constructs buildpacks from a blob in OCI layout format.

func ConfigFromOCILayoutBlob

func ConfigFromOCILayoutBlob(blob dist.Blob) (config v1.ImageConfig, err error)

func ExtractBuildpacks

func ExtractBuildpacks(pkg Package) (mainBP dist.Buildpack, depBPs []dist.Buildpack, err error)

func IsOCILayoutBlob

func IsOCILayoutBlob(blob blob2.Blob) (bool, error)

IsOCILayoutBlob checks whether a blob is in OCI layout format.

Types

type ImageFactory

type ImageFactory interface {
	NewImage(repoName string, local bool, imageOS string) (imgutil.Image, error)
}

type Metadata

type Metadata struct {
	dist.BuildpackInfo
	Stacks []dist.Stack `toml:"stacks" json:"stacks"`
}

type Package

type Package interface {
	Label(name string) (value string, err error)
	GetLayer(diffID string) (io.ReadCloser, error)
}

type PackageBuilder

type PackageBuilder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(imageFactory ImageFactory) *PackageBuilder

func (*PackageBuilder) AddDependency

func (b *PackageBuilder) AddDependency(buildpack dist.Buildpack)

func (*PackageBuilder) SaveAsFile

func (b *PackageBuilder) SaveAsFile(path, imageOS string) error

func (*PackageBuilder) SaveAsImage

func (b *PackageBuilder) SaveAsImage(repoName string, publish bool, imageOS string) (imgutil.Image, error)

func (*PackageBuilder) SetBuildpack

func (b *PackageBuilder) SetBuildpack(buildpack dist.Buildpack)

type WorkableImage

type WorkableImage interface {
	SetLabel(string, string) error
	AddLayerWithDiffID(path, diffID string) error
}

Jump to

Keyboard shortcuts

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