cnb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 31 Imported by: 8

Documentation

Index

Constants

View Source
const (
	MixinsLabel = "io.buildpacks.stack.mixins"
	StackLabel  = "io.buildpacks.stack.id"
)
View Source
const (
	BuilderMetadataLabel = "io.buildpacks.builder.metadata"
)

Variables

This section is empty.

Functions

func SetupPlatformEnvVars

func SetupPlatformEnvVars(dir, envVarsJSON string) error

Types

type APISet

type APISet []string

type APIVersions

type APIVersions struct {
	Deprecated APISet `toml:"deprecated" json:"deprecated"`
	Supported  APISet `toml:"supported" json:"supported"`
}

type BuilderImageMetadata

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

type BuildpackLayerInfo

type BuildpackLayerInfo struct {
	API         string                    `json:"api"`
	LayerDiffID string                    `json:"layerDiffID"`
	Order       v1alpha1.Order            `json:"order,omitempty"`
	Stacks      []v1alpha1.BuildpackStack `json:"stacks,omitempty"`
	Homepage    string                    `json:"homepage,omitempty"`
}

type BuildpackLayerMetadata

type BuildpackLayerMetadata map[string]map[string]BuildpackLayerInfo

type BuildpackRepository added in v0.0.6

type BuildpackRepository interface {
	FindByIdAndVersion(id, version string) (RemoteBuildpackInfo, error)
}

type BuildpackageMetadata

type BuildpackageMetadata struct {
	Id       string `json:"id"`
	Version  string `json:"version"`
	Homepage string `json:"homepage"`
}

type BuiltImage added in v0.0.1

type BuiltImage struct {
	Identifier        string
	CompletedAt       time.Time
	BuildpackMetadata []lifecycle.Buildpack
	Stack             BuiltImageStack
}

type BuiltImageStack added in v0.0.7

type BuiltImageStack struct {
	RunImage string
	ID       string
}

type CreatorMetadata

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

type DescriptiveBuildpackInfo

type DescriptiveBuildpackInfo struct {
	v1alpha1.BuildpackInfo
	Homepage string `json:"homepage,omitempty"`
}

type FetchableBuilder added in v0.0.6

type FetchableBuilder interface {
	metav1.ObjectMetaAccessor
	Image() string
	ImagePullSecrets() []v1.LocalObjectReference
}

type ImageFetcher

type ImageFetcher interface {
	Fetch(keychain authn.Keychain, repoName string) (ggcrv1.Image, string, error)
}

type LifecycleAPI

type LifecycleAPI struct {
	BuildpackVersion string `toml:"buildpack" json:"buildpack,omitempty"`
	PlatformVersion  string `toml:"platform" json:"platform,omitempty"`
}

type LifecycleAPIs

type LifecycleAPIs struct {
	Buildpack APIVersions `toml:"buildpack" json:"buildpack"`
	Platform  APIVersions `toml:"platform" json:"platform"`
}

type LifecycleDescriptor

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

type LifecycleInfo

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

type LifecycleMetadata

type LifecycleMetadata struct {
	LifecycleInfo

	// Deprecated: Use `LifecycleAPIs` instead
	API  LifecycleAPI  `json:"api,omitempty"`
	APIs LifecycleAPIs `json:"apis,omitempty"`
}

type LifecycleProvider

type LifecycleProvider interface {
	GetImage() (v1.Image, error)
}

type NewBuildpackRepository added in v0.2.0

type NewBuildpackRepository func(clusterStore *v1alpha1.ClusterStore) BuildpackRepository

type RegistryClient

type RegistryClient interface {
	Fetch(keychain authn.Keychain, repoName string) (v1.Image, string, error)
	Save(keychain authn.Keychain, tag string, image v1.Image) (string, error)
}

type RemoteBuilderCreator

type RemoteBuilderCreator struct {
	RegistryClient         RegistryClient
	NewBuildpackRepository NewBuildpackRepository
	LifecycleProvider      LifecycleProvider
	KpackVersion           string
}

func (*RemoteBuilderCreator) CreateBuilder

func (r *RemoteBuilderCreator) CreateBuilder(keychain authn.Keychain, clusterStore *v1alpha1.ClusterStore, clusterStack *v1alpha1.ClusterStack, spec v1alpha1.BuilderSpec) (v1alpha1.BuilderRecord, error)

type RemoteBuildpackInfo

type RemoteBuildpackInfo struct {
	BuildpackInfo DescriptiveBuildpackInfo
	Layers        []buildpackLayer
}

func (RemoteBuildpackInfo) Optional

func (i RemoteBuildpackInfo) Optional(optional bool) RemoteBuildpackRef

type RemoteBuildpackRef

type RemoteBuildpackRef struct {
	DescriptiveBuildpackInfo DescriptiveBuildpackInfo
	Optional                 bool
	Layers                   []buildpackLayer
}

type RemoteMetadataRetriever

type RemoteMetadataRetriever struct {
	KeychainFactory registry.KeychainFactory
	ImageFetcher    ImageFetcher
}

func (*RemoteMetadataRetriever) GetBuiltImage added in v0.0.1

func (r *RemoteMetadataRetriever) GetBuiltImage(build *v1alpha1.Build) (BuiltImage, error)

type RemoteStackReader

type RemoteStackReader struct {
	RegistryClient RegistryClient
	Keychain       authn.Keychain
}

func (*RemoteStackReader) Read

type RemoteStoreReader added in v0.0.6

type RemoteStoreReader struct {
	RegistryClient RegistryClient
	Keychain       authn.Keychain
}

func (*RemoteStoreReader) Read added in v0.0.6

func (r *RemoteStoreReader) Read(storeImages []v1alpha1.StoreImage) ([]v1alpha1.StoreBuildpack, error)

type RunImageMetadata

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

type Stack

type Stack struct {
	ID     string   `json:"id"`
	Mixins []string `json:"mixins,omitempty"`
}

type StackMetadata

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

type StoreBuildpackRepository added in v0.0.6

type StoreBuildpackRepository struct {
	Keychain authn.Keychain

	ClusterStore *v1alpha1.ClusterStore
}

func (*StoreBuildpackRepository) FindByIdAndVersion added in v0.0.6

func (s *StoreBuildpackRepository) FindByIdAndVersion(id, version string) (RemoteBuildpackInfo, error)

Jump to

Keyboard shortcuts

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