carton

package
v1.70.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ImageDependencyPattern      = `(?m)(.*build-image[\s]+=[\s]+"[^"]+:)[^"]+(".*)`
	ImageDependencySubstitution = "${1}%s${2}"
)
View Source
const (
	BuildpackDependencyPattern      = `(?m)([\s]*.*id[\s]+=[\s]+"%s"\n.*\n[\s]*version[\s]+=[\s]+")%s("\n[\s]*uri[\s]+=[\s]+").*("\n[\s]*sha256[\s]+=[\s]+").*(".*)`
	BuildpackDependencySubstitution = "${1}%s${2}%s${3}%s${4}"
)
View Source
const (
	LifecycleDependencyPattern      = `(?m)(.*\[lifecycle\]\nuri[\s]+=[\s]+")[^"]+(".*)`
	LifecycleDependencySubstitution = "${1}https://github.com/buildpacks/lifecycle/releases/download/v%[1]s/lifecycle-v%[1]s+linux.x86-64.tgz${2}"
)
View Source
const DefaultTargetArch = "all"

Variables

This section is empty.

Functions

func NetrcPath added in v1.48.0

func NetrcPath() (string, error)

Types

type BuildImageDependency added in v1.46.0

type BuildImageDependency struct {
	BuilderPath string
	Version     string
}

func (BuildImageDependency) Update added in v1.46.0

func (i BuildImageDependency) Update(options ...Option)

type BuildpackDependency added in v1.28.3

type BuildpackDependency struct {
	BuildpackPath  string
	ID             string
	Arch           string
	SHA256         string
	URI            string
	Version        string
	VersionPattern string
	CPE            string
	CPEPattern     string
	PURL           string
	PURLPattern    string
	Source         string `toml:"source,omitempty"`
	SourceSHA256   string `toml:"source-sha256,omitempty"`
}

func (BuildpackDependency) Update added in v1.28.3

func (b BuildpackDependency) Update(options ...Option)

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config is an object that contains configurable properties for execution.

type EntryWriter

type EntryWriter interface {

	// Write reads a file from source and writes it to the relative path destination.
	Write(source string, destination string) error
}

EntryWriter is the interface implemented by a type that wants to write an entry.

type LifecycleDependency added in v1.26.0

type LifecycleDependency struct {
	BuilderPath string
	Version     string
}

func (LifecycleDependency) Update added in v1.26.0

func (l LifecycleDependency) Update(options ...Option)

type Netrc added in v1.48.0

type Netrc []NetrcLine

func ParseNetrc added in v1.48.0

func ParseNetrc(path string) (Netrc, error)

func (Netrc) BasicAuth added in v1.48.0

func (n Netrc) BasicAuth(request *http.Request) (*http.Request, error)

type NetrcLine added in v1.48.0

type NetrcLine struct {
	Machine  string
	Login    string
	Password string
}

type Option

type Option func(config Config) Config

Option is a function for configuring a Config instance.

func WithEntryWriter

func WithEntryWriter(entryWriter EntryWriter) Option

WithEntryWriter creates an Option that sets an EntryWriter implementation.

func WithExecutor

func WithExecutor(executor effect.Executor) Option

WithExecutor creates an Option that sets an Executor implementation.

func WithExitHandler

func WithExitHandler(exitHandler libcnb.ExitHandler) Option

WithExitHandler creates an Option that sets an ExitHandler implementation.

type Package

type Package struct {

	// CacheLocation is the location to cache downloaded dependencies.
	CacheLocation string

	// DependencyFilters indicates which filters should be applied to exclude dependencies
	DependencyFilters []string

	// StrictDependencyFilters indicates that a filter must match both the ID and version, otherwise it must only match one of the two
	StrictDependencyFilters bool

	// IncludeDependencies indicates whether to include dependencies in build package.
	IncludeDependencies bool

	// Destination is the directory to create the build package in.
	Destination string

	// Source is the source directory of the buildpack.
	Source string

	// Version is a version to substitute into an existing buildpack.toml.
	Version string

	// TargetArch is the target architecture to package. Default is "all".
	TargetArch string
}

Package is an object that contains the configuration for building a package.

func (Package) Create added in v1.22.0

func (p Package) Create(options ...Option)

Create creates a package.

type PackageDependency added in v1.22.0

type PackageDependency struct {
	BuilderPath   string
	BuildpackPath string
	ID            string
	Version       string
	PackagePath   string
}

func (PackageDependency) Update added in v1.22.0

func (p PackageDependency) Update(options ...Option)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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