Documentation
¶
Index ¶
- func NewRegistryClientStub() pkg.RegistryClient
- type ImageData
- type ImageMetaStub
- type RegistryClientStub
- func (s *RegistryClientStub) CheckImageExists(_ context.Context, tag string) error
- func (s *RegistryClientStub) GetDigest(_ context.Context, tag string) (*v1.Hash, error)
- func (s *RegistryClientStub) GetImage(_ context.Context, tag string, _ ...pkg.ImageGetOption) (pkg.ClientImage, error)
- func (s *RegistryClientStub) GetImageConfig(_ context.Context, tag string) (*v1.ConfigFile, error)
- func (s *RegistryClientStub) GetManifest(_ context.Context, tag string) ([]byte, error)
- func (s *RegistryClientStub) GetRegistry() string
- func (s *RegistryClientStub) ListRepositories(_ context.Context) ([]string, error)
- func (s *RegistryClientStub) ListTags(_ context.Context) ([]string, error)
- func (s *RegistryClientStub) PushImage(_ context.Context, _ string, _ v1.Image) error
- func (s *RegistryClientStub) WithSegment(segments ...string) pkg.RegistryClient
- type RegistryData
- type RegistryImageStub
- func (r *RegistryImageStub) ConfigFile() (*v1.ConfigFile, error)
- func (r *RegistryImageStub) ConfigName() (v1.Hash, error)
- func (r *RegistryImageStub) Digest() (v1.Hash, error)
- func (r *RegistryImageStub) Extract() io.ReadCloser
- func (r *RegistryImageStub) GetMetadata() (pkg.ImageMeta, error)
- func (r *RegistryImageStub) LayerByDiffID(_ v1.Hash) (v1.Layer, error)
- func (r *RegistryImageStub) LayerByDigest(_ v1.Hash) (v1.Layer, error)
- func (r *RegistryImageStub) Layers() ([]v1.Layer, error)
- func (r *RegistryImageStub) Manifest() (*v1.Manifest, error)
- func (r *RegistryImageStub) MediaType() (types.MediaType, error)
- func (r *RegistryImageStub) RawConfigFile() ([]byte, error)
- func (r *RegistryImageStub) RawManifest() ([]byte, error)
- func (r *RegistryImageStub) SetMetadata(_ pkg.ImageMeta)
- func (r *RegistryImageStub) Size() (int64, error)
- type RepositoryData
- type StubLayer
- func (l *StubLayer) Compressed() (io.ReadCloser, error)
- func (l *StubLayer) DiffID() (v1.Hash, error)
- func (l *StubLayer) Digest() (v1.Hash, error)
- func (l *StubLayer) MediaType() (types.MediaType, error)
- func (l *StubLayer) Size() (int64, error)
- func (l *StubLayer) Uncompressed() (io.ReadCloser, error)
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) GetImage ¶
func (s *RegistryClientStub) GetImage(_ context.Context, tag string, _ ...pkg.ImageGetOption) (pkg.ClientImage, error)
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 ¶
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) 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 ¶
LayerByDiffID implements v1.Image
func (*RegistryImageStub) LayerByDigest ¶
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) Uncompressed ¶
func (l *StubLayer) Uncompressed() (io.ReadCloser, error)
Uncompressed implements v1.Layer