detect

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0 Imports: 9 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 application.Application

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

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

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

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

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

	// Services represents the services bound to the application.
	Services services.Services

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

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 buildplan.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