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 BuildEnv
- type BuildMetadata
- type BuildPlan
- type BuildPlanEntry
- 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 Error
- type ErrorType
- type ExportOptions
- type ExportReport
- type Exporter
- type GitMetadata
- 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
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" )
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 BuildMetadata ¶
type BuildMetadata struct { BOM []BOMEntry `toml:"bom" json:"bom"` Buildpacks []Buildpack `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 Builder ¶
type Builder struct { AppDir string LayersDir string PlatformDir string BuildpacksDir string PlatformAPI *api.Version Env BuildEnv Group BuildpackGroup Plan BuildPlan Out, Err io.Writer }
func (*Builder) Build ¶
func (b *Builder) Build() (*BuildMetadata, error)
type Buildpack ¶
type Buildpack 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:"-"` }
type BuildpackGroup ¶
type BuildpackGroup struct {
Group []Buildpack `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 *BuildpackStore `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 BuildpackStore struct {
Data map[string]interface{} `json:"metadata" toml:"metadata"`
}
type BuildpackTOML ¶ added in v0.9.0
type BuildpackTOML struct { API string `toml:"api"` Buildpack BuildpackInfo `toml:"buildpack"` Order BuildpackOrder `toml:"order"` Path string `toml:"-"` }
func (*BuildpackTOML) Detect ¶ added in v0.9.0
func (bp *BuildpackTOML) Detect(c *DetectConfig) DetectRun
func (BuildpackTOML) String ¶ added in v0.9.0
func (bp BuildpackTOML) String() string
type Cache ¶
type Cache interface { Name() string SetMetadata(metadata CacheMetadata) error RetrieveMetadata() (CacheMetadata, error) AddLayerFile(tarPath string, sha string) error ReuseLayer(sha string) error RetrieveLayer(sha string) (io.ReadCloser, error) Commit() error }
type CacheMetadata ¶
type CacheMetadata struct {
Buildpacks []BuildpackLayersMetadata `json:"buildpacks"`
}
func (*CacheMetadata) MetadataForBuildpack ¶
func (cm *CacheMetadata) MetadataForBuildpack(id string) BuildpackLayersMetadata
type DetectConfig ¶
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 {
Image ImageReport `toml:"image"`
}
type Exporter ¶
type Exporter struct { Buildpacks []Buildpack LayerFactory LayerFactory Logger Logger PlatformAPI *api.Version }
func (*Exporter) Export ¶
func (e *Exporter) Export(opts ExportOptions) (ExportReport, error)
type GitMetadata ¶
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 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.