fakes

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 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)

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(_ authn.Keychain, image v1.Image, dest string) (string, error)

func (*Relocator) SetSkip

func (r *Relocator) SetSkip(skip bool)

func (*Relocator) SetWriter

func (r *Relocator) SetWriter(writer io.Writer)

type SourceUploader

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

func NewSourceUploader

func NewSourceUploader(imageRef string) *SourceUploader

func (*SourceUploader) SetImageRef

func (f *SourceUploader) SetImageRef(ref string)

func (*SourceUploader) SetSkipUpload

func (f *SourceUploader) SetSkipUpload(skip bool)

func (*SourceUploader) Upload

func (f *SourceUploader) Upload(_, _ string, writer io.Writer, _ registry.TLSConfig) (string, error)

type StackInfo

type StackInfo struct {
	StackID  string
	BuildImg ImageInfo
	RunImg   ImageInfo
}

type UtilProvider

type UtilProvider struct {
	FakeFetcher        registry.Fetcher
	FakeRelocator      *Relocator
	FakeSourceUploader registry.SourceUploader
}

func (UtilProvider) Fetcher

func (UtilProvider) Relocator

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

func (UtilProvider) SourceUploader

func (u UtilProvider) SourceUploader(_ bool) registry.SourceUploader

Jump to

Keyboard shortcuts

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