builder

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AssumedLifecycleVersion   = "0.3.0"
	AssumedPlatformAPIVersion = "0.1"

	DefaultLifecycleVersion    = "0.5.0"
	DefaultBuildpackAPIVersion = "0.2"
	DefaultPlatformAPIVersion  = "0.1"
)
View Source
const BuildpackLayersLabel = "io.buildpacks.buildpack.layers"
View Source
const OrderLabel = "io.buildpacks.buildpack.order"

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob added in v0.4.0

type Blob interface {
	Open() (io.ReadCloser, error)
}

type Builder

type Builder struct {
	UID, GID int
	StackID  string
	// contains filtered or unexported fields
}

func GetBuilder added in v0.2.0

func GetBuilder(img imgutil.Image) (*Builder, error)

GetBuilder constructs builder from builder image

func New added in v0.2.0

func New(baseImage imgutil.Image, name string) (*Builder, error)

New constructs a new builder from base image

func (*Builder) AddBuildpack added in v0.2.0

func (b *Builder) AddBuildpack(bp dist.Buildpack)

func (*Builder) Description added in v0.2.0

func (b *Builder) Description() string

func (*Builder) GetBuildpacks added in v0.2.0

func (b *Builder) GetBuildpacks() []BuildpackMetadata

func (*Builder) GetCreatedBy added in v0.5.0

func (b *Builder) GetCreatedBy() CreatorMetadata

func (*Builder) GetLifecycleDescriptor added in v0.4.0

func (b *Builder) GetLifecycleDescriptor() LifecycleDescriptor

func (*Builder) GetOrder added in v0.2.0

func (b *Builder) GetOrder() dist.Order

func (*Builder) GetStackInfo added in v0.2.0

func (b *Builder) GetStackInfo() StackMetadata

func (*Builder) Name added in v0.2.0

func (b *Builder) Name() string

func (*Builder) Save added in v0.2.0

func (b *Builder) Save(logger logging.Logger) error

func (*Builder) SetDescription added in v0.2.0

func (b *Builder) SetDescription(description string)

func (*Builder) SetEnv added in v0.2.0

func (b *Builder) SetEnv(env map[string]string)

func (*Builder) SetLifecycle added in v0.2.0

func (b *Builder) SetLifecycle(lifecycle Lifecycle) error

func (*Builder) SetOrder added in v0.2.0

func (b *Builder) SetOrder(order dist.Order)

func (*Builder) SetStackInfo added in v0.2.0

func (b *Builder) SetStackInfo(stackConfig StackConfig)

type BuildpackConfig added in v0.2.0

type BuildpackConfig struct {
	dist.BuildpackInfo
	URI string `toml:"uri"`
}

type BuildpackLayerInfo added in v0.5.0

type BuildpackLayerInfo struct {
	LayerDiffID string     `json:"layerDiffID"`
	Order       dist.Order `json:"order,omitempty"`
}

type BuildpackLayers added in v0.5.0

type BuildpackLayers map[string]map[string]BuildpackLayerInfo

type BuildpackMetadata

type BuildpackMetadata struct {
	dist.BuildpackInfo
	Latest bool `json:"latest"` // deprecated
}

type Config added in v0.2.0

type Config struct {
	Description string            `toml:"description"`
	Buildpacks  []BuildpackConfig `toml:"buildpacks"`
	Order       dist.Order        `toml:"order"`
	Stack       StackConfig       `toml:"stack"`
	Lifecycle   LifecycleConfig   `toml:"lifecycle"`
}

func ReadConfig added in v0.3.0

func ReadConfig(path string) (config Config, warnings []string, err error)

ReadConfig reads a builder configuration from the file path provided and returns the configuration along with any warnings encountered while parsing

type CreatorMetadata added in v0.5.0

type CreatorMetadata struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type Lifecycle added in v0.4.0

type Lifecycle interface {
	Blob
	Descriptor() LifecycleDescriptor
}

func NewLifecycle added in v0.4.0

func NewLifecycle(blob Blob) (Lifecycle, error)

type LifecycleAPI added in v0.4.0

type LifecycleAPI struct {
	BuildpackVersion *api.Version `toml:"buildpack" json:"buildpack"`
	PlatformVersion  *api.Version `toml:"platform" json:"platform"`
}

type LifecycleConfig added in v0.2.0

type LifecycleConfig struct {
	URI     string `toml:"uri"`
	Version string `toml:"version"`
}

type LifecycleDescriptor added in v0.4.0

type LifecycleDescriptor struct {
	Info LifecycleInfo `toml:"lifecycle"`
	API  LifecycleAPI  `toml:"api"`
}

type LifecycleInfo added in v0.4.0

type LifecycleInfo struct {
	Version *Version `toml:"version" json:"version"`
}

type LifecycleMetadata added in v0.4.0

type LifecycleMetadata struct {
	LifecycleInfo
	API LifecycleAPI `json:"api"`
}

type Metadata

type Metadata struct {
	Description string              `json:"description"`
	Buildpacks  []BuildpackMetadata `json:"buildpacks"`
	Groups      V1Order             `json:"groups"` // deprecated
	Stack       StackMetadata       `json:"stack"`
	Lifecycle   LifecycleMetadata   `json:"lifecycle"`
	CreatedBy   CreatorMetadata     `json:"createdBy"`
}

type RunImageMetadata added in v0.3.0

type RunImageMetadata struct {
	Image   string   `json:"image" toml:"image"`
	Mirrors []string `json:"mirrors" toml:"mirrors"`
}

type StackConfig added in v0.2.0

type StackConfig struct {
	ID              string   `toml:"id"`
	BuildImage      string   `toml:"build-image"`
	RunImage        string   `toml:"run-image"`
	RunImageMirrors []string `toml:"run-image-mirrors,omitempty"`
}

type StackMetadata added in v0.3.0

type StackMetadata struct {
	RunImage RunImageMetadata `json:"runImage" toml:"run-image"`
}

type V1Group added in v0.4.0

type V1Group struct {
	Buildpacks []dist.BuildpackRef `toml:"buildpacks" json:"buildpacks"`
}

type V1Order added in v0.4.0

type V1Order []V1Group

func (V1Order) ToOrder added in v0.4.0

func (o V1Order) ToOrder() dist.Order

type Version added in v0.4.0

type Version struct {
	semver.Version
}

Version is an extension to semver.Version to make it marshalable.

func VersionMustParse added in v0.4.1

func VersionMustParse(v string) *Version

func (*Version) MarshalText added in v0.4.0

func (v *Version) MarshalText() ([]byte, error)

MarshalText makes Version satisfy the encoding.TextMarshaler interface.

func (*Version) String added in v0.4.0

func (v *Version) String() string

func (*Version) UnmarshalText added in v0.4.0

func (v *Version) UnmarshalText(text []byte) error

UnmarshalText makes Version satisfy the encoding.TextUnmarshaler interface.

Directories

Path Synopsis
Package testmocks is a generated GoMock package.
Package testmocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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