Documentation ¶
Index ¶
- func CreateBuildpackTar(t *testing.T, tmpDir string, descriptor dist.BuildpackDescriptor) string
- func CreateExtensionTar(t *testing.T, tmpDir string, descriptor dist.ExtensionDescriptor) string
- func NewFakeBuilderImage(t *testing.T, tmpDir, name string, stackID, uid, gid string, ...) *fakes.Image
- func NewFakeBuildpack(descriptor dist.BuildpackDescriptor, chmod int64, ...) (buildpack.BuildModule, error)
- func NewFakeBuildpackBlob(descriptor buildpack.Descriptor, chmod int64) (blob.Blob, error)
- func NewFakeExtension(descriptor dist.ExtensionDescriptor, chmod int64, ...) (buildpack.BuildModule, error)
- func NewFakeExtensionBlob(descriptor buildpack.Descriptor, chmod int64) (blob.Blob, error)
- type FakeBuildpackOption
- type FakeExtensionOption
- type FakeImageCreator
- type FakeImageFetcher
- type FakeLifecycle
- type FetchArgs
- type Package
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBuildpackTar ¶ added in v0.12.0
func CreateExtensionTar ¶ added in v0.30.0
func NewFakeBuilderImage ¶
func NewFakeBuildpack ¶
func NewFakeBuildpack(descriptor dist.BuildpackDescriptor, chmod int64, options ...FakeBuildpackOption) (buildpack.BuildModule, error)
NewFakeBuildpack creates a fake buildpack with contents:
\_ /cnb/buildpacks/{ID} \_ /cnb/buildpacks/{ID}/{version} \_ /cnb/buildpacks/{ID}/{version}/buildpack.toml \_ /cnb/buildpacks/{ID}/{version}/bin \_ /cnb/buildpacks/{ID}/{version}/bin/build build-contents \_ /cnb/buildpacks/{ID}/{version}/bin/detect detect-contents
func NewFakeBuildpackBlob ¶
NewFakeBuildpackBlob creates a fake blob with contents:
\_ buildpack.toml \_ bin \_ bin/build build-contents \_ bin/detect detect-contents
func NewFakeExtension ¶ added in v0.28.0
func NewFakeExtension(descriptor dist.ExtensionDescriptor, chmod int64, options ...FakeExtensionOption) (buildpack.BuildModule, error)
NewFakeExtension creates a fake extension with contents:
\_ /cnb/extensions/{ID} \_ /cnb/extensions/{ID}/{version} \_ /cnb/extensions/{ID}/{version}/extension.toml \_ /cnb/extensions/{ID}/{version}/bin \_ /cnb/extensions/{ID}/{version}/bin/generate generate-contents \_ /cnb/extensions/{ID}/{version}/bin/detect detect-contents
func NewFakeExtensionBlob ¶ added in v0.30.0
Types ¶
type FakeBuildpackOption ¶ added in v0.18.1
type FakeBuildpackOption func(*fakeBuildpackConfig)
func WithBpOpenError ¶ added in v0.28.0
func WithBpOpenError(err error) FakeBuildpackOption
func WithExtraBuildpackContents ¶ added in v0.18.1
func WithExtraBuildpackContents(filename, contents string) FakeBuildpackOption
type FakeExtensionOption ¶ added in v0.28.0
type FakeExtensionOption func(*fakeExtensionConfig)
func WithExtOpenError ¶ added in v0.28.0
func WithExtOpenError(err error) FakeExtensionOption
func WithExtraExtensionContents ¶ added in v0.28.0
func WithExtraExtensionContents(filename, contents string) FakeExtensionOption
type FakeImageCreator ¶ added in v0.14.0
type FakeImageFetcher ¶
type FakeImageFetcher struct { LocalImages map[string]imgutil.Image RemoteImages map[string]imgutil.Image FetchCalls map[string]*FetchArgs }
func NewFakeImageFetcher ¶
func NewFakeImageFetcher() *FakeImageFetcher
func (*FakeImageFetcher) CheckReadAccess ¶ added in v0.34.0
func (f *FakeImageFetcher) CheckReadAccess(_ string, _ image.FetchOptions) bool
type FakeLifecycle ¶
type FakeLifecycle struct {
Opts build.LifecycleOptions
}
func (*FakeLifecycle) Execute ¶
func (f *FakeLifecycle) Execute(ctx context.Context, opts build.LifecycleOptions) error
type FetchArgs ¶
type FetchArgs struct { Daemon bool PullPolicy image.PullPolicy LayoutOption image.LayoutOption Target *dist.Target }
type Package ¶
type Package interface { Name() string BuildpackLayers() dist.ModuleLayers GetLayer(diffID string) (io.ReadCloser, error) }
func NewPackage ¶
Click to show internal directories.
Click to hide internal directories.