fakes

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildpackImgInfo

type BuildpackImgInfo struct {
	Id string
	ImageInfo
}

type FakeImage

type FakeImage struct {
	// contains filtered or unexported fields
}

func NewFakeImage

func NewFakeImage(digest string) FakeImage

func NewFakeLabeledImage

func NewFakeLabeledImage(label, labelValue, digest string) FakeImage

func (FakeImage) ConfigFile

func (f FakeImage) ConfigFile() (*v1.ConfigFile, error)

func (FakeImage) ConfigName

func (f FakeImage) ConfigName() (v1.Hash, error)

func (FakeImage) Digest

func (f FakeImage) Digest() (v1.Hash, error)

func (FakeImage) LayerByDiffID

func (f FakeImage) LayerByDiffID(v1.Hash) (v1.Layer, error)

func (FakeImage) LayerByDigest

func (f FakeImage) LayerByDigest(v1.Hash) (v1.Layer, error)

func (FakeImage) Layers

func (f FakeImage) Layers() ([]v1.Layer, error)

func (FakeImage) Manifest

func (f FakeImage) Manifest() (*v1.Manifest, error)

func (FakeImage) MediaType

func (f FakeImage) MediaType() (types.MediaType, error)

func (FakeImage) RawConfigFile

func (f FakeImage) RawConfigFile() ([]byte, error)

func (FakeImage) RawManifest

func (f FakeImage) RawManifest() ([]byte, error)

func (FakeImage) Size

func (f FakeImage) Size() (int64, error)

type Fetcher

type Fetcher struct {
	// contains filtered or unexported fields
}

func NewBuildpackImagesFetcher

func NewBuildpackImagesFetcher(i ...BuildpackImgInfo) *Fetcher

func NewLifecycleImageFetcher

func NewLifecycleImageFetcher(i ...LifecycleInfo) *Fetcher

func NewStackImagesFetcher

func NewStackImagesFetcher(i ...StackInfo) *Fetcher

func (*Fetcher) AddBuildpackImages

func (f *Fetcher) AddBuildpackImages(infos ...BuildpackImgInfo)

func (*Fetcher) AddImage

func (f *Fetcher) AddImage(identifier string, image v1.Image)

func (*Fetcher) AddLifecycleImages

func (f *Fetcher) AddLifecycleImages(infos ...LifecycleInfo)

func (*Fetcher) AddStackImages

func (f *Fetcher) AddStackImages(infos ...StackInfo)

func (*Fetcher) CallCount

func (f *Fetcher) CallCount() int

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(_ authn.Keychain, src string) (v1.Image, error)

func (*Fetcher) SetError added in v0.5.0

func (f *Fetcher) SetError(err error)

type ImageInfo

type ImageInfo struct {
	Ref    string
	Digest string
}

type LifecycleInfo

type LifecycleInfo struct {
	Metadata string
	ImageInfo
}

type Relocator

type Relocator struct {
	// contains filtered or unexported fields
}

func (*Relocator) CallCount

func (r *Relocator) CallCount() int

func (*Relocator) Relocate

func (r *Relocator) Relocate(keychain authn.Keychain, image v1.Image, dest string) (string, error)

func (*Relocator) RelocateCall added in v0.3.1

func (r *Relocator) RelocateCall(i int) (authn.Keychain, v1.Image, string)

func (*Relocator) SetSkip

func (r *Relocator) SetSkip(skip bool)

type SourceUploader

type SourceUploader struct {
	// contains filtered or unexported fields
}

func NewFakeSourceUploader added in v0.3.1

func NewFakeSourceUploader(writer io.Writer, changeState bool) *SourceUploader

func (*SourceUploader) Upload

func (f *SourceUploader) Upload(keychain authn.Keychain, dstImgRefStr, srcPath string) (string, error)

type StackInfo

type StackInfo struct {
	StackID  string
	BuildImg ImageInfo
	RunImg   ImageInfo
}

type UtilProvider

type UtilProvider struct {
	FakeFetcher registry.Fetcher
}

func (UtilProvider) Fetcher

func (UtilProvider) Relocator

func (u UtilProvider) Relocator(writer io.Writer, _ registry.TLSConfig, changeState bool) registry.Relocator

func (UtilProvider) SourceUploader

func (u UtilProvider) SourceUploader(writer io.Writer, tlsConfig registry.TLSConfig, changeState bool) registry.SourceUploader

Jump to

Keyboard shortcuts

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