mocks

package
v5.30.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForbiddenImageReference added in v5.22.0

type ForbiddenImageReference struct{}

ForbiddenImageReference is used when we don’t expect the ImageReference to be used in our tests.

func (ForbiddenImageReference) DeleteImage added in v5.22.0

func (ref ForbiddenImageReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error

DeleteImage is a mock that panics.

func (ForbiddenImageReference) DockerReference added in v5.22.0

func (ref ForbiddenImageReference) DockerReference() reference.Named

DockerReference is a mock that panics.

func (ForbiddenImageReference) NewImage added in v5.22.0

NewImage is a mock that panics.

func (ForbiddenImageReference) NewImageDestination added in v5.22.0

func (ref ForbiddenImageReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error)

NewImageDestination is a mock that panics.

func (ForbiddenImageReference) NewImageSource added in v5.22.0

NewImageSource is a mock that panics.

func (ForbiddenImageReference) PolicyConfigurationIdentity added in v5.22.0

func (ref ForbiddenImageReference) PolicyConfigurationIdentity() string

PolicyConfigurationIdentity is a mock that panics.

func (ForbiddenImageReference) PolicyConfigurationNamespaces added in v5.22.0

func (ref ForbiddenImageReference) PolicyConfigurationNamespaces() []string

PolicyConfigurationNamespaces is a mock that panics.

func (ForbiddenImageReference) StringWithinTransport added in v5.22.0

func (ref ForbiddenImageReference) StringWithinTransport() string

StringWithinTransport is a mock that panics.

func (ForbiddenImageReference) Transport added in v5.22.0

Transport is a mock that panics.

type ForbiddenImageSource added in v5.22.0

type ForbiddenImageSource struct{}

ForbiddenImageSource is used when we don't expect the ImageSource to be used in our tests.

func (ForbiddenImageSource) Close added in v5.22.0

func (f ForbiddenImageSource) Close() error

Close is a mock that panics.

func (ForbiddenImageSource) GetBlob added in v5.22.0

GetBlob is a mock that panics.

func (ForbiddenImageSource) GetManifest added in v5.22.0

func (f ForbiddenImageSource) GetManifest(context.Context, *digest.Digest) ([]byte, string, error)

GetManifest is a mock that panics.

func (ForbiddenImageSource) GetSignatures added in v5.22.0

func (f ForbiddenImageSource) GetSignatures(context.Context, *digest.Digest) ([][]byte, error)

GetSignatures is a mock that panics.

func (ForbiddenImageSource) HasThreadSafeGetBlob added in v5.22.0

func (f ForbiddenImageSource) HasThreadSafeGetBlob() bool

HasThreadSafeGetBlob is a mock that panics.

func (ForbiddenImageSource) LayerInfosForCopy added in v5.22.0

func (f ForbiddenImageSource) LayerInfosForCopy(context.Context, *digest.Digest) ([]types.BlobInfo, error)

LayerInfosForCopy is a mock that panics.

func (ForbiddenImageSource) Reference added in v5.22.0

Reference is a mock that panics.

type ForbiddenUnparsedImage added in v5.22.0

type ForbiddenUnparsedImage struct{}

ForbiddenUnparsedImage is used when we don't expect the UnparsedImage to be used in our tests.

func (ForbiddenUnparsedImage) Manifest added in v5.22.0

func (ref ForbiddenUnparsedImage) Manifest(ctx context.Context) ([]byte, string, error)

Manifest is a mock that panics.

func (ForbiddenUnparsedImage) Reference added in v5.22.0

Reference is a mock that panics.

func (ForbiddenUnparsedImage) Signatures added in v5.22.0

func (ref ForbiddenUnparsedImage) Signatures(context.Context) ([][]byte, error)

Signatures is a mock that panics.

func (ForbiddenUnparsedImage) UntrustedSignatures added in v5.22.0

func (ref ForbiddenUnparsedImage) UntrustedSignatures(ctx context.Context) ([]signature.Signature, error)

UntrustedSignatures is a mock that panics.

type NameImageTransport

type NameImageTransport string

NameImageTransport is a mock of types.ImageTransport which returns itself in Name.

func (NameImageTransport) Name

func (name NameImageTransport) Name() string

Name returns the name of the transport, which must be unique among other transports.

func (NameImageTransport) ParseReference

func (name NameImageTransport) ParseReference(reference string) (types.ImageReference, error)

ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.

func (NameImageTransport) ValidatePolicyConfigurationScope

func (name NameImageTransport) ValidatePolicyConfigurationScope(scope string) error

ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value). It is acceptable to allow an invalid value which will never be matched, it can "only" cause user confusion. scope passed to this function will not be "", that value is always allowed.

Jump to

Keyboard shortcuts

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