cnbutils

package
v1.182.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 16 Imported by: 8

Documentation

Overview

Package cnbutils provides utility functions to interact with Buildpacks

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEnvFiles added in v1.169.0

func CreateEnvFiles(utils BuildUtils, platformPath string, env map[string]interface{}) 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 DockerMock

type DockerMock struct{}

func (*DockerMock) DownloadImageToPath

func (d *DockerMock) DownloadImageToPath(_, filePath string) (pkgutil.Image, error)

func (*DockerMock) GetImageSource

func (d *DockerMock) GetImageSource() (string, error)

func (*DockerMock) TarImage

func (d *DockerMock) TarImage(writer io.Writer, image pkgutil.Image) error

type License

type License struct {
	Type string `toml:"type" json:"type"`
	URI  string `toml:"uri" json:"uri"`
}

type MockUtils

type MockUtils struct {
	*mock.ExecMockRunner
	*mock.FilesMock
	*DockerMock
}

func (*MockUtils) GetDockerClient

func (c *MockUtils) GetDockerClient() docker.Download

func (*MockUtils) GetFileUtils

func (c *MockUtils) GetFileUtils() piperutils.FileUtils

type Order

type Order struct {
	Order []OrderEntry `toml:"order"`
	Utils BuildUtils   `toml:"-"`
}

func DownloadBuildpacks

func DownloadBuildpacks(path string, bpacks []string, dockerCreds string, utils BuildUtils) (Order, error)

func (Order) Save

func (o Order) Save(path string) error

type OrderEntry

type OrderEntry struct {
	Group []BuildPackMetadata `toml:"group" json:"group"`
}

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
Package registry provides utilities to search buildpacks using registry API
Package registry provides utilities to search buildpacks using registry API

Jump to

Keyboard shortcuts

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