Documentation ¶
Overview ¶
Package cnbutils provides utility functions to interact with Buildpacks
Index ¶
- Constants
- func CnbUserInfo() (int, int, error)
- func CopyProject(source, target string, include, exclude *ignore.GitIgnore, utils BuildUtils, ...) error
- func CreateEnvFiles(utils BuildUtils, platformPath string, env map[string]interface{}) error
- func CreateVersionSymlinks(basePath, buildpackDir string, utils BuildUtils) error
- func DigestFromReport(utils BuildUtils) (string, error)
- func DownloadBuildpacks(path string, bpacks []string, dockerCreds string, utils BuildUtils) error
- type BuildPackMetadata
- type BuildSummary
- type BuildUtils
- type DockerKeychain
- type ImageSummary
- type License
- type MockUtils
- type Order
- type OrderEntry
- type TargetImage
Constants ¶
View Source
const DefaultOrderPath = "/cnb/order.toml"
Variables ¶
This section is empty.
Functions ¶
func CnbUserInfo ¶ added in v1.318.0
func CopyProject ¶ added in v1.199.0
func CreateEnvFiles ¶ added in v1.169.0
func CreateEnvFiles(utils BuildUtils, platformPath string, env map[string]interface{}) error
func CreateVersionSymlinks ¶ added in v1.298.0
func CreateVersionSymlinks(basePath, buildpackDir string, utils BuildUtils) error
func DigestFromReport ¶ added in v1.200.0
func DigestFromReport(utils BuildUtils) (string, error)
func DownloadBuildpacks ¶
func DownloadBuildpacks(path string, bpacks []string, dockerCreds string, utils BuildUtils) error
Types ¶
type BuildPackMetadata ¶
type BuildPackMetadata struct { ID string `toml:"id,omitempty" json:"id,omitempty" yaml:"id,omitempty"` Name string `toml:"name,omitempty" json:"name,omitempty" yaml:"name,omitempty"` Version string `toml:"version,omitempty" json:"version,omitempty" yaml:"version,omitempty"` Description string `toml:"description,omitempty" json:"description,omitempty" yaml:"description,omitempty"` Homepage string `toml:"homepage,omitempty" json:"homepage,omitempty" yaml:"homepage,omitempty"` Keywords []string `toml:"keywords,omitempty" json:"keywords,omitempty" yaml:"keywords,omitempty"` Licenses []License `toml:"licenses,omitempty" json:"licenses,omitempty" yaml:"licenses,omitempty"` }
func GetMetadata ¶ added in v1.298.0
func GetMetadata(bpacks []string, utils BuildUtils) ([]BuildPackMetadata, error)
type BuildSummary ¶ added in v1.304.0
type BuildSummary struct { Builder string LifecycleVersion string Images []*ImageSummary }
func NewBuildSummary ¶ added in v1.304.0
func NewBuildSummary(builder string, utils BuildUtils) *BuildSummary
func (*BuildSummary) Print ¶ added in v1.304.0
func (bs *BuildSummary) Print()
type BuildUtils ¶
type BuildUtils interface { command.ExecRunner piperutils.FileUtils docker.Download }
type DockerKeychain ¶ added in v1.375.0
type DockerKeychain struct {
// contains filtered or unexported fields
}
func ParseDockerConfig ¶ added in v1.375.0
func ParseDockerConfig(config string, utils BuildUtils) (*DockerKeychain, error)
func (*DockerKeychain) AuthExistsForImage ¶ added in v1.375.0
func (dk *DockerKeychain) AuthExistsForImage(image string) bool
func (*DockerKeychain) ToCNBString ¶ added in v1.375.0
func (dk *DockerKeychain) ToCNBString() (string, error)
type ImageSummary ¶ added in v1.304.0
type ImageSummary struct { ImageRef string ProjectDescriptor string Buildpacks []string EnvVars []string }
func (*ImageSummary) AddEnv ¶ added in v1.304.0
func (is *ImageSummary) AddEnv(env map[string]interface{})
func (*ImageSummary) Print ¶ added in v1.304.0
func (is *ImageSummary) Print()
type MockUtils ¶
type MockUtils struct { *mock.ExecMockRunner *mock.FilesMock *mock.DownloadMock }
func (*MockUtils) GetFileUtils ¶
func (c *MockUtils) GetFileUtils() piperutils.FileUtils
type Order ¶
type Order struct { Order []OrderEntry `toml:"order"` Utils BuildUtils `toml:"-"` }
func CreateOrder ¶ added in v1.298.0
func CreateOrder(bpacks, preBpacks, postBpacks []string, dockerCreds string, utils BuildUtils) (Order, error)
type OrderEntry ¶
type OrderEntry struct {
Group []BuildPackMetadata `toml:"group" json:"group"`
}
type TargetImage ¶ added in v1.190.0
type TargetImage struct { ContainerImageName string ContainerImageTag string ContainerRegistry *url.URL }
func GetTargetImage ¶ added in v1.190.0
func GetTargetImage(imageRegistry, imageName, imageTag, projectID, envRootPath string) (*TargetImage, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package bindings provides utility function to create buildpack bindings folder structures
|
Package bindings provides utility function to create buildpack bindings folder structures |
Package project handles project.toml parsing
|
Package project handles project.toml parsing |
metadata
Package metadata handles generation of the project-metadata.toml
|
Package metadata handles generation of the project-metadata.toml |
types
Source: https://github.com/buildpacks/pack/blob/main/pkg/project/types/types.go
|
Source: https://github.com/buildpacks/pack/blob/main/pkg/project/types/types.go |
v01
Source: https://github.com/buildpacks/pack/blob/main/pkg/project/v01/project.go
|
Source: https://github.com/buildpacks/pack/blob/main/pkg/project/v01/project.go |
v02
Source: https://github.com/buildpacks/pack/blob/main/pkg/project/v02/project.go
|
Source: https://github.com/buildpacks/pack/blob/main/pkg/project/v02/project.go |
Package registry provides utilities to search buildpacks using registry API
|
Package registry provides utilities to search buildpacks using registry API |
Click to show internal directories.
Click to hide internal directories.