buildplan

package
v2.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: Apache-2.0 Imports: 1 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata map[string]interface{}

Metadata is the metadata of a dependency.

type Plan

type Plan struct {
	// Provided represents the dependencies provided by a buildpack. Optional.
	Provides []Provided `toml:"provides,omitempty"`

	// Required represents the dependencies required by a buildpack.  Optional.
	Requires []Required `toml:"requires,omitempty"`
}

Plan represents a contractual build plan.

type Plans

type Plans struct {
	// Plan is the primary Plan.
	Plan

	// Or are additional Plans. Optional.
	Or []Plan `toml:"or,omitempty"`
}

Plans is a collection of Plan's in marshalable form.

type Provided

type Provided struct {
	// Name represents the name of a dependency.
	Name string `toml:"name"`
}

Provided represents a dependency provided by a buildpack.

type Required

type Required struct {
	// Name represents the name of a dependency.
	Name string `toml:"name"`

	// Version represents the version of a dependency.  Optional.
	Version string `toml:"version,omitempty"`

	// Metadata represents the metadata of a dependency.  Optional.
	Metadata Metadata `toml:"metadata,omitempty"`
}

Required represents a dependency required by a buildpack.

type Writer

type Writer func(plans Plans) error

Writer is a function write writes the contents of a Plans

func DefaultWriter

func DefaultWriter(index int) Writer

DefaultWriter writes the Plans to a file at os.Args[<INDEX>].

Jump to

Keyboard shortcuts

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