Documentation
¶
Index ¶
- Constants
- Variables
- type BuildOptions
- type BuilderInfo
- type BuildpackInfoKey
- type Client
- func (c *Client) Build(ctx context.Context, opts BuildOptions) error
- func (c *Client) CreateBuilder(ctx context.Context, opts CreateBuilderOptions) error
- func (c *Client) InspectBuilder(name string, daemon bool) (*BuilderInfo, error)
- func (c *Client) InspectImage(name string, daemon bool) (*ImageInfo, error)
- func (c *Client) PackageBuildpack(ctx context.Context, opts PackageBuildpackOptions) error
- func (c *Client) Rebase(ctx context.Context, opts RebaseOptions) error
- func (c *Client) RegisterBuildpack(ctx context.Context, opts RegisterBuildpackOptions) error
- func (c *Client) YankBuildpack(opts YankBuildpackOptions) error
- type ClientOption
- func WithCacheDir(path string) ClientOptiondeprecated
- func WithDockerClient(docker dockerClient.CommonAPIClient) ClientOption
- func WithDownloader(d Downloader) ClientOption
- func WithExperimental(experimental bool) ClientOption
- func WithFetcher(f ImageFetcher) ClientOption
- func WithImageFactory(f ImageFactory) ClientOption
- func WithLogger(l logging.Logger) ClientOption
- type ContainerConfig
- type CreateBuilderOptions
- type Downloader
- type ExperimentError
- type ImageFactory
- type ImageFetcher
- type ImageInfo
- type LifecycleExecutor
- type PackageBuildpackOptions
- type ProcessDetails
- type ProxyConfig
- type RebaseOptions
- type RegisterBuildpackOptions
- type SoftError
- type YankBuildpackOptions
Constants ¶
const ( FormatImage = "image" FormatFile = "file" )
Variables ¶
var (
// Version is the version of `pack`. It is injected at compile time.
Version = "0.0.0"
)
Functions ¶
This section is empty.
Types ¶
type BuildOptions ¶ added in v0.6.0
type BuildOptions struct {
Image string // required
Builder string // required
Registry string
AppPath string // defaults to current working directory
RunImage string // defaults to the best mirror from the builder metadata or AdditionalMirrors
AdditionalMirrors map[string][]string // only considered if RunImage is not provided
Env map[string]string
Publish bool
ClearCache bool
TrustBuilder bool
Buildpacks []string
ProxyConfig *ProxyConfig // defaults to environment proxy vars
ContainerConfig ContainerConfig
DefaultProcessType string
FileFilter func(string) bool
PullPolicy config.PullPolicy
}
type BuilderInfo ¶ added in v0.6.0
type BuilderInfo struct {
Description string
Stack string
Mixins []string
RunImage string
RunImageMirrors []string
Buildpacks []dist.BuildpackInfo
Order dist.Order
BuildpackLayers dist.BuildpackLayers
Lifecycle builder.LifecycleDescriptor
CreatedBy builder.CreatorMetadata
}
type BuildpackInfoKey ¶ added in v0.13.0
type Client ¶ added in v0.6.0
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶ added in v0.6.0
func NewClient(opts ...ClientOption) (*Client, error)
func (*Client) Build ¶ added in v0.6.0
func (c *Client) Build(ctx context.Context, opts BuildOptions) error
func (*Client) CreateBuilder ¶ added in v0.6.0
func (c *Client) CreateBuilder(ctx context.Context, opts CreateBuilderOptions) error
CreateBuilder creates a builder
func (*Client) InspectBuilder ¶ added in v0.6.0
func (c *Client) InspectBuilder(name string, daemon bool) (*BuilderInfo, error)
func (*Client) InspectImage ¶ added in v0.6.0
func (*Client) PackageBuildpack ¶ added in v0.9.0
func (c *Client) PackageBuildpack(ctx context.Context, opts PackageBuildpackOptions) error
PackageBuildpack packages buildpack(s) into an image or file
func (*Client) Rebase ¶ added in v0.6.0
func (c *Client) Rebase(ctx context.Context, opts RebaseOptions) error
func (*Client) RegisterBuildpack ¶ added in v0.13.0
func (c *Client) RegisterBuildpack(ctx context.Context, opts RegisterBuildpackOptions) error
func (*Client) YankBuildpack ¶ added in v0.13.0
func (c *Client) YankBuildpack(opts YankBuildpackOptions) error
type ClientOption ¶ added in v0.6.0
type ClientOption func(c *Client)
func WithCacheDir
deprecated
added in
v0.6.0
func WithCacheDir(path string) ClientOption
WithCacheDir supply your own cache directory.
Deprecated: use WithDownloader instead.
func WithDockerClient ¶ added in v0.6.0
func WithDockerClient(docker dockerClient.CommonAPIClient) ClientOption
WithDockerClient supply your own docker client.
func WithDownloader ¶ added in v0.6.0
func WithDownloader(d Downloader) ClientOption
WithDownloader supply your own downloader.
func WithExperimental ¶ added in v0.11.0
func WithExperimental(experimental bool) ClientOption
WithExperimental sets whether experimental features should be enabled
func WithFetcher ¶ added in v0.6.0
func WithFetcher(f ImageFetcher) ClientOption
WithFetcher supply your own fetcher.
func WithImageFactory ¶ added in v0.6.0
func WithImageFactory(f ImageFactory) ClientOption
WithImageFactory supply your own image factory.
func WithLogger ¶ added in v0.6.0
func WithLogger(l logging.Logger) ClientOption
WithLogger supply your own logger.
type ContainerConfig ¶ added in v0.6.0
type CreateBuilderOptions ¶ added in v0.6.0
type CreateBuilderOptions struct {
BuilderName string
Config pubbldr.Config
Publish bool
Registry string
PullPolicy config.PullPolicy
}
CreateBuilderOptions are options passed to CreateBuilder
type Downloader ¶ added in v0.6.0
type ExperimentError ¶ added in v0.11.0
type ExperimentError struct {
// contains filtered or unexported fields
}
ExperimentError denotes that an experimental feature was trying to be used without experimental features enabled.
func NewExperimentError ¶ added in v0.11.0
func NewExperimentError(msg string) ExperimentError
func (ExperimentError) Error ¶ added in v0.11.0
func (ee ExperimentError) Error() string
type ImageFactory ¶ added in v0.6.0
type ImageFetcher ¶ added in v0.6.0
type ImageFetcher interface {
// Fetch fetches an image by resolving it both remotely and locally depending on provided parameters.
// If daemon is true, it will look return a `local.Image`. Pull, applicable only when daemon is true, will
// attempt to pull a remote image first.
Fetch(ctx context.Context, name string, daemon bool, pullPolicy pubcfg.PullPolicy) (imgutil.Image, error)
}
type ImageInfo ¶ added in v0.6.0
type ImageInfo struct {
StackID string
Buildpacks []lifecycle.Buildpack
Base lifecycle.RunImageMetadata
BOM []lifecycle.BOMEntry
Stack lifecycle.StackMetadata
Processes ProcessDetails
}
type LifecycleExecutor ¶ added in v0.13.0
type LifecycleExecutor interface {
Execute(ctx context.Context, opts build.LifecycleOptions) error
}
type PackageBuildpackOptions ¶ added in v0.9.0
type PackageBuildpackOptions struct {
Name string
Format string
Config pubbldpkg.Config
Publish bool
PullPolicy config.PullPolicy
}
PackageBuildpackOptions are configuration options and metadata you can pass into PackageBuildpack
type ProcessDetails ¶ added in v0.6.0
type ProxyConfig ¶ added in v0.6.0
type RebaseOptions ¶ added in v0.6.0
type RegisterBuildpackOptions ¶ added in v0.13.0
type SoftError ¶ added in v0.11.0
type SoftError struct{}
SoftError is an error that is not intended to be displayed.
func NewSoftError ¶ added in v0.11.0
func NewSoftError() SoftError
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
pack
command
|
|
|
internal
|
|
|
builder/testmocks
Package testmocks is a generated GoMock package.
|
Package testmocks is a generated GoMock package. |
|
commands/testmocks
Package testmocks is a generated GoMock package.
|
Package testmocks is a generated GoMock package. |
|
dist/testmocks
Package testmocks is a generated GoMock package.
|
Package testmocks is a generated GoMock package. |
|
logging
Package logging implements the logger for the pack CLI.
|
Package logging implements the logger for the pack CLI. |
|
Package logging defines the minimal interface that loggers must support to be used by pack.
|
Package logging defines the minimal interface that loggers must support to be used by pack. |
|
Package testmocks is a generated GoMock package.
|
Package testmocks is a generated GoMock package. |
|
tools
module
|