Debian Codegraph @

internal/testing/mocks/image_source.go

raw
1 package mocks
2
3 import (
4 "context"
5 "io"
6
7 "github.com/opencontainers/go-digest"
8 "go.podman.io/image/v5/types"
9 )
10
11 // ForbiddenImageSource is used when we don't expect the ImageSource to be used in our tests.
12 type ForbiddenImageSource struct{}
13
14 // Reference is a mock that panics.
15 func (f ForbiddenImageSource) Reference() types.ImageReference {
16 panic("Unexpected call to a mock function")
17 }
18
19 // Close is a mock that panics.
20 func (f ForbiddenImageSource) Close() error {
21 panic("Unexpected call to a mock function")
22 }
23
24 // GetManifest is a mock that panics.
25 func (f ForbiddenImageSource) GetManifest(context.Context, *digest.Digest) ([]byte, string, error) {
26 panic("Unexpected call to a mock function")
27 }
28
29 // GetBlob is a mock that panics.
30 func (f ForbiddenImageSource) GetBlob(context.Context, types.BlobInfo, types.BlobInfoCache) (io.ReadCloser, int64, error) {
31 panic("Unexpected call to a mock function")
32 }
33
34 // HasThreadSafeGetBlob is a mock that panics.
35 func (f ForbiddenImageSource) HasThreadSafeGetBlob() bool {
36 panic("Unexpected call to a mock function")
37 }
38
39 // GetSignatures is a mock that panics.
40 func (f ForbiddenImageSource) GetSignatures(context.Context, *digest.Digest) ([][]byte, error) {
41 panic("Unexpected call to a mock function")
42 }
43
44 // LayerInfosForCopy is a mock that panics.
45 func (f ForbiddenImageSource) LayerInfosForCopy(context.Context, *digest.Digest) ([]types.BlobInfo, error) {
46 panic("Unexpected call to a mock function")
47 }