stub

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegistryClientStub

func NewRegistryClientStub() pkg.RegistryClient

NewRegistryClientStub creates a new stub registry client

Types

type ImageData

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

ImageData holds data for a specific image

type ImageMetaStub

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

ImageMetaStub provides a simple stub implementation of ImageMeta

func (*ImageMetaStub) GetDigest

func (i *ImageMetaStub) GetDigest() *v1.Hash

func (*ImageMetaStub) GetDigestReference

func (i *ImageMetaStub) GetDigestReference() string

func (*ImageMetaStub) GetTagReference

func (i *ImageMetaStub) GetTagReference() string

type RegistryClientStub

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

RegistryClientStub provides a stub implementation of RegistryClient for testing

func (*RegistryClientStub) CheckImageExists

func (s *RegistryClientStub) CheckImageExists(_ context.Context, tag string) error

CheckImageExists checks if a specific image exists

func (*RegistryClientStub) GetDigest

func (s *RegistryClientStub) GetDigest(_ context.Context, tag string) (*v1.Hash, error)

GetDigest retrieves the digest for a specific image tag

func (*RegistryClientStub) GetImage

GetImage retrieves an image for a specific reference

func (*RegistryClientStub) GetImageConfig

func (s *RegistryClientStub) GetImageConfig(_ context.Context, tag string) (*v1.ConfigFile, error)

GetImageConfig retrieves the image config file

func (*RegistryClientStub) GetManifest

func (s *RegistryClientStub) GetManifest(_ context.Context, tag string) ([]byte, error)

GetManifest retrieves the manifest for a specific image tag

func (*RegistryClientStub) GetRegistry

func (s *RegistryClientStub) GetRegistry() string

GetRegistry returns the full registry path

func (*RegistryClientStub) ListRepositories

func (s *RegistryClientStub) ListRepositories(_ context.Context) ([]string, error)

ListRepositories retrieves all sub-repositories

func (*RegistryClientStub) ListTags

func (s *RegistryClientStub) ListTags(_ context.Context) ([]string, error)

ListTags retrieves all available tags

func (*RegistryClientStub) PushImage

func (s *RegistryClientStub) PushImage(_ context.Context, _ string, _ v1.Image) error

PushImage pushes an image to the registry

func (*RegistryClientStub) WithSegment

func (s *RegistryClientStub) WithSegment(segments ...string) pkg.RegistryClient

WithSegment creates a new client with an additional scope path segment

type RegistryData

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

RegistryData holds data for a specific registry

type RegistryImageStub

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

RegistryImageStub provides a simple stub implementation of RegistryImage

func (*RegistryImageStub) ConfigFile

func (r *RegistryImageStub) ConfigFile() (*v1.ConfigFile, error)

ConfigFile implements v1.Image

func (*RegistryImageStub) ConfigName

func (r *RegistryImageStub) ConfigName() (v1.Hash, error)

ConfigName implements v1.Image

func (*RegistryImageStub) Digest

func (r *RegistryImageStub) Digest() (v1.Hash, error)

Digest implements v1.Image

func (*RegistryImageStub) Extract

func (r *RegistryImageStub) Extract() io.ReadCloser

Extract implements RegistryImage

func (*RegistryImageStub) GetMetadata

func (r *RegistryImageStub) GetMetadata() (pkg.ImageMeta, error)

GetMetadata implements RegistryImage

func (*RegistryImageStub) LayerByDiffID

func (r *RegistryImageStub) LayerByDiffID(_ v1.Hash) (v1.Layer, error)

LayerByDiffID implements v1.Image

func (*RegistryImageStub) LayerByDigest

func (r *RegistryImageStub) LayerByDigest(_ v1.Hash) (v1.Layer, error)

LayerByDigest implements v1.Image

func (*RegistryImageStub) Layers

func (r *RegistryImageStub) Layers() ([]v1.Layer, error)

Layers implements v1.Image

func (*RegistryImageStub) Manifest

func (r *RegistryImageStub) Manifest() (*v1.Manifest, error)

Manifest implements v1.Image

func (*RegistryImageStub) MediaType

func (r *RegistryImageStub) MediaType() (types.MediaType, error)

MediaType implements v1.Image

func (*RegistryImageStub) RawConfigFile

func (r *RegistryImageStub) RawConfigFile() ([]byte, error)

RawConfigFile implements v1.Image

func (*RegistryImageStub) RawManifest

func (r *RegistryImageStub) RawManifest() ([]byte, error)

RawManifest implements v1.Image

func (*RegistryImageStub) SetMetadata

func (r *RegistryImageStub) SetMetadata(_ pkg.ImageMeta)

func (*RegistryImageStub) Size

func (r *RegistryImageStub) Size() (int64, error)

Size implements v1.Image

type RepositoryData

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

RepositoryData holds data for a specific repository

type StubLayer

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

StubLayer provides a simple stub implementation of v1.Layer

func (*StubLayer) Compressed

func (l *StubLayer) Compressed() (io.ReadCloser, error)

Compressed implements v1.Layer

func (*StubLayer) DiffID

func (l *StubLayer) DiffID() (v1.Hash, error)

DiffID implements v1.Layer

func (*StubLayer) Digest

func (l *StubLayer) Digest() (v1.Hash, error)

Digest implements v1.Layer

func (*StubLayer) MediaType

func (l *StubLayer) MediaType() (types.MediaType, error)

MediaType implements v1.Layer

func (*StubLayer) Size

func (l *StubLayer) Size() (int64, error)

Size implements v1.Layer

func (*StubLayer) Uncompressed

func (l *StubLayer) Uncompressed() (io.ReadCloser, error)

Uncompressed implements v1.Layer

Jump to

Keyboard shortcuts

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