Documentation
¶
Index ¶
- func NewMockOCIService(opts ...MockOCIServiceOption) oci.Service
- func NewMockRegistryAPIClient(opts ...MockRegistryAPIClientOption) registryapi.Client
- type MockImage
- func (m *MockImage) ConfigFile() (*v1.ConfigFile, error)
- func (m *MockImage) ConfigName() (v1.Hash, error)
- func (m *MockImage) Digest() (v1.Hash, error)
- func (m *MockImage) LayerByDiffID(v1.Hash) (v1.Layer, error)
- func (m *MockImage) LayerByDigest(v1.Hash) (v1.Layer, error)
- func (m *MockImage) Layers() ([]v1.Layer, error)
- func (m *MockImage) Manifest() (*v1.Manifest, error)
- func (m *MockImage) MediaType() (types.MediaType, error)
- func (m *MockImage) RawConfigFile() ([]byte, error)
- func (m *MockImage) RawManifest() ([]byte, error)
- func (m *MockImage) Size() (int64, error)
- type MockOCIServiceOption
- type MockOCIServiceOptions
- type MockRegistryAPIClientOption
- type MockRegistryAPIClientOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockOCIService ¶
func NewMockOCIService(opts ...MockOCIServiceOption) oci.Service
func NewMockRegistryAPIClient ¶
func NewMockRegistryAPIClient(opts ...MockRegistryAPIClientOption) registryapi.Client
Types ¶
type MockImage ¶ added in v0.28.0
MockImage is a minimal implementation of v1.Image for testing
func (*MockImage) ConfigFile ¶ added in v0.28.0
func (m *MockImage) ConfigFile() (*v1.ConfigFile, error)
func (*MockImage) LayerByDiffID ¶ added in v0.28.0
func (*MockImage) LayerByDigest ¶ added in v0.28.0
func (*MockImage) RawConfigFile ¶ added in v0.28.0
func (*MockImage) RawManifest ¶ added in v0.28.0
type MockOCIServiceOption ¶
type MockOCIServiceOption func(*MockOCIServiceOptions)
func WithLocalImages ¶ added in v0.28.0
func WithLocalImages(localImages []MockImage) MockOCIServiceOption
func WithRemoteImages ¶ added in v0.28.0
func WithRemoteImages(remoteImages []MockImage) MockOCIServiceOption
WithRemoteImages marks specific images as remote-only (GetLocalImage will return "no such image" error)
type MockOCIServiceOptions ¶
type MockOCIServiceOptions struct {
// contains filtered or unexported fields
}
type MockRegistryAPIClientOption ¶
type MockRegistryAPIClientOption func(*MockRegistryAPIClientOptions)
func WithServerListResponses ¶
func WithServerListResponses(serverListResponses map[string]v0.ServerListResponse) MockRegistryAPIClientOption
func WithServerResponses ¶
func WithServerResponses(serverResponses map[string]v0.ServerResponse) MockRegistryAPIClientOption
type MockRegistryAPIClientOptions ¶
type MockRegistryAPIClientOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.