Help us shape the future of Go! Take the 2026 Go Developer Survey

platform

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 10 Imported by: 12

Documentation

Index

Constants

View Source
const (
	BuildMetadataLabel   = "io.buildpacks.build.metadata"
	LayerMetadataLabel   = "io.buildpacks.lifecycle.metadata"
	ProjectMetadataLabel = "io.buildpacks.project.metadata"
	StackIDLabel         = "io.buildpacks.stack.id"
	MixinsLabel          = "io.buildpacks.stack.mixins"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzedMetadata

type AnalyzedMetadata struct {
	Image    *ImageIdentifier `toml:"image"`
	Metadata LayersMetadata   `toml:"metadata"`
}

type BuildMetadata

type BuildMetadata struct {
	BOM                         []buildpack.BOMEntry       `toml:"bom" json:"bom"`
	Buildpacks                  []buildpack.GroupBuildpack `toml:"buildpacks" json:"buildpacks"`
	Labels                      []buildpack.Label          `toml:"labels" json:"-"`
	Launcher                    LauncherMetadata           `toml:"-" json:"launcher"`
	Processes                   []launch.Process           `toml:"processes" json:"processes"`
	Slices                      []layers.Slice             `toml:"slices" json:"-"`
	BuildpackDefaultProcessType string                     `toml:"buildpack-default-process-type,omitempty" json:"buildpack-default-process-type,omitempty"`
}

func (BuildMetadata) ToLaunchMD

func (md BuildMetadata) ToLaunchMD() launch.Metadata

type BuildPlan

type BuildPlan struct {
	Entries []BuildPlanEntry `toml:"entries"`
}

func (BuildPlan) Filter

func (p BuildPlan) Filter(metRequires []string) BuildPlan

TODO: ensure at least one claimed entry of each name is provided by the BP

func (BuildPlan) Find

func (p BuildPlan) Find(bpID string) buildpack.Plan

type BuildPlanEntry

type BuildPlanEntry struct {
	Providers []buildpack.GroupBuildpack `toml:"providers"`
	Requires  []buildpack.Require        `toml:"requires"`
}

func (BuildPlanEntry) NoOpt

func (be BuildPlanEntry) NoOpt() BuildPlanEntry

type BuildReport

type BuildReport struct {
	BOM []buildpack.BOMEntry `toml:"bom"`
}

type BuildpackLayerMetadata

type BuildpackLayerMetadata struct {
	LayerMetadata
	layertypes.LayerMetadataFile
}

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   *buildpack.StoreTOML              `json:"store,omitempty" toml:"store"`
}

type CacheMetadata

type CacheMetadata struct {
	Buildpacks []BuildpackLayersMetadata `json:"buildpacks"`
}

func (*CacheMetadata) MetadataForBuildpack

func (cm *CacheMetadata) MetadataForBuildpack(id string) BuildpackLayersMetadata

type ExportReport

type ExportReport struct {
	Build BuildReport `toml:"build,omitempty"`
	Image ImageReport `toml:"image"`
}

type GitMetadata

type GitMetadata struct {
	Repository string `json:"repository"`
	Commit     string `json:"commit"`
}

type ImageIdentifier

type ImageIdentifier struct {
	Reference string `toml:"reference"`
}

FIXME: fix key names to be accurate in the daemon case

type ImageReport

type ImageReport struct {
	Tags         []string `toml:"tags"`
	ImageID      string   `toml:"image-id,omitempty"`
	Digest       string   `toml:"digest,omitempty"`
	ManifestSize int64    `toml:"manifest-size,omitzero"`
}

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"`
	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"`
	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 `LayersMetadata`. It exists for situations where the `App` field type cannot be guaranteed, yet the original struct data must be maintained.

type Platform

type Platform interface {
	API() string
	CodeFor(errType cmd.LifecycleExitError) int
}

func NewPlatform

func NewPlatform(apiStr string) Platform

type ProjectMetadata

type ProjectMetadata struct {
	Source *ProjectSource `toml:"source" json:"source,omitempty"`
}

type ProjectSource

type ProjectSource struct {
	Type     string                 `toml:"type" json:"type,omitempty"`
	Version  map[string]interface{} `toml:"version" json:"version,omitempty"`
	Metadata map[string]interface{} `toml:"metadata" json:"metadata,omitempty"`
}

type RunImageMetadata

type RunImageMetadata struct {
	TopLayer  string `json:"topLayer" toml:"top-layer"`
	Reference string `json:"reference" toml:"reference"`
}

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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