Documentation
¶
Index ¶
- type CveInfoMock
- func (cveInfo CveInfoMock) GetCVEListForImage(image string) (map[string]cvemodel.CVE, error)
- func (cveInfo CveInfoMock) GetCVESummaryForImage(image string) (cveinfo.ImageCVESummary, error)
- func (cveInfo CveInfoMock) GetImageListForCVE(repo, cveID string) ([]cveinfo.ImageInfoByCVE, error)
- func (cveInfo CveInfoMock) GetImageListWithCVEFixed(repo, cveID string) ([]common.TagInfo, error)
- func (cveInfo CveInfoMock) UpdateDB() error
- type CveScannerMock
- type FileInfoMock
- type FileWriterMock
- type MockedImageStore
- func (is MockedImageStore) BlobPath(repo string, digest godigest.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 godigest.Digest) (bool, int64, error)
- func (is MockedImageStore) DedupeBlob(src string, dstDigest godigest.Digest, dst string) error
- func (is MockedImageStore) DeleteBlob(repo string, digest godigest.Digest) error
- func (is MockedImageStore) DeleteBlobUpload(repo string, uuid string) error
- func (is MockedImageStore) DeleteImageManifest(name string, reference string, detectCollision bool) error
- func (is MockedImageStore) DirExists(d string) bool
- func (is MockedImageStore) FinishBlobUpload(repo string, uuid string, body io.Reader, digest godigest.Digest) error
- func (is MockedImageStore) FullBlobUpload(repo string, body io.Reader, digest godigest.Digest) (string, int64, error)
- func (is MockedImageStore) GetBlob(repo string, digest godigest.Digest, mediaType string) (io.ReadCloser, int64, error)
- func (is MockedImageStore) GetBlobContent(repo string, digest godigest.Digest) ([]byte, error)
- func (is MockedImageStore) GetBlobPartial(repo string, digest godigest.Digest, mediaType string, from, to int64) (io.ReadCloser, int64, int64, error)
- func (is MockedImageStore) GetBlobUpload(repo string, uuid string) (int64, error)
- func (is MockedImageStore) GetImageManifest(repo string, reference string) ([]byte, godigest.Digest, string, error)
- func (is MockedImageStore) GetImageTags(name string) ([]string, error)
- func (is MockedImageStore) GetIndexContent(repo string) ([]byte, error)
- func (is MockedImageStore) GetNextRepository(repo string) (string, error)
- func (is MockedImageStore) GetOrasReferrers(repo string, digest godigest.Digest, artifactType string) ([]artifactspec.Descriptor, error)
- func (is MockedImageStore) GetReferrers(repo string, digest godigest.Digest, artifactType string) (ispec.Index, 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) (godigest.Digest, error)
- func (is MockedImageStore) RLock(t *time.Time)
- func (is MockedImageStore) RUnlock(t *time.Time)
- func (is MockedImageStore) RootDir() string
- func (is MockedImageStore) RunGCPeriodically(interval time.Duration, sch *scheduler.Scheduler)
- func (is MockedImageStore) RunGCRepo(repo string) error
- 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(repo string, digest godigest.Digest) (ispec.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(repo string, digest godigest.Digest) (ispec.Image, error)
- func (olum OciLayoutUtilsMock) GetImageManifest(repo string, reference string) (ispec.Manifest, godigest.Digest, error)
- func (olum OciLayoutUtilsMock) GetImageManifestSize(repo string, manifestDigest godigest.Digest) int64
- func (olum OciLayoutUtilsMock) GetImageManifests(repo 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) GetRepositories() ([]string, 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 CveInfoMock ¶ added in v1.4.3
type CveInfoMock struct { GetImageListForCVEFn func(repo, cveID string) ([]cveinfo.ImageInfoByCVE, error) GetImageListWithCVEFixedFn func(repo, cveID string) ([]common.TagInfo, error) GetCVEListForImageFn func(image string) (map[string]cvemodel.CVE, error) GetCVESummaryForImageFn func(image string) (cveinfo.ImageCVESummary, error) UpdateDBFn func() error }
func (CveInfoMock) GetCVEListForImage ¶ added in v1.4.3
func (CveInfoMock) GetCVESummaryForImage ¶ added in v1.4.3
func (cveInfo CveInfoMock) GetCVESummaryForImage(image string) (cveinfo.ImageCVESummary, error)
func (CveInfoMock) GetImageListForCVE ¶ added in v1.4.3
func (cveInfo CveInfoMock) GetImageListForCVE(repo, cveID string) ([]cveinfo.ImageInfoByCVE, error)
func (CveInfoMock) GetImageListWithCVEFixed ¶ added in v1.4.3
func (cveInfo CveInfoMock) GetImageListWithCVEFixed(repo, cveID string) ([]common.TagInfo, error)
func (CveInfoMock) UpdateDB ¶ added in v1.4.3
func (cveInfo CveInfoMock) UpdateDB() error
type CveScannerMock ¶ added in v1.4.3
type CveScannerMock struct { IsImageFormatScannableFn func(image string) (bool, error) ScanImageFn func(image string) (map[string]cvemodel.CVE, error) CompareSeveritiesFn func(severity1, severity2 string) int UpdateDBFn func() error }
func (CveScannerMock) CompareSeverities ¶ added in v1.4.3
func (scanner CveScannerMock) CompareSeverities(severity1, severity2 string) int
func (CveScannerMock) IsImageFormatScannable ¶ added in v1.4.3
func (scanner CveScannerMock) IsImageFormatScannable(image string) (bool, error)
func (CveScannerMock) UpdateDB ¶ added in v1.4.3
func (scanner CveScannerMock) UpdateDB() error
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) GetNextRepositoryFn func(repo string) (string, error) GetImageTagsFn func(repo string) ([]string, error) GetImageManifestFn func(repo string, reference string) ([]byte, godigest.Digest, string, error) PutImageManifestFn func(repo string, reference string, mediaType string, body []byte) (godigest.Digest, error) DeleteImageManifestFn func(repo string, reference string, detectCollision bool) 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 godigest.Digest) error FullBlobUploadFn func(repo string, body io.Reader, digest godigest.Digest) (string, int64, error) DedupeBlobFn func(src string, dstDigest godigest.Digest, dst string) error DeleteBlobUploadFn func(repo string, uuid string) error BlobPathFn func(repo string, digest godigest.Digest) string CheckBlobFn func(repo string, digest godigest.Digest) (bool, int64, error) GetBlobPartialFn func(repo string, digest godigest.Digest, mediaType string, from, to int64, ) (io.ReadCloser, int64, int64, error) GetBlobFn func(repo string, digest godigest.Digest, mediaType string) (io.ReadCloser, int64, error) DeleteBlobFn func(repo string, digest godigest.Digest) error GetIndexContentFn func(repo string) ([]byte, error) GetBlobContentFn func(repo string, digest godigest.Digest) ([]byte, error) GetReferrersFn func(repo string, digest godigest.Digest, artifactType string) (ispec.Index, error) GetOrasReferrersFn func(repo string, digest godigest.Digest, artifactType string) ([]artifactspec.Descriptor, error) URLForPathFn func(path string) (string, error) RunGCRepoFn func(repo string) error RunGCPeriodicallyFn func(interval time.Duration, sch *scheduler.Scheduler) }
func (MockedImageStore) BlobPath ¶
func (is MockedImageStore) BlobPath(repo string, digest godigest.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 (MockedImageStore) DeleteBlob ¶
func (is MockedImageStore) DeleteBlob(repo string, digest godigest.Digest) error
func (MockedImageStore) DeleteBlobUpload ¶
func (is MockedImageStore) DeleteBlobUpload(repo string, uuid string) error
func (MockedImageStore) DeleteImageManifest ¶
func (is MockedImageStore) DeleteImageManifest(name string, reference string, detectCollision bool) 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 godigest.Digest, mediaType string, ) (io.ReadCloser, int64, error)
func (MockedImageStore) GetBlobContent ¶
func (MockedImageStore) GetBlobPartial ¶
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) GetNextRepository ¶ added in v1.4.3
func (is MockedImageStore) GetNextRepository(repo string) (string, error)
func (MockedImageStore) GetOrasReferrers ¶ added in v1.4.3
func (is MockedImageStore) GetOrasReferrers( repo string, digest godigest.Digest, artifactType string, ) ([]artifactspec.Descriptor, error)
func (MockedImageStore) GetReferrers ¶
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) RunGCPeriodically ¶ added in v1.4.3
func (is MockedImageStore) RunGCPeriodically(interval time.Duration, sch *scheduler.Scheduler)
func (MockedImageStore) RunGCRepo ¶
func (is MockedImageStore) RunGCRepo(repo string) error
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 { GetImageManifestFn func(repo string, reference string) (ispec.Manifest, godigest.Digest, error) GetImageManifestsFn func(repo string) ([]ispec.Descriptor, error) GetImageBlobManifestFn func(repo string, digest godigest.Digest) (ispec.Manifest, error) GetImageInfoFn func(repo string, digest godigest.Digest) (ispec.Image, error) GetImageTagsWithTimestampFn func(repo string) ([]common.TagInfo, error) 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 GetRepositoriesFn func() ([]string, error) }
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) GetImageManifest ¶ added in v1.4.3
func (OciLayoutUtilsMock) GetImageManifestSize ¶
func (olum OciLayoutUtilsMock) GetImageManifestSize(repo string, manifestDigest godigest.Digest) int64
func (OciLayoutUtilsMock) GetImageManifests ¶
func (olum OciLayoutUtilsMock) GetImageManifests(repo 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) GetRepositories ¶ added in v1.4.3
func (olum OciLayoutUtilsMock) GetRepositories() ([]string, 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.