Documentation ¶
Overview ¶
Package cnbutils provides utility functions to interact with Buildpacks
Index ¶
- func CopyProject(source, target string, include, exclude *ignore.GitIgnore, utils BuildUtils) error
- func CreateEnvFiles(utils BuildUtils, platformPath string, env map[string]interface{}) error
- func DigestFromReport(utils BuildUtils) (string, error)
- func GenerateCnbAuth(config string, utils BuildUtils) (string, error)
- type BuildPackMetadata
- type BuildUtils
- type License
- type MockUtils
- func (c *MockUtils) DownloadImage(src, dst string) (v1.Image, error)
- func (c *MockUtils) DownloadImageContent(bpack, targetDir string) (v1.Image, error)
- func (c *MockUtils) GetFileUtils() piperutils.FileUtils
- func (c *MockUtils) GetImageSource() (string, error)
- func (c *MockUtils) GetRemoteImageInfo(imageSource string) (v1.Image, error)
- type Order
- type OrderEntry
- type TargetImage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyProject ¶
func CopyProject(source, target string, include, exclude *ignore.GitIgnore, utils BuildUtils) error
func CreateEnvFiles ¶
func CreateEnvFiles(utils BuildUtils, platformPath string, env map[string]interface{}) error
func DigestFromReport ¶
func DigestFromReport(utils BuildUtils) (string, error)
func GenerateCnbAuth ¶
func GenerateCnbAuth(config string, utils BuildUtils) (string, 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"` }
type BuildUtils ¶
type BuildUtils interface { command.ExecRunner piperutils.FileUtils docker.Download }
type MockUtils ¶
type MockUtils struct { *mock.ExecMockRunner *mock.FilesMock }
func (*MockUtils) DownloadImage ¶
func (*MockUtils) DownloadImageContent ¶
func (*MockUtils) GetFileUtils ¶
func (c *MockUtils) GetFileUtils() piperutils.FileUtils
func (*MockUtils) GetImageSource ¶
type Order ¶
type Order struct { Order []OrderEntry `toml:"order"` Utils BuildUtils `toml:"-"` }
func DownloadBuildpacks ¶
type OrderEntry ¶
type OrderEntry struct {
Group []BuildPackMetadata `toml:"group" json:"group"`
}
type TargetImage ¶
type TargetImage struct { ContainerImageName string ContainerImageTag string ContainerRegistry *url.URL }
func GetTargetImage ¶
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 |
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.