Documentation ¶
Index ¶
- Constants
- Variables
- 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 BuildpackLayerMetadata
- type BuildpackLayerMetadataFile
- type BuildpackLayersMetadata
- type BuildpackOrder
- type BuildpackStore
- type Cache
- type CacheMetadata
- type DetectConfig
- type ExportOptions
- type Exporter
- type GitMetadata
- type ImageIdentifier
- type LaunchTOML
- type LauncherConfig
- type LauncherMetadata
- type LayerMetadata
- type LayersMetadata
- type LayersMetadataCompat
- type Logger
- type MultiError
- type ProjectMetadata
- type ProjectSource
- type Provide
- type Rebaser
- type Require
- type Restorer
- type RunImageMetadata
- type Slice
- type SliceLayer
- type SourceMetadata
- type StackMetadata
- type StackRunImageMetadata
Constants ¶
View Source
const ( CodeDetectPass = 0 CodeDetectFail = 100 )
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 ¶
View Source
var ErrFail = errors.New("no buildpacks participating")
Functions ¶
func TruncateSha ¶
Types ¶
type AnalyzedMetadata ¶
type AnalyzedMetadata struct { Image *ImageIdentifier `toml:"image"` Metadata LayersMetadata `toml:"metadata"` }
type BuildMetadata ¶
type BuildPlan ¶
type BuildPlan struct {
Entries []BuildPlanEntry `toml:"entries"`
}
type BuildPlanEntry ¶
type Builder ¶
type Builder struct { AppDir string LayersDir string PlatformDir string BuildpacksDir string Env BuildEnv Group BuildpackGroup Plan BuildPlan Out, Err *log.Logger }
func (*Builder) Build ¶
func (b *Builder) Build() (*BuildMetadata, error)
type Buildpack ¶
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 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 BuildpackStore ¶ added in v0.7.0
type BuildpackStore struct {
Data map[string]interface{} `json:"metadata" toml:"metadata"`
}
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 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 Exporter ¶
type Exporter struct { Buildpacks []Buildpack ArtifactsDir string Logger Logger UID, GID int // contains filtered or unexported fields }
func (*Exporter) Export ¶
func (e *Exporter) Export(opts ExportOptions) error
type GitMetadata ¶
type ImageIdentifier ¶
type ImageIdentifier struct {
Reference string `toml:"reference"`
}
FIXME: fix key names to be accurate in the daemon case
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 LayerMetadata ¶
type LayerMetadata struct {
SHA string `json:"sha" toml:"sha"`
}
type LayersMetadata ¶
type LayersMetadata struct { App []LayerMetadata `json:"app" toml:"app"` Config LayerMetadata `json:"config" toml:"config"` Launcher LayerMetadata `json:"launcher" toml:"launcher"` 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 `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"` 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 RunImageMetadata ¶
type SliceLayer ¶
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.