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

builder

package
v0.40.10 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	OrderDetectionMaxDepth = -1
	OrderDetectionNone     = 0
)

Variables

This section is empty.

Functions

func ParseBuildConfigEnv added in v0.32.0

func ParseBuildConfigEnv(env []BuildConfigEnv, path string) (envMap map[string]string, warnings []string, err error)

func ValidateConfig added in v0.12.0

func ValidateConfig(c Config) error

ValidateConfig validates the config

Types

type BpIdentifier added in v0.33.0

type BpIdentifier interface {
	Id() string
}

type BuildConfig added in v0.30.0

type BuildConfig struct {
	Image string           `toml:"image"`
	Env   []BuildConfigEnv `toml:"env"`
}

BuildConfig build image configuration

type BuildConfigEnv added in v0.32.0

type BuildConfigEnv struct {
	Name    string   `toml:"name"`
	Value   string   `toml:"value"`
	Suffix  Suffix   `toml:"suffix,omitempty"`
	Delim   string   `toml:"delim,omitempty"`
	ExecEnv []string `toml:"exec-env,omitempty"`
}

type Config

type Config struct {
	Description     string           `toml:"description"`
	Buildpacks      ModuleCollection `toml:"buildpacks"`
	Extensions      ModuleCollection `toml:"extensions"`
	Order           dist.Order       `toml:"order"`
	OrderExtensions dist.Order       `toml:"order-extensions"`
	Stack           StackConfig      `toml:"stack"`
	Lifecycle       LifecycleConfig  `toml:"lifecycle"`
	Run             RunConfig        `toml:"run"`
	Build           BuildConfig      `toml:"build"`
	Targets         []dist.Target    `toml:"targets"`
	System          dist.System      `toml:"system"`
}

Config is a builder configuration file

func ReadConfig

func ReadConfig(path string) (config Config, warnings []string, err error)

ReadConfig reads a builder configuration from the file path provided and returns the configuration along with any warnings encountered while parsing

type DetectionOrder added in v0.15.0

type DetectionOrder []DetectionOrderEntry

type DetectionOrderEntry added in v0.15.0

type DetectionOrderEntry struct {
	dist.ModuleRef      `yaml:",inline"`
	Cyclical            bool           `json:"cyclic,omitempty" yaml:"cyclic,omitempty" toml:"cyclic,omitempty"`
	GroupDetectionOrder DetectionOrder `json:"buildpacks,omitempty" yaml:"buildpacks,omitempty" toml:"buildpacks,omitempty"`
}

type LifecycleConfig

type LifecycleConfig struct {
	URI     string `toml:"uri"`
	Version string `toml:"version"`
}

LifecycleConfig details the configuration of the Lifecycle

type ModuleCollection added in v0.28.0

type ModuleCollection []ModuleConfig

ModuleCollection is a list of ModuleConfigs

type ModuleConfig added in v0.28.0

type ModuleConfig struct {
	dist.ModuleInfo
	dist.ImageOrURI
}

ModuleConfig details the configuration of a Buildpack or Extension

func (*ModuleConfig) DisplayString added in v0.28.0

func (c *ModuleConfig) DisplayString() string

type RunConfig added in v0.30.0

type RunConfig struct {
	Images []RunImageConfig `toml:"images"`
}

RunConfig set of run image configuration

type RunImageConfig added in v0.30.0

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

RunImageConfig run image id and mirrors

type StackConfig

type StackConfig struct {
	ID              string   `toml:"id"`
	BuildImage      string   `toml:"build-image"`
	RunImage        string   `toml:"run-image"`
	RunImageMirrors []string `toml:"run-image-mirrors,omitempty"`
}

StackConfig details the configuration of a Stack

type Suffix added in v0.32.0

type Suffix string
const (
	NONE     Suffix = ""
	DEFAULT  Suffix = "default"
	OVERRIDE Suffix = "override"
	APPEND   Suffix = "append"
	PREPEND  Suffix = "prepend"
)

Jump to

Keyboard shortcuts

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