detect

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// FailStatusCode is the status code returned for fail.
	FailStatusCode = 100

	// PassStatusCode is the status code returned for pass.
	PassStatusCode = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Detect

type Detect struct {
	// Application is the application being processed by the buildpack.
	Application applicationPkg.Application

	// Buildpack represents the metadata associated with a buildpack.
	Buildpack buildpackPkg.Buildpack

	// BuildPlan represents dependencies contributed by previous builds.
	BuildPlan buildplanPkg.BuildPlan

	// BuildPlanWriter is the writer used to write the BuildPlan in Pass().
	BuildPlanWriter buildplanPkg.Writer

	// Logger is used to write debug and info to the console.
	Logger loggerPkg.Logger

	// Platform represents components contributed by the platform to the buildpack.
	Platform platformPkg.Platform

	// Stack is the stack currently available to the application.
	Stack string
}

Detect represents all of the components available to a buildpack at detect time.

func DefaultDetect

func DefaultDetect() (Detect, error)

DefaultDetect creates a new instance of Detect using default values.

func (Detect) Error

func (d Detect) Error(code int) int

Error signals an error during detection by exiting with a specified non-zero, non-100 status code.

func (Detect) Fail

func (d Detect) Fail() int

Fail signals an unsuccessful detection by exiting with a 100 status code.

func (Detect) Pass

func (d Detect) Pass(buildPlan buildplanPkg.BuildPlan) (int, error)

Pass signals a successful detection by exiting with a 0 status code.

func (Detect) String

func (d Detect) String() string

String makes Detect satisfy the Stringer interface.

Jump to

Keyboard shortcuts

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