cnbutils

package
v1.167.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 15 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

This section is empty.

Types

type BuildPackMetadata

type BuildPackMetadata struct {
	ID          string    `json:"id,omitempty"`
	Name        string    `json:"name,omitempty"`
	Version     string    `json:"version,omitempty"`
	Description string    `json:"description,omitempty"`
	Homepage    string    `json:"homepage,omitempty"`
	Keywords    []string  `json:"keywords,omitempty"`
	Licenses    []License `json:"licenses,omitempty"`
}

type BuildUtils

type BuildUtils interface {
	command.ExecRunner
	piperutils.FileUtils
	docker.Download
}

type BuildpackRef

type BuildpackRef struct {
	ID       string `toml:"id"`
	Version  string `toml:"version"`
	Optional bool   `toml:"optional,omitempty" json:"optional,omitempty" yaml:"optional,omitempty"`
}

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 `json:"type"`
	URI  string `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, utils BuildUtils) (Order, error)

func (Order) Save

func (o Order) Save(path string) error

type OrderEntry

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

Jump to

Keyboard shortcuts

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