Documentation ¶
Overview ¶
Package buildpack encapsulate downloading and running of Heroku buildpacks as described by the Buildpack API
Index ¶
Constants ¶
const ( // AppDir is the path relative to the build directory where the source to // be built is stored. AppDir = "app" // EnvironmentDir is the path relative to the build directory where the // environment/config variables are stored. EnvironmentDir = "environment" // BuildpacksDir is the path relative to the build directory where // buildpacks are stored and downloaded to. BuildpacksDir = "buildpacks" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Build ¶
type Build struct { BuildDir string CacheDir string Stack string SourceVersion string Stdout io.Writer Stderr io.Writer }
Build contains the information required to run a series of buildpacks.
type Buildpack ¶
Buildpack describes a buildpack that has been downloaded to the local filesystem.
func (*Buildpack) Compile ¶
Compile applies the buildpack to the current application.
It calls Export() on all previous buildpacks, to ensure any required setup is propagated between buildpacks.
See: https://devcenter.heroku.com/articles/buildpack-api#bin-compile
func (*Buildpack) Detect ¶
Detect determines whether the buildpack can be applied to the current application.
It is expected that slug compilation fail if any configured buildpack cannot be applied to the current application.
See: https://devcenter.heroku.com/articles/buildpack-api#bin-detect
func (*Buildpack) Export ¶
Export returns the path to the export file for the given buildpack, to be sourced by subsequent buildpacks, if it exists.
See: https://devcenter.heroku.com/articles/buildpack-api#composing-multiple-buildpacks
type Source ¶
type Source interface { Download(ctx context.Context, baseDir string) (*Buildpack, error) Dir() string }
Source described the interface for a buildpack source.
func ParseSource ¶
ParseSource parses and returns an appropriate Source for the given buildpack URL.
It currently supports official buildpack URLS of form `urn:buildpack:foo/bar` and GitHub repository URLs.
All other URLs are defaulted to being a generic URL to some GZipped Tar archive.
It does not support arbitrary .git URLs.
type TargzSource ¶ added in v0.0.8
TargzSource implements Source for GZipped Tar buildpack archives.
It has custom support for GitHub hosted repositories and their nested tarball format.
func (*TargzSource) Dir ¶ added in v0.0.8
func (s *TargzSource) Dir() string
Dir returns the directory name for the buildpack being downloaded.