builder

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StackPath = "/cnb/stack.toml"

	EnvUID = "CNB_USER_ID"
	EnvGID = "CNB_GROUP_ID"
)
View Source
const (
	DefaultLifecycleVersion    = "0.7.5"
	DefaultBuildpackAPIVersion = "0.2"
)
View Source
const (
	OrderLabel = "io.buildpacks.buildpack.order"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob

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

type Builder

type Builder struct {
	StackID string
	// contains filtered or unexported fields
}

Builder represents a pack builder, used to build images

func FromImage

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

FromImage constructs a builder from a builder image

func New

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

New constructs a new builder from a base image

func (*Builder) AddBuildpack

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

AddBuildpack adds a buildpack to the builder

func (*Builder) Buildpacks

func (b *Builder) Buildpacks() []dist.BuildpackInfo

Buildpacks returns the buildpack list

func (*Builder) CreatedBy

func (b *Builder) CreatedBy() CreatorMetadata

CreatedBy returns metadata around the creation of the builder

func (*Builder) Description

func (b *Builder) Description() string

Description returns the builder description

func (*Builder) GID

func (b *Builder) GID() int

GID returns the GID of the builder

func (*Builder) Image

func (b *Builder) Image() imgutil.Image

Image returns the base image

func (*Builder) LifecycleDescriptor

func (b *Builder) LifecycleDescriptor() LifecycleDescriptor

LifecycleDescriptor returns the LifecycleDescriptor

func (*Builder) Mixins

func (b *Builder) Mixins() []string

Mixins returns the mixins of the builder

func (*Builder) Name

func (b *Builder) Name() string

Name returns the name of the builder

func (*Builder) Order

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

Order returns the order

func (*Builder) Save

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

Save saves the builder

func (*Builder) SetDescription

func (b *Builder) SetDescription(description string)

SetDescription sets the description of the builder

func (*Builder) SetEnv

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

SetEnv sets an environment variable to a value

func (*Builder) SetLifecycle

func (b *Builder) SetLifecycle(lifecycle Lifecycle)

SetLifecycle sets the lifecycle of the builder

func (*Builder) SetOrder

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

SetOrder sets the order of the builder

func (*Builder) SetStack

func (b *Builder) SetStack(stackConfig builder.StackConfig)

SetStack sets the stack of the builder

func (*Builder) Stack

func (b *Builder) Stack() StackMetadata

Stack returns the stack metadata

func (*Builder) UID

func (b *Builder) UID() int

UID returns the UID of the builder

type CreatorMetadata

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

type Lifecycle

type Lifecycle interface {
	Blob
	Descriptor() LifecycleDescriptor
}

func NewLifecycle

func NewLifecycle(blob Blob) (Lifecycle, error)

type LifecycleAPI

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

type LifecycleDescriptor

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

type LifecycleInfo

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

type LifecycleMetadata

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

type Metadata

type Metadata struct {
	Description string               `json:"description"`
	Buildpacks  []dist.BuildpackInfo `json:"buildpacks"`
	Stack       StackMetadata        `json:"stack"`
	Lifecycle   LifecycleMetadata    `json:"lifecycle"`
	CreatedBy   CreatorMetadata      `json:"createdBy"`
}

type RunImageMetadata

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

type StackMetadata

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

type Version

type Version struct {
	semver.Version
}

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

func VersionMustParse

func VersionMustParse(v string) *Version

func (*Version) Equal added in v0.10.0

func (v *Version) Equal(other *Version) bool

func (*Version) MarshalText

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

MarshalText makes Version satisfy the encoding.TextMarshaler interface.

func (*Version) String

func (v *Version) String() string

func (*Version) UnmarshalText

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