config

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLifecycleImageRepo = "buildpacksio/lifecycle"
View Source
const OfficialRegistryName = "official"

Variables

This section is empty.

Functions

func DefaultConfigPath

func DefaultConfigPath() (string, error)

func FormatUndecodedKeys added in v0.10.0

func FormatUndecodedKeys(undecodedKeys []toml.Key) string

func MkdirAll

func MkdirAll(path string) error

func PackHome

func PackHome() (string, error)

func Write

func Write(cfg Config, path string) error

Types

type Config

type Config struct {
	// Deprecated: Use DefaultRegistryName instead. See https://github.com/buildpacks/pack/issues/747.
	DefaultRegistry     string            `toml:"default-registry-url,omitempty"`
	DefaultRegistryName string            `toml:"default-registry,omitempty"`
	DefaultBuilder      string            `toml:"default-builder-image,omitempty"`
	PullPolicy          string            `toml:"pull-policy,omitempty"`
	Experimental        bool              `toml:"experimental,omitempty"`
	RunImages           []RunImage        `toml:"run-images"`
	TrustedBuilders     []TrustedBuilder  `toml:"trusted-builders,omitempty"`
	Registries          []Registry        `toml:"registries,omitempty"`
	LifecycleImage      string            `toml:"lifecycle-image,omitempty"`
	RegistryMirrors     map[string]string `toml:"registry-mirrors,omitempty"`
}

func Read

func Read(path string) (Config, error)

func SetRunImageMirrors

func SetRunImageMirrors(cfg Config, image string, mirrors []string) Config

type Registry added in v0.13.0

type Registry struct {
	Name string `toml:"name"`
	Type string `toml:"type"`
	URL  string `toml:"url"`
}

func DefaultRegistry added in v0.14.0

func DefaultRegistry() Registry

func GetRegistries added in v0.14.0

func GetRegistries(cfg Config) []Registry

func GetRegistry added in v0.13.0

func GetRegistry(cfg Config, registryName string) (Registry, error)

type RunImage

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

type TrustedBuilder added in v0.11.0

type TrustedBuilder struct {
	Name string `toml:"name"`
}

Jump to

Keyboard shortcuts

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