Documentation ¶
Index ¶
- type FileInfoMock
- type FileWriterMock
- type MockedImageStore
- func (is MockedImageStore) BlobPath(repo string, digest digest.Digest) string
- func (is MockedImageStore) BlobUploadInfo(repo string, uuid string) (int64, error)
- func (is MockedImageStore) BlobUploadPath(repo string, uuid string) string
- func (is MockedImageStore) CheckBlob(repo string, digest string) (bool, int64, error)
- func (is MockedImageStore) DedupeBlob(src string, dstDigest digest.Digest, dst string) error
- func (is MockedImageStore) DeleteBlob(repo string, digest string) error
- func (is MockedImageStore) DeleteBlobUpload(repo string, digest string) error
- func (is MockedImageStore) DeleteImageManifest(name string, reference string) error
- func (is MockedImageStore) DirExists(d string) bool
- func (is MockedImageStore) FinishBlobUpload(repo string, uuid string, body io.Reader, digest string) error
- func (is MockedImageStore) FullBlobUpload(repo string, body io.Reader, digest string) (string, int64, error)
- func (is MockedImageStore) GetBlob(repo string, digest string, mediaType string) (io.ReadCloser, int64, error)
- func (is MockedImageStore) GetBlobContent(repo string, digest string) ([]byte, error)
- func (is MockedImageStore) GetBlobUpload(repo string, uuid string) (int64, error)
- func (is MockedImageStore) GetImageManifest(repo string, reference string) ([]byte, string, string, error)
- func (is MockedImageStore) GetImageTags(name string) ([]string, error)
- func (is MockedImageStore) GetIndexContent(repo string) ([]byte, error)
- func (is MockedImageStore) GetReferrers(repo string, digest string, mediaType string) ([]artifactspec.Descriptor, error)
- func (is MockedImageStore) GetRepositories() ([]string, error)
- func (is MockedImageStore) InitRepo(name string) error
- func (is MockedImageStore) Lock(t *time.Time)
- func (is MockedImageStore) NewBlobUpload(repo string) (string, error)
- func (is MockedImageStore) PutBlobChunk(repo string, uuid string, from int64, to int64, body io.Reader) (int64, error)
- func (is MockedImageStore) PutBlobChunkStreamed(repo string, uuid string, body io.Reader) (int64, error)
- func (is MockedImageStore) PutImageManifest(repo string, reference string, mediaType string, body []byte) (string, error)
- func (is MockedImageStore) RLock(t *time.Time)
- func (is MockedImageStore) RUnlock(t *time.Time)
- func (is MockedImageStore) RootDir() string
- func (is MockedImageStore) RunGCRepo(repo string)
- func (is MockedImageStore) URLForPath(path string) (string, error)
- func (is MockedImageStore) Unlock(t *time.Time)
- func (is MockedImageStore) ValidateRepo(name string) (bool, error)
- type MockedLint
- type OciLayoutUtilsMock
- func (olum OciLayoutUtilsMock) CheckManifestSignature(name string, digest godigest.Digest) bool
- func (olum OciLayoutUtilsMock) GetExpandedRepoInfo(name string) (common.RepoInfo, error)
- func (olum OciLayoutUtilsMock) GetImageBlobManifest(imageDir string, digest godigest.Digest) (v1.Manifest, error)
- func (olum OciLayoutUtilsMock) GetImageConfigInfo(repo string, manifestDigest godigest.Digest) (ispec.Image, error)
- func (olum OciLayoutUtilsMock) GetImageConfigSize(repo string, manifestDigest godigest.Digest) int64
- func (olum OciLayoutUtilsMock) GetImageInfo(imageDir string, hash v1.Hash) (ispec.Image, error)
- func (olum OciLayoutUtilsMock) GetImageLastUpdated(imageInfo ispec.Image) time.Time
- func (olum OciLayoutUtilsMock) GetImageManifestSize(repo string, manifestDigest godigest.Digest) int64
- func (olum OciLayoutUtilsMock) GetImageManifests(image string) ([]ispec.Descriptor, error)
- func (olum OciLayoutUtilsMock) GetImagePlatform(imageInfo ispec.Image) (string, string)
- func (olum OciLayoutUtilsMock) GetImageTagsWithTimestamp(repo string) ([]common.TagInfo, error)
- func (olum OciLayoutUtilsMock) GetImageVendor(imageInfo ispec.Image) string
- func (olum OciLayoutUtilsMock) GetRepoLastUpdated(repo string) (common.TagInfo, error)
- func (olum OciLayoutUtilsMock) IsValidImageFormat(image string) (bool, error)
- type StorageDriverMock
- func (s *StorageDriverMock) Delete(ctx context.Context, path string) error
- func (s *StorageDriverMock) GetContent(ctx context.Context, path string) ([]byte, error)
- func (s *StorageDriverMock) List(ctx context.Context, path string) ([]string, error)
- func (s *StorageDriverMock) Move(ctx context.Context, sourcePath, destPath string) error
- func (s *StorageDriverMock) Name() string
- func (s *StorageDriverMock) PutContent(ctx context.Context, path string, content []byte) error
- func (s *StorageDriverMock) Reader(ctx context.Context, path string, offset int64) (io.ReadCloser, error)
- func (s *StorageDriverMock) Stat(ctx context.Context, path string) (driver.FileInfo, error)
- func (s *StorageDriverMock) URLFor(ctx context.Context, path string, options map[string]interface{}) (string, error)
- func (s *StorageDriverMock) Walk(ctx context.Context, path string, f driver.WalkFn) error
- func (s *StorageDriverMock) Writer(ctx context.Context, path string, isAppend bool) (driver.FileWriter, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileInfoMock ¶
func (*FileInfoMock) IsDir ¶
func (f *FileInfoMock) IsDir() bool
func (*FileInfoMock) ModTime ¶
func (f *FileInfoMock) ModTime() time.Time
func (*FileInfoMock) Path ¶
func (f *FileInfoMock) Path() string
func (*FileInfoMock) Size ¶
func (f *FileInfoMock) Size() int64
type FileWriterMock ¶
type FileWriterMock struct { WriteFn func([]byte) (int, error) CancelFn func() error CommitFn func() error CloseFn func() error }
func (*FileWriterMock) Cancel ¶
func (f *FileWriterMock) Cancel() error
func (*FileWriterMock) Close ¶
func (f *FileWriterMock) Close() error
func (*FileWriterMock) Commit ¶
func (f *FileWriterMock) Commit() error
func (*FileWriterMock) Size ¶
func (f *FileWriterMock) Size() int64
type MockedImageStore ¶
type MockedImageStore struct { DirExistsFn func(d string) bool RootDirFn func() string InitRepoFn func(name string) error ValidateRepoFn func(name string) (bool, error) GetRepositoriesFn func() ([]string, error) GetImageTagsFn func(repo string) ([]string, error) GetImageManifestFn func(repo string, reference string) ([]byte, string, string, error) PutImageManifestFn func(repo string, reference string, mediaType string, body []byte) (string, error) DeleteImageManifestFn func(repo string, reference string) error BlobUploadPathFn func(repo string, uuid string) string NewBlobUploadFn func(repo string) (string, error) GetBlobUploadFn func(repo string, uuid string) (int64, error) BlobUploadInfoFn func(repo string, uuid string) (int64, error) PutBlobChunkStreamedFn func(repo string, uuid string, body io.Reader) (int64, error) PutBlobChunkFn func(repo string, uuid string, from int64, to int64, body io.Reader) (int64, error) FinishBlobUploadFn func(repo string, uuid string, body io.Reader, digest string) error FullBlobUploadFn func(repo string, body io.Reader, digest string) (string, int64, error) DedupeBlobFn func(src string, dstDigest digest.Digest, dst string) error DeleteBlobUploadFn func(repo string, uuid string) error BlobPathFn func(repo string, digest digest.Digest) string CheckBlobFn func(repo string, digest string) (bool, int64, error) GetBlobFn func(repo string, digest string, mediaType string) (io.ReadCloser, int64, error) DeleteBlobFn func(repo string, digest string) error GetIndexContentFn func(repo string) ([]byte, error) GetBlobContentFn func(repo, digest string) ([]byte, error) GetReferrersFn func(repo, digest string, mediaType string) ([]artifactspec.Descriptor, error) URLForPathFn func(path string) (string, error) RunGCRepoFn func(repo string) }
func (MockedImageStore) BlobPath ¶
func (is MockedImageStore) BlobPath(repo string, digest digest.Digest) string
func (MockedImageStore) BlobUploadInfo ¶
func (is MockedImageStore) BlobUploadInfo(repo string, uuid string) (int64, error)
func (MockedImageStore) BlobUploadPath ¶
func (is MockedImageStore) BlobUploadPath(repo string, uuid string) string
func (MockedImageStore) DedupeBlob ¶
func (is MockedImageStore) DedupeBlob(src string, dstDigest digest.Digest, dst string) error
func (MockedImageStore) DeleteBlob ¶
func (is MockedImageStore) DeleteBlob(repo string, digest string) error
func (MockedImageStore) DeleteBlobUpload ¶
func (is MockedImageStore) DeleteBlobUpload(repo string, digest string) error
func (MockedImageStore) DeleteImageManifest ¶
func (is MockedImageStore) DeleteImageManifest(name string, reference string) error
func (MockedImageStore) DirExists ¶
func (is MockedImageStore) DirExists(d string) bool
func (MockedImageStore) FinishBlobUpload ¶
func (MockedImageStore) FullBlobUpload ¶
func (MockedImageStore) GetBlob ¶
func (is MockedImageStore) GetBlob(repo string, digest string, mediaType string) (io.ReadCloser, int64, error)
func (MockedImageStore) GetBlobContent ¶
func (is MockedImageStore) GetBlobContent(repo string, digest string) ([]byte, error)
func (MockedImageStore) GetBlobUpload ¶
func (is MockedImageStore) GetBlobUpload(repo string, uuid string) (int64, error)
func (MockedImageStore) GetImageManifest ¶
func (MockedImageStore) GetImageTags ¶
func (is MockedImageStore) GetImageTags(name string) ([]string, error)
func (MockedImageStore) GetIndexContent ¶
func (is MockedImageStore) GetIndexContent(repo string) ([]byte, error)
func (MockedImageStore) GetReferrers ¶
func (is MockedImageStore) GetReferrers( repo string, digest string, mediaType string, ) ([]artifactspec.Descriptor, error)
func (MockedImageStore) GetRepositories ¶
func (is MockedImageStore) GetRepositories() ([]string, error)
func (MockedImageStore) InitRepo ¶
func (is MockedImageStore) InitRepo(name string) error
func (MockedImageStore) Lock ¶
func (is MockedImageStore) Lock(t *time.Time)
func (MockedImageStore) NewBlobUpload ¶
func (is MockedImageStore) NewBlobUpload(repo string) (string, error)
func (MockedImageStore) PutBlobChunk ¶
func (MockedImageStore) PutBlobChunkStreamed ¶
func (MockedImageStore) PutImageManifest ¶
func (MockedImageStore) RLock ¶
func (is MockedImageStore) RLock(t *time.Time)
func (MockedImageStore) RUnlock ¶
func (is MockedImageStore) RUnlock(t *time.Time)
func (MockedImageStore) RootDir ¶
func (is MockedImageStore) RootDir() string
func (MockedImageStore) RunGCRepo ¶
func (is MockedImageStore) RunGCRepo(repo string)
func (MockedImageStore) URLForPath ¶
func (is MockedImageStore) URLForPath(path string) (string, error)
func (MockedImageStore) Unlock ¶
func (is MockedImageStore) Unlock(t *time.Time)
func (MockedImageStore) ValidateRepo ¶
func (is MockedImageStore) ValidateRepo(name string) (bool, error)
type MockedLint ¶
type MockedLint struct {
LintFn func(repo string, manifestDigest godigest.Digest, imageStore storage.ImageStore) (bool, error)
}
func (MockedLint) Lint ¶
func (lint MockedLint) Lint(repo string, manifestDigest godigest.Digest, imageStore storage.ImageStore) (bool, error)
type OciLayoutUtilsMock ¶
type OciLayoutUtilsMock struct { GetImageManifestsFn func(image string) ([]ispec.Descriptor, error) GetImageBlobManifestFn func(imageDir string, digest godigest.Digest) (v1.Manifest, error) GetImageInfoFn func(imageDir string, hash v1.Hash) (ispec.Image, error) IsValidImageFormatFn func(image string) (bool, error) GetImageTagsWithTimestampFn func(repo string) ([]common.TagInfo, error) GetImageLastUpdatedFn func(imageInfo ispec.Image) time.Time GetImagePlatformFn func(imageInfo ispec.Image) (string, string) GetImageVendorFn func(imageInfo ispec.Image) string GetImageManifestSizeFn func(repo string, manifestDigest godigest.Digest) int64 GetImageConfigSizeFn func(repo string, manifestDigest godigest.Digest) int64 GetRepoLastUpdatedFn func(repo string) (common.TagInfo, error) GetExpandedRepoInfoFn func(name string) (common.RepoInfo, error) GetImageConfigInfoFn func(repo string, manifestDigest godigest.Digest) (ispec.Image, error) CheckManifestSignatureFn func(name string, digest godigest.Digest) bool }
func (OciLayoutUtilsMock) CheckManifestSignature ¶
func (olum OciLayoutUtilsMock) CheckManifestSignature(name string, digest godigest.Digest) bool
func (OciLayoutUtilsMock) GetExpandedRepoInfo ¶
func (olum OciLayoutUtilsMock) GetExpandedRepoInfo(name string) (common.RepoInfo, error)
func (OciLayoutUtilsMock) GetImageBlobManifest ¶
func (OciLayoutUtilsMock) GetImageConfigInfo ¶
func (OciLayoutUtilsMock) GetImageConfigSize ¶
func (olum OciLayoutUtilsMock) GetImageConfigSize(repo string, manifestDigest godigest.Digest) int64
func (OciLayoutUtilsMock) GetImageInfo ¶
func (OciLayoutUtilsMock) GetImageLastUpdated ¶
func (olum OciLayoutUtilsMock) GetImageLastUpdated(imageInfo ispec.Image) time.Time
func (OciLayoutUtilsMock) GetImageManifestSize ¶
func (olum OciLayoutUtilsMock) GetImageManifestSize(repo string, manifestDigest godigest.Digest) int64
func (OciLayoutUtilsMock) GetImageManifests ¶
func (olum OciLayoutUtilsMock) GetImageManifests(image string) ([]ispec.Descriptor, error)
func (OciLayoutUtilsMock) GetImagePlatform ¶
func (olum OciLayoutUtilsMock) GetImagePlatform(imageInfo ispec.Image) (string, string)
func (OciLayoutUtilsMock) GetImageTagsWithTimestamp ¶
func (olum OciLayoutUtilsMock) GetImageTagsWithTimestamp(repo string) ([]common.TagInfo, error)
func (OciLayoutUtilsMock) GetImageVendor ¶
func (olum OciLayoutUtilsMock) GetImageVendor(imageInfo ispec.Image) string
func (OciLayoutUtilsMock) GetRepoLastUpdated ¶
func (olum OciLayoutUtilsMock) GetRepoLastUpdated(repo string) (common.TagInfo, error)
func (OciLayoutUtilsMock) IsValidImageFormat ¶
func (olum OciLayoutUtilsMock) IsValidImageFormat(image string) (bool, error)
type StorageDriverMock ¶
type StorageDriverMock struct { NameFn func() string GetContentFn func(ctx context.Context, path string) ([]byte, error) PutContentFn func(ctx context.Context, path string, content []byte) error ReaderFn func(ctx context.Context, path string, offset int64) (io.ReadCloser, error) WriterFn func(ctx context.Context, path string, isAppend bool) (driver.FileWriter, error) StatFn func(ctx context.Context, path string) (driver.FileInfo, error) ListFn func(ctx context.Context, path string) ([]string, error) MoveFn func(ctx context.Context, sourcePath, destPath string) error DeleteFn func(ctx context.Context, path string) error WalkFn func(ctx context.Context, path string, f driver.WalkFn) error }
func (*StorageDriverMock) Delete ¶
func (s *StorageDriverMock) Delete(ctx context.Context, path string) error
func (*StorageDriverMock) GetContent ¶
func (*StorageDriverMock) Move ¶
func (s *StorageDriverMock) Move(ctx context.Context, sourcePath, destPath string) error
func (*StorageDriverMock) Name ¶
func (s *StorageDriverMock) Name() string
func (*StorageDriverMock) PutContent ¶
func (*StorageDriverMock) Reader ¶
func (s *StorageDriverMock) Reader(ctx context.Context, path string, offset int64) (io.ReadCloser, error)
func (*StorageDriverMock) Writer ¶
func (s *StorageDriverMock) Writer(ctx context.Context, path string, isAppend bool) (driver.FileWriter, error)
Click to show internal directories.
Click to hide internal directories.