detect

package
v1.25.11 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: Apache-2.0 Imports: 8 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

	// 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

	// Writer is the writer used to write the build plan in Pass().
	Writer buildplan.Writer
}

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(plans ...buildplan.Plan) (int, error)

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

Jump to

Keyboard shortcuts

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