commands

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBuildpackRegistry deprecated added in v0.14.0

func AddBuildpackRegistry(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

Deprecated: Use config registries add instead

func AddHelpFlag

func AddHelpFlag(cmd *cobra.Command, commandName string)

func Build

func Build(logger logging.Logger, cfg config.Config, packClient PackClient) *cobra.Command

Build an image from source code

func BuilderCreate added in v0.16.0

func BuilderCreate(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

CreateBuilder creates a builder image, based on a builder config

func BuilderInspect added in v0.18.0

func BuilderInspect(logger logging.Logger,
	cfg config.Config,
	inspector BuilderInspector,
	writerFactory writer.BuilderWriterFactory,
) *cobra.Command

func BuilderSuggest added in v0.16.0

func BuilderSuggest(logger logging.Logger, inspector BuilderInspector) *cobra.Command

func BuildpackInspect added in v0.18.0

func BuildpackInspect(logger logging.Logger, cfg config.Config, client PackClient) *cobra.Command

func BuildpackNew added in v0.18.0

func BuildpackNew(logger logging.Logger, creator BuildpackCreator) *cobra.Command

BuildpackNew generates the scaffolding of a buildpack

func BuildpackPackage added in v0.16.0

func BuildpackPackage(logger logging.Logger, cfg config.Config, packager BuildpackPackager, packageConfigReader PackageConfigReader) *cobra.Command

BuildpackPackage packages (a) buildpack(s) into OCI format, based on a package config

func BuildpackPull added in v0.16.0

func BuildpackPull(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

BuildpackPull pulls a buildpack and stores it locally

func BuildpackRegister added in v0.16.0

func BuildpackRegister(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

func BuildpackYank added in v0.16.0

func BuildpackYank(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

func CompletionCommand

func CompletionCommand(logger logging.Logger, packHome string) *cobra.Command

func ConfigDefaultBuilder added in v0.16.0

func ConfigDefaultBuilder(logger logging.Logger, cfg config.Config, cfgPath string, client PackClient) *cobra.Command

func ConfigExperimental added in v0.16.0

func ConfigExperimental(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

func ConfigLifecycleImage added in v0.18.0

func ConfigLifecycleImage(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

func ConfigPullPolicy added in v0.17.0

func ConfigPullPolicy(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

func ConfigRegistries added in v0.16.0

func ConfigRegistries(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

func ConfigRegistriesDefault added in v0.16.0

func ConfigRegistriesDefault(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

func ConfigRegistryMirrors added in v0.20.0

func ConfigRegistryMirrors(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

func ConfigRunImagesMirrors added in v0.16.0

func ConfigRunImagesMirrors(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

func ConfigTrustedBuilder added in v0.16.0

func ConfigTrustedBuilder(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

func CreateBuilder deprecated

func CreateBuilder(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

Deprecated: Use 'builder create' instead. CreateBuilder creates a builder image, based on a builder config

func CreateCancellableContext added in v0.10.0

func CreateCancellableContext() context.Context

func DownloadSBOM added in v0.24.0

func DownloadSBOM(
	logger logging.Logger,
	client PackClient,
) *cobra.Command

func ExtensionInspect added in v0.29.0

func ExtensionInspect(logger logging.Logger, cfg config.Config, client PackClient) *cobra.Command

func ExtensionNew added in v0.29.0

func ExtensionNew(logger logging.Logger) *cobra.Command

ExtensionNew generates the scaffolding of an extension

func ExtensionPackage added in v0.29.0

func ExtensionPackage(logger logging.Logger, cfg config.Config, packager ExtensionPackager, packageConfigReader PackageConfigReader) *cobra.Command

ExtensionPackage packages (a) extension(s) into OCI format, based on a package config

func ExtensionPull added in v0.29.0

func ExtensionPull(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

ExtensionPull pulls an extension and stores it locally

func ExtensionRegister added in v0.29.0

func ExtensionRegister(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

func ExtensionYank added in v0.29.0

func ExtensionYank(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

func InspectBuilder deprecated

func InspectBuilder(
	logger logging.Logger,
	cfg config.Config,
	inspector BuilderInspector,
	writerFactory writer.BuilderWriterFactory,
) *cobra.Command

Deprecated: Use builder inspect instead.

func InspectBuildpack deprecated added in v0.14.0

func InspectBuildpack(logger logging.Logger, cfg config.Config, client PackClient) *cobra.Command

Deprecated: Use buildpack inspect instead.

func InspectImage

func InspectImage(
	logger logging.Logger,
	writerFactory InspectImageWriterFactory,
	cfg config.Config,
	client PackClient,
) *cobra.Command

func ListBuildpackRegistries deprecated added in v0.14.0

func ListBuildpackRegistries(logger logging.Logger, cfg config.Config) *cobra.Command

Deprecated: Use config registries list instead

func ListTrustedBuilders deprecated added in v0.12.0

func ListTrustedBuilders(logger logging.Logger, cfg config.Config) *cobra.Command

Deprecated: Use `config trusted-builders list` instead

func ManifestAdd added in v0.34.0

func ManifestAdd(logger logging.Logger, pack PackClient) *cobra.Command

ManifestAdd adds a new image to a manifest list (image index).

func ManifestAnnotate added in v0.34.0

func ManifestAnnotate(logger logging.Logger, pack PackClient) *cobra.Command

ManifestAnnotate modifies a manifest list and updates the platform information within the index for an image in the list.

func ManifestCreate added in v0.34.0

func ManifestCreate(logger logging.Logger, pack PackClient) *cobra.Command

ManifestCreate creates an image index for a multi-arch image

func ManifestDelete added in v0.34.0

func ManifestDelete(logger logging.Logger, pack PackClient) *cobra.Command

ManifestDelete deletes one or more manifest lists from local storage

func ManifestInspect added in v0.34.0

func ManifestInspect(logger logging.Logger, pack PackClient) *cobra.Command

ManifestInspect shows the manifest information stored locally

func ManifestPush added in v0.34.0

func ManifestPush(logger logging.Logger, pack PackClient) *cobra.Command

ManifestPush pushes a manifest list to a remote registry.

func ManifestRemove added in v0.34.0

func ManifestRemove(logger logging.Logger, pack PackClient) *cobra.Command

ManifestRemove will remove the specified image manifest if it is already referenced in the index

func NewBuilderCommand added in v0.16.0

func NewBuilderCommand(logger logging.Logger, cfg config.Config, client PackClient) *cobra.Command

func NewBuildpackCommand added in v0.16.0

func NewBuildpackCommand(logger logging.Logger, cfg config.Config, client PackClient, packageConfigReader PackageConfigReader) *cobra.Command

func NewConfigCommand added in v0.16.0

func NewConfigCommand(logger logging.Logger, cfg config.Config, cfgPath string, client PackClient) *cobra.Command

func NewExtensionCommand added in v0.29.0

func NewExtensionCommand(logger logging.Logger, cfg config.Config, client PackClient, packageConfigReader PackageConfigReader) *cobra.Command

func NewManifestCommand added in v0.34.0

func NewManifestCommand(logger logging.Logger, client PackClient) *cobra.Command

func NewSBOMCommand added in v0.24.0

func NewSBOMCommand(logger logging.Logger, cfg config.Config, client PackClient) *cobra.Command

func NewStackCommand added in v0.16.0

func NewStackCommand(logger logging.Logger) *cobra.Command

func PackageBuildpack deprecated added in v0.9.0

func PackageBuildpack(logger logging.Logger, cfg config.Config, packager BuildpackPackager, packageConfigReader PackageConfigReader) *cobra.Command

Deprecated: use BuildpackPackage instead PackageBuildpack packages (a) buildpack(s) into OCI format, based on a package config

func Rebase

func Rebase(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

func RegisterBuildpack deprecated added in v0.13.0

func RegisterBuildpack(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

Deprecated: Use BuildpackRegister instead

func RemoveRegistry deprecated added in v0.15.0

func RemoveRegistry(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

Deprecated: Use config registries remove instead

func Report

func Report(logger logging.Logger, version, cfgPath string) *cobra.Command

func SetDefaultBuilder deprecated

func SetDefaultBuilder(logger logging.Logger, cfg config.Config, cfgPath string, client PackClient) *cobra.Command

Deprecated: Use `pack config default-builder`

func SetDefaultRegistry deprecated added in v0.15.0

func SetDefaultRegistry(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

Deprecated: Use `pack config registries default` instead

func SetRunImagesMirrors deprecated

func SetRunImagesMirrors(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

Deprecated: Use `pack config run-image-mirrors add` instead SetRunImagesMirrors sets run image mirros for a given run image

func Suggest added in v0.16.0

func Suggest(log logging.Logger)

func SuggestBuilders deprecated

func SuggestBuilders(logger logging.Logger, inspector BuilderInspector) *cobra.Command

Deprecated: Use `builder suggest` instead.

func TrustBuilder deprecated added in v0.11.0

func TrustBuilder(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

Deprecated: Use `config trusted-builders add` instead

func UntrustBuilder deprecated added in v0.12.0

func UntrustBuilder(logger logging.Logger, cfg config.Config, cfgPath string) *cobra.Command

Deprecated: Use `config trusted-builders remove` instead

func Version

func Version(logger logging.Logger, version string) *cobra.Command

Version shows the current pack version

func WriteSuggestedBuilder added in v0.11.0

func WriteSuggestedBuilder(logger logging.Logger, inspector BuilderInspector, builders []bldr.KnownBuilder)

func YankBuildpack deprecated added in v0.13.0

func YankBuildpack(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command

Deprecated: Use yank instead

Types

type BuildFlags

type BuildFlags struct {
	Publish              bool
	ClearCache           bool
	TrustBuilder         bool
	TrustExtraBuildpacks bool
	Interactive          bool
	Sparse               bool
	DockerHost           string
	CacheImage           string
	Cache                cache.CacheOpts
	AppPath              string
	Builder              string
	Registry             string
	RunImage             string
	Platform             string
	Policy               string
	Network              string
	DescriptorPath       string
	DefaultProcessType   string
	LifecycleImage       string
	Env                  []string
	EnvFiles             []string
	Buildpacks           []string
	Extensions           []string
	Volumes              []string
	AdditionalTags       []string
	Workspace            string
	GID                  int
	UID                  int
	PreviousImage        string
	SBOMDestinationDir   string
	ReportDestinationDir string
	DateTime             string
	PreBuildpacks        []string
	PostBuildpacks       []string
}

type BuilderCreateFlags added in v0.16.0

type BuilderCreateFlags struct {
	Publish         bool
	BuilderTomlPath string
	Registry        string
	Policy          string
	Flatten         []string
	Targets         []string
	Label           map[string]string
}

BuilderCreateFlags define flags provided to the CreateBuilder command

type BuilderInspectFlags added in v0.18.0

type BuilderInspectFlags struct {
	Depth        int
	OutputFormat string
}

type BuilderInspector added in v0.15.0

type BuilderInspector interface {
	InspectBuilder(name string, daemon bool, modifiers ...client.BuilderInspectionModifier) (*client.BuilderInfo, error)
}

type BuildpackCreator added in v0.18.0

type BuildpackCreator interface {
	NewBuildpack(ctx context.Context, options client.NewBuildpackOptions) error
}

BuildpackCreator creates buildpacks

type BuildpackInspectFlags added in v0.18.0

type BuildpackInspectFlags struct {
	Depth    int
	Registry string
	Verbose  bool
}

type BuildpackNewFlags added in v0.18.0

type BuildpackNewFlags struct {
	API  string
	Path string
	// Deprecated: Stacks are deprecated
	Stacks  []string
	Targets []string
	Version string
}

BuildpackNewFlags define flags provided to the BuildpackNew command

type BuildpackPackageFlags added in v0.16.0

type BuildpackPackageFlags struct {
	PackageTomlPath   string
	Format            string
	Policy            string
	BuildpackRegistry string
	Path              string
	FlattenExclude    []string
	Targets           []string
	Label             map[string]string
	Publish           bool
	Flatten           bool
}

BuildpackPackageFlags define flags provided to the BuildpackPackage command

type BuildpackPackager added in v0.9.0

type BuildpackPackager interface {
	PackageBuildpack(ctx context.Context, options client.PackageBuildpackOptions) error
}

BuildpackPackager packages buildpacks

type BuildpackPullFlags added in v0.16.0

type BuildpackPullFlags struct {
	// BuildpackRegistry is the name of the buildpack registry to use to search for
	BuildpackRegistry string
}

BuildpackPullFlags consist of flags applicable to the `buildpack pull` command

type BuildpackRegisterFlags added in v0.16.0

type BuildpackRegisterFlags struct {
	BuildpackRegistry string
}

type BuildpackYankFlags added in v0.16.0

type BuildpackYankFlags struct {
	BuildpackRegistry string
	Undo              bool
}

type CompletionFlags added in v0.12.0

type CompletionFlags struct {
	Shell string
}

type DownloadSBOMFlags added in v0.24.0

type DownloadSBOMFlags struct {
	Remote         bool
	DestinationDir string
}

type ExtensionNewFlags added in v0.29.0

type ExtensionNewFlags struct {
	API     string
	Path    string
	Stacks  []string
	Version string
}

ExtensionNewFlags define flags provided to the ExtensionNew command

type ExtensionPackageFlags added in v0.29.0

type ExtensionPackageFlags struct {
	PackageTomlPath string
	Format          string
	Publish         bool
	Policy          string
}

ExtensionPackageFlags define flags provided to the ExtensionPackage command

type ExtensionPackager added in v0.30.0

type ExtensionPackager interface {
	PackageExtension(ctx context.Context, options client.PackageBuildpackOptions) error
}

ExtensionPackager packages extensions

type ExtensionPullFlags added in v0.29.0

type ExtensionPullFlags struct {
	// ExtensionRegistry is the name of the extension registry to use to search for
	ExtensionRegistry string
}

ExtensionPullFlags consist of flags applicable to the `extension pull` command

type ExtensionRegisterFlags added in v0.29.0

type ExtensionRegisterFlags struct {
	ExtensionRegistry string
}

type ExtensionYankFlags added in v0.29.0

type ExtensionYankFlags struct {
	ExtensionRegistry string
	Undo              bool
}

type InspectImageFlags

type InspectImageFlags struct {
	BOM          bool
	OutputFormat string
}

type InspectImageWriterFactory added in v0.16.0

type InspectImageWriterFactory interface {
	Writer(kind string, BOM bool) (writer.InspectImageWriter, error)
}

type ManifestAnnotateFlags added in v0.34.0

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

ManifestAnnotateFlags define flags provided to the ManifestAnnotate

type ManifestCreateFlags added in v0.34.0

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

ManifestCreateFlags define flags provided to the ManifestCreate

type ManifestPushFlags added in v0.34.0

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

ManifestPushFlags define flags provided to the ManifestPush

type PackClient

type PackClient interface {
	InspectBuilder(string, bool, ...client.BuilderInspectionModifier) (*client.BuilderInfo, error)
	InspectImage(string, bool) (*client.ImageInfo, error)
	Rebase(context.Context, client.RebaseOptions) error
	CreateBuilder(context.Context, client.CreateBuilderOptions) error
	NewBuildpack(context.Context, client.NewBuildpackOptions) error
	PackageBuildpack(ctx context.Context, opts client.PackageBuildpackOptions) error
	PackageExtension(ctx context.Context, opts client.PackageBuildpackOptions) error
	Build(context.Context, client.BuildOptions) error
	RegisterBuildpack(context.Context, client.RegisterBuildpackOptions) error
	YankBuildpack(client.YankBuildpackOptions) error
	InspectBuildpack(client.InspectBuildpackOptions) (*client.BuildpackInfo, error)
	InspectExtension(client.InspectExtensionOptions) (*client.ExtensionInfo, error)
	PullBuildpack(context.Context, client.PullBuildpackOptions) error
	DownloadSBOM(name string, options client.DownloadSBOMOptions) error
	CreateManifest(ctx context.Context, opts client.CreateManifestOptions) error
	AnnotateManifest(ctx context.Context, opts client.ManifestAnnotateOptions) error
	AddManifest(ctx context.Context, opts client.ManifestAddOptions) error
	DeleteManifest(name []string) error
	RemoveManifest(name string, images []string) error
	PushManifest(client.PushManifestOptions) error
	InspectManifest(string) error
}

type PackageConfigReader added in v0.9.0

type PackageConfigReader interface {
	Read(path string) (pubbldpkg.Config, error)
	ReadBuildpackDescriptor(path string) (dist.BuildpackDescriptor, error)
}

PackageConfigReader reads BuildpackPackage configs

Directories

Path Synopsis
Package testmocks is a generated GoMock package.
Package testmocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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