| 1 |
package mocks |
| 2 |
|
| 3 |
import "go.podman.io/image/v5/types" |
| 4 |
|
| 5 |
// NameImageTransport is a mock of types.ImageTransport which returns itself in Name. |
| 6 |
type NameImageTransport string |
| 7 |
|
| 8 |
// Name returns the name of the transport, which must be unique among other transports. |
| 9 |
func (name NameImageTransport) Name() string { |
| 10 |
return string(name) |
| 11 |
} |
| 12 |
|
| 13 |
// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference. |
| 14 |
func (name NameImageTransport) ParseReference(reference string) (types.ImageReference, error) { |
| 15 |
panic("unexpected call to a mock function") |
| 16 |
} |
| 17 |
|
| 18 |
// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys |
| 19 |
// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value). |
| 20 |
// It is acceptable to allow an invalid value which will never be matched, it can "only" cause user confusion. |
| 21 |
// scope passed to this function will not be "", that value is always allowed. |
| 22 |
func (name NameImageTransport) ValidatePolicyConfigurationScope(scope string) error { |
| 23 |
panic("unexpected call to a mock function") |
| 24 |
} |