shimmer

package
v0.2.2-0...-bb84141 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBuildpackAPIVersion = "0.4"

DefaultBuildpackAPIVersion the default API version to write to buildpack.toml

View Source
const DefaultCnbShimVersion = "0.2"

DefaultCnbShimVersion the default cnb-shim version to use

Variables

This section is empty.

Functions

func DefaultBuildpackStacks

func DefaultBuildpackStacks() []string

DefaultBuildpackStacks the stacks to write to buildpack.toml

Types

type Buildpack

type Buildpack interface {
	PackArgument() string
}

Buildpack implements PackArgument for the underlying buildpack

type Buildpacks

type Buildpacks []Buildpack

Buildpacks slice of buildpacks with shim applied

func (Buildpacks) PackArguments

func (buildpacks Buildpacks) PackArguments() []string

PackArguments returns the arguments for the pack command

type IDDictionary

type IDDictionary map[string]string

IDDictionary buildpack ID dictionary, each key is the original buildpack ID and the value is what it was replaced for during the shim process

type Passthrough

type Passthrough struct {
	Buildpack string
}

Passthrough is a buildpack that reports the cnb pack argument as the same reported buildpack, useful in buildpack references such as "heroku/go" which buildpacker does not apply any shim

func (*Passthrough) PackArgument

func (pt *Passthrough) PackArgument() string

PackArgument return argument for passthrough

type ShimmedBuildpack

type ShimmedBuildpack struct {
	UnpackedBuildpack
}

ShimmedBuildpack holds information about a shimmed buildpack

func (ShimmedBuildpack) ShimBuildpackToml

func (shimmed ShimmedBuildpack) ShimBuildpackToml() string

ShimBuildpackToml returns the path to the buildpack.toml of the shim

type Shimmer

type Shimmer struct {
	Sources     []sources.Source
	APIVersion  string
	Stacks      []string
	ShimVersion string
}

Shimmer shims all the specified buildpacks

func (*Shimmer) Apply

func (shimmer *Shimmer) Apply(ctx context.Context, buildpacks []string) (Buildpacks, IDDictionary, error)

Apply prepares all the specified buildpacks with a shim and returns path to local directories with shim applied

func (*Shimmer) BuildpackAPIVersion

func (shimmer *Shimmer) BuildpackAPIVersion() string

BuildpackAPIVersion the BuildpackAPIVersion to use in buildpack.toml

func (*Shimmer) BuildpackStacks

func (shimmer *Shimmer) BuildpackStacks() []string

BuildpackStacks the stacks to use in buildpack.toml

func (*Shimmer) CnbShimVersion

func (shimmer *Shimmer) CnbShimVersion() string

CnbShimVersion returns the cnb-shim version to use

func (*Shimmer) InstallSources

func (shimmer *Shimmer) InstallSources(sources []sources.Source)

InstallSources installs a list of sources

type UnpackedBuildpack

type UnpackedBuildpack struct {
	Unpacker sources.Unpacker
	LocalDir string
}

UnpackedBuildpack unpacked buildpack

func (UnpackedBuildpack) PackArgument

func (unpacked UnpackedBuildpack) PackArgument() string

PackArgument returns the argument for the pack command

func (UnpackedBuildpack) TargetDir

func (unpacked UnpackedBuildpack) TargetDir() string

TargetDir returns the target dir of a shimmed buildpack

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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