Documentation
¶
Index ¶
- Constants
- func DecodeLabel(image imgutil.Image, label string, v interface{}) error
- func TruncateSha(sha string) string
- func WriteTOML(path string, data interface{}) error
- type AnalyzedMetadata
- type Analyzer
- type BOMEntry
- type BuildConfig
- type BuildEnv
- type BuildMetadata
- type BuildPlan
- type BuildPlanEntry
- type BuildReport
- type BuildResult
- type BuildTOML
- type Builder
- type Buildpack
- type BuildpackGroup
- type BuildpackInfo
- type BuildpackLayerMetadata
- type BuildpackLayerMetadataFile
- type BuildpackLayersMetadata
- type BuildpackOrder
- type BuildpackPlan
- type BuildpackStore
- type BuildpackTOML
- type Cache
- type CacheMetadata
- type DetectConfig
- type DetectRun
- type DirBuildpackStore
- type Error
- type ErrorType
- type ExportOptions
- type ExportReport
- type Exporter
- type GitMetadata
- type GroupBuildpack
- type ImageIdentifier
- type ImageReport
- type Label
- type LaunchTOML
- type LauncherConfig
- type LauncherMetadata
- type LayerFactory
- type LayerMetadata
- type LayersMetadata
- type LayersMetadataCompat
- type Logger
- type MultiError
- type ProjectMetadata
- type ProjectSource
- type Provide
- type RebaseReport
- type Rebaser
- type Require
- type Restorer
- type RunImageMetadata
- type SourceMetadata
- type StackMetadata
- type StackRunImageMetadata
- type StoreTOML
- type Unmet
Constants ¶
View Source
const ( CodeDetectPass = 0 CodeDetectFail = 100 EnvBuildpackDir = "CNB_BUILDPACK_DIR" )
View Source
const ( BuildMetadataLabel = "io.buildpacks.build.metadata" LayerMetadataLabel = "io.buildpacks.lifecycle.metadata" StackIDLabel = "io.buildpacks.stack.id" MixinsLabel = "io.buildpacks.stack.mixins" )
View Source
const (
ProjectMetadataLabel = "io.buildpacks.project.metadata"
)
Variables ¶
This section is empty.
Functions ¶
func TruncateSha ¶
Types ¶
type AnalyzedMetadata ¶
type AnalyzedMetadata struct {
Image *ImageIdentifier `toml:"image"`
Metadata LayersMetadata `toml:"metadata"`
}
type Analyzer ¶
type Analyzer struct {
Buildpacks []GroupBuildpack
LayersDir string
Logger Logger
SkipLayers bool
}
type BOMEntry ¶
type BOMEntry struct {
Require
Buildpack GroupBuildpack `toml:"buildpack" json:"buildpack"`
}
type BuildConfig ¶ added in v0.10.0
type BuildMetadata ¶
type BuildMetadata struct {
BOM []BOMEntry `toml:"bom" json:"bom"`
Buildpacks []GroupBuildpack `toml:"buildpacks" json:"buildpacks"`
Labels []Label `toml:"labels" json:"-"`
Launcher LauncherMetadata `toml:"-" json:"launcher"`
Processes []launch.Process `toml:"processes" json:"processes"`
Slices []layers.Slice `toml:"slices" json:"-"`
}
type BuildPlan ¶
type BuildPlan struct {
Entries []BuildPlanEntry `toml:"entries"`
}
type BuildPlanEntry ¶
type BuildPlanEntry struct {
Providers []GroupBuildpack `toml:"providers"`
Requires []Require `toml:"requires"`
}
type BuildReport ¶ added in v0.10.0
type BuildReport struct {
BOM []BOMEntry `toml:"bom"`
}
type BuildResult ¶ added in v0.10.0
type Builder ¶
type Builder struct {
AppDir string
LayersDir string
PlatformDir string
PlatformAPI *api.Version
Env BuildEnv
Group BuildpackGroup
Plan BuildPlan
Out, Err io.Writer
BuildpackStore BuildpackStore
}
func (*Builder) Build ¶
func (b *Builder) Build() (*BuildMetadata, error)
func (*Builder) BuildConfig ¶ added in v0.10.0
func (b *Builder) BuildConfig() (BuildConfig, error)
type Buildpack ¶
type Buildpack interface {
Build(bpPlan BuildpackPlan, config BuildConfig) (BuildResult, error)
}
type BuildpackGroup ¶
type BuildpackGroup struct {
Group []GroupBuildpack `toml:"group"`
}
func ReadGroup ¶
func ReadGroup(path string) (BuildpackGroup, error)
func (BuildpackGroup) Detect ¶
func (bg BuildpackGroup) Detect(c *DetectConfig) (BuildpackGroup, BuildPlan, error)
type BuildpackInfo ¶ added in v0.9.0
type BuildpackLayerMetadata ¶
type BuildpackLayerMetadata struct {
LayerMetadata
BuildpackLayerMetadataFile
}
type BuildpackLayersMetadata ¶
type BuildpackLayersMetadata struct {
ID string `json:"key" toml:"key"`
Version string `json:"version" toml:"version"`
Layers map[string]BuildpackLayerMetadata `json:"layers" toml:"layers"`
Store *StoreTOML `json:"store,omitempty" toml:"store"`
}
type BuildpackOrder ¶
type BuildpackOrder []BuildpackGroup
func ReadOrder ¶
func ReadOrder(path string) (BuildpackOrder, error)
func (BuildpackOrder) Detect ¶
func (bo BuildpackOrder) Detect(c *DetectConfig) (BuildpackGroup, BuildPlan, error)
type BuildpackPlan ¶ added in v0.9.0
type BuildpackPlan struct {
Entries []Require `toml:"entries"`
}
type BuildpackStore ¶ added in v0.7.0
type BuildpackTOML ¶ added in v0.9.0
type BuildpackTOML struct {
API string `toml:"api"`
Buildpack BuildpackInfo `toml:"buildpack"`
Order BuildpackOrder `toml:"order"`
Dir string `toml:"-"`
}
func (*BuildpackTOML) Build ¶ added in v0.10.0
func (b *BuildpackTOML) Build(bpPlan BuildpackPlan, config BuildConfig) (BuildResult, error)
func (*BuildpackTOML) Detect ¶ added in v0.9.0
func (b *BuildpackTOML) Detect(c *DetectConfig) DetectRun
func (*BuildpackTOML) String ¶ added in v0.9.0
func (b *BuildpackTOML) String() string
type CacheMetadata ¶
type CacheMetadata struct {
Buildpacks []BuildpackLayersMetadata `json:"buildpacks"`
}
func (*CacheMetadata) MetadataForBuildpack ¶
func (cm *CacheMetadata) MetadataForBuildpack(id string) BuildpackLayersMetadata
type DetectConfig ¶
type DirBuildpackStore ¶ added in v0.10.0
type DirBuildpackStore struct {
Dir string
}
type Error ¶ added in v0.9.0
func NewLifecycleError ¶ added in v0.9.0
type ErrorType ¶ added in v0.9.0
type ErrorType string
const ErrTypeBuildpack ErrorType = "ERR_BUILDPACK"
const ErrTypeFailedDetection ErrorType = "ERR_FAILED_DETECTION"
type ExportOptions ¶ added in v0.7.0
type ExportOptions struct {
LayersDir string
AppDir string
WorkingImage imgutil.Image
RunImageRef string
OrigMetadata LayersMetadata
AdditionalNames []string
LauncherConfig LauncherConfig
Stack StackMetadata
Project ProjectMetadata
DefaultProcessType string
}
type ExportReport ¶ added in v0.9.0
type ExportReport struct {
Build BuildReport `toml:"build,omitempty"`
Image ImageReport `toml:"image"`
}
type Exporter ¶
type Exporter struct {
Buildpacks []GroupBuildpack
LayerFactory LayerFactory
Logger Logger
PlatformAPI *api.Version
}
func (*Exporter) Export ¶
func (e *Exporter) Export(opts ExportOptions) (ExportReport, error)
type GitMetadata ¶
type GroupBuildpack ¶ added in v0.10.0
type GroupBuildpack struct {
ID string `toml:"id" json:"id"`
Version string `toml:"version" json:"version"`
Optional bool `toml:"optional,omitempty" json:"optional,omitempty"`
API string `toml:"api,omitempty" json:"-"`
Homepage string `toml:"homepage,omitempty" json:"homepage,omitempty"`
}
func (GroupBuildpack) Lookup ¶ added in v0.10.0
func (bp GroupBuildpack) Lookup(buildpacksDir string) (*BuildpackTOML, error)
func (GroupBuildpack) String ¶ added in v0.10.0
func (bp GroupBuildpack) String() string
type ImageIdentifier ¶
type ImageIdentifier struct {
Reference string `toml:"reference"`
}
FIXME: fix key names to be accurate in the daemon case
type ImageReport ¶ added in v0.9.0
type LaunchTOML ¶
type LauncherConfig ¶
type LauncherConfig struct {
Path string
Metadata LauncherMetadata
}
type LauncherMetadata ¶
type LauncherMetadata struct {
Version string `json:"version"`
Source SourceMetadata `json:"source"`
}
type LayerFactory ¶ added in v0.8.1
type LayerMetadata ¶
type LayerMetadata struct {
SHA string `json:"sha" toml:"sha"`
}
type LayersMetadata ¶
type LayersMetadata struct {
App []LayerMetadata `json:"app" toml:"app"`
Buildpacks []BuildpackLayersMetadata `json:"buildpacks" toml:"buildpacks"`
Config LayerMetadata `json:"config" toml:"config"`
Launcher LayerMetadata `json:"launcher" toml:"launcher"`
ProcessTypes LayerMetadata `json:"process-types" toml:"process-types"`
RunImage RunImageMetadata `json:"runImage" toml:"run-image"`
Stack StackMetadata `json:"stack" toml:"stack"`
}
NOTE: This struct MUST be kept in sync with `LayersMetadataCompat`
func (*LayersMetadata) MetadataForBuildpack ¶
func (m *LayersMetadata) MetadataForBuildpack(id string) BuildpackLayersMetadata
type LayersMetadataCompat ¶
type LayersMetadataCompat struct {
App interface{} `json:"app" toml:"app"`
Config LayerMetadata `json:"config" toml:"config"`
Launcher LayerMetadata `json:"launcher" toml:"launcher"`
ProcessTypes LayerMetadata `json:"process-types" toml:"process-types"`
Buildpacks []BuildpackLayersMetadata `json:"buildpacks" toml:"buildpacks"`
RunImage RunImageMetadata `json:"runImage" toml:"run-image"`
Stack StackMetadata `json:"stack" toml:"stack"`
}
NOTE: This struct MUST be kept in sync with `LayersMetadata`. It exists for situations where the `App` field type cannot be guaranteed, yet the original struct data must be maintained.
type MultiError ¶
type MultiError struct {
Errors []error
}
func (*MultiError) Error ¶
func (me *MultiError) Error() string
type ProjectMetadata ¶ added in v0.7.0
type ProjectMetadata struct {
Source *ProjectSource `toml:"source" json:"source,omitempty"`
}
type ProjectSource ¶ added in v0.7.0
type RebaseReport ¶ added in v0.9.0
type RebaseReport struct {
Image ImageReport `toml:"image"`
}
type Restorer ¶
type Restorer struct {
LayersDir string
Buildpacks []GroupBuildpack
Logger Logger
}
type RunImageMetadata ¶
type SourceMetadata ¶
type SourceMetadata struct {
Git GitMetadata `json:"git"`
}
type StackMetadata ¶
type StackMetadata struct {
RunImage StackRunImageMetadata `json:"runImage" toml:"run-image"`
}
func (*StackMetadata) BestRunImageMirror ¶
func (sm *StackMetadata) BestRunImageMirror(registry string) (string, error)
type StackRunImageMetadata ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.