Documentation ¶
Index ¶
- func CalcKey(id string, versions map[string]int, opt *config.ScannerOption) (string, error)
- type ArtifactCache
- type ArtifactCacheMissingBlobsArgs
- type ArtifactCacheMissingBlobsExpectation
- type ArtifactCacheMissingBlobsReturns
- type ArtifactCachePutArtifactArgs
- type ArtifactCachePutArtifactExpectation
- type ArtifactCachePutArtifactReturns
- type ArtifactCachePutBlobArgs
- type ArtifactCachePutBlobExpectation
- type ArtifactCachePutBlobReturns
- type Cache
- type CacheClearExpectation
- type CacheClearReturns
- type CacheCloseExpectation
- type CacheCloseReturns
- type CacheGetArtifactArgs
- type CacheGetArtifactExpectation
- type CacheGetArtifactReturns
- type CacheGetBlobArgs
- type CacheGetBlobExpectation
- type CacheGetBlobReturns
- type CacheMissingBlobsArgs
- type CacheMissingBlobsExpectation
- type CacheMissingBlobsReturns
- type CachePutArtifactArgs
- type CachePutArtifactExpectation
- type CachePutArtifactReturns
- type CachePutBlobArgs
- type CachePutBlobExpectation
- type CachePutBlobReturns
- type FSCache
- func (fs FSCache) Clear() error
- func (fs FSCache) Close() error
- func (fs FSCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
- func (fs FSCache) GetBlob(blobID string) (types.BlobInfo, error)
- func (fs FSCache) MissingBlobs(artifactID string, blobIDs []string) (bool, []string, error)
- func (fs FSCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) (err error)
- func (fs FSCache) PutBlob(blobID string, blobInfo types.BlobInfo) error
- type LocalArtifactCache
- type LocalArtifactCacheClearExpectation
- type LocalArtifactCacheClearReturns
- type LocalArtifactCacheCloseExpectation
- type LocalArtifactCacheCloseReturns
- type LocalArtifactCacheGetArtifactArgs
- type LocalArtifactCacheGetArtifactExpectation
- type LocalArtifactCacheGetArtifactReturns
- type LocalArtifactCacheGetBlobArgs
- type LocalArtifactCacheGetBlobExpectation
- type LocalArtifactCacheGetBlobReturns
- type MockArtifactCache
- func (_m *MockArtifactCache) ApplyMissingBlobsExpectation(e ArtifactCacheMissingBlobsExpectation)
- func (_m *MockArtifactCache) ApplyMissingBlobsExpectations(expectations []ArtifactCacheMissingBlobsExpectation)
- func (_m *MockArtifactCache) ApplyPutArtifactExpectation(e ArtifactCachePutArtifactExpectation)
- func (_m *MockArtifactCache) ApplyPutArtifactExpectations(expectations []ArtifactCachePutArtifactExpectation)
- func (_m *MockArtifactCache) ApplyPutBlobExpectation(e ArtifactCachePutBlobExpectation)
- func (_m *MockArtifactCache) ApplyPutBlobExpectations(expectations []ArtifactCachePutBlobExpectation)
- func (_m *MockArtifactCache) MissingBlobs(artifactID string, blobIDs []string) (bool, []string, error)
- func (_m *MockArtifactCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) error
- func (_m *MockArtifactCache) PutBlob(blobID string, blobInfo types.BlobInfo) error
- type MockCache
- func (_m *MockCache) ApplyClearExpectation(e CacheClearExpectation)
- func (_m *MockCache) ApplyClearExpectations(expectations []CacheClearExpectation)
- func (_m *MockCache) ApplyCloseExpectation(e CacheCloseExpectation)
- func (_m *MockCache) ApplyCloseExpectations(expectations []CacheCloseExpectation)
- func (_m *MockCache) ApplyGetArtifactExpectation(e CacheGetArtifactExpectation)
- func (_m *MockCache) ApplyGetArtifactExpectations(expectations []CacheGetArtifactExpectation)
- func (_m *MockCache) ApplyGetBlobExpectation(e CacheGetBlobExpectation)
- func (_m *MockCache) ApplyGetBlobExpectations(expectations []CacheGetBlobExpectation)
- func (_m *MockCache) ApplyMissingBlobsExpectation(e CacheMissingBlobsExpectation)
- func (_m *MockCache) ApplyMissingBlobsExpectations(expectations []CacheMissingBlobsExpectation)
- func (_m *MockCache) ApplyPutArtifactExpectation(e CachePutArtifactExpectation)
- func (_m *MockCache) ApplyPutArtifactExpectations(expectations []CachePutArtifactExpectation)
- func (_m *MockCache) ApplyPutBlobExpectation(e CachePutBlobExpectation)
- func (_m *MockCache) ApplyPutBlobExpectations(expectations []CachePutBlobExpectation)
- func (_m *MockCache) Clear() error
- func (_m *MockCache) Close() error
- func (_m *MockCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
- func (_m *MockCache) GetBlob(blobID string) (types.BlobInfo, error)
- func (_m *MockCache) MissingBlobs(artifactID string, blobIDs []string) (bool, []string, error)
- func (_m *MockCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) error
- func (_m *MockCache) PutBlob(blobID string, blobInfo types.BlobInfo) error
- type MockLocalArtifactCache
- func (_m *MockLocalArtifactCache) ApplyClearExpectation(e LocalArtifactCacheClearExpectation)
- func (_m *MockLocalArtifactCache) ApplyClearExpectations(expectations []LocalArtifactCacheClearExpectation)
- func (_m *MockLocalArtifactCache) ApplyCloseExpectation(e LocalArtifactCacheCloseExpectation)
- func (_m *MockLocalArtifactCache) ApplyCloseExpectations(expectations []LocalArtifactCacheCloseExpectation)
- func (_m *MockLocalArtifactCache) ApplyGetArtifactExpectation(e LocalArtifactCacheGetArtifactExpectation)
- func (_m *MockLocalArtifactCache) ApplyGetArtifactExpectations(expectations []LocalArtifactCacheGetArtifactExpectation)
- func (_m *MockLocalArtifactCache) ApplyGetBlobExpectation(e LocalArtifactCacheGetBlobExpectation)
- func (_m *MockLocalArtifactCache) ApplyGetBlobExpectations(expectations []LocalArtifactCacheGetBlobExpectation)
- func (_m *MockLocalArtifactCache) Clear() error
- func (_m *MockLocalArtifactCache) Close() error
- func (_m *MockLocalArtifactCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
- func (_m *MockLocalArtifactCache) GetBlob(blobID string) (types.BlobInfo, error)
- type RedisCache
- func (c RedisCache) Clear() error
- func (c RedisCache) Close() error
- func (c RedisCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
- func (c RedisCache) GetBlob(blobID string) (types.BlobInfo, error)
- func (c RedisCache) MissingBlobs(artifactID string, blobIDs []string) (bool, []string, error)
- func (c RedisCache) PutArtifact(artifactID string, artifactConfig types.ArtifactInfo) error
- func (c RedisCache) PutBlob(blobID string, blobInfo types.BlobInfo) error
- type S3Cache
- func (c S3Cache) Clear() error
- func (c S3Cache) Close() error
- func (c S3Cache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
- func (c S3Cache) GetBlob(blobID string) (types.BlobInfo, error)
- func (c S3Cache) MissingBlobs(artifactID string, blobIDs []string) (bool, []string, error)
- func (c S3Cache) PutArtifact(artifactID string, artifactConfig types.ArtifactInfo) (err error)
- func (c S3Cache) PutBlob(blobID string, blobInfo types.BlobInfo) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArtifactCache ¶
type ArtifactCache interface { // MissingBlobs returns missing blob IDs such as layer IDs in cache MissingBlobs(artifactID string, blobIDs []string) (missingArtifact bool, missingBlobIDs []string, err error) // PutArtifact stores artifact information such as image metadata in cache PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) (err error) // PutBlob stores blob information such as layer information in local cache PutBlob(blobID string, blobInfo types.BlobInfo) (err error) }
ArtifactCache uses local or remote cache
type ArtifactCacheMissingBlobsExpectation ¶
type ArtifactCacheMissingBlobsExpectation struct { Args ArtifactCacheMissingBlobsArgs Returns ArtifactCacheMissingBlobsReturns }
type ArtifactCachePutArtifactArgs ¶
type ArtifactCachePutArtifactArgs struct { ArtifactID string ArtifactIDAnything bool ArtifactInfo types.ArtifactInfo ArtifactInfoAnything bool }
type ArtifactCachePutArtifactExpectation ¶
type ArtifactCachePutArtifactExpectation struct { Args ArtifactCachePutArtifactArgs Returns ArtifactCachePutArtifactReturns }
type ArtifactCachePutArtifactReturns ¶
type ArtifactCachePutArtifactReturns struct {
Err error
}
type ArtifactCachePutBlobExpectation ¶
type ArtifactCachePutBlobExpectation struct { Args ArtifactCachePutBlobArgs Returns ArtifactCachePutBlobReturns }
type ArtifactCachePutBlobReturns ¶
type ArtifactCachePutBlobReturns struct {
Err error
}
type Cache ¶
type Cache interface { ArtifactCache LocalArtifactCache }
type CacheClearExpectation ¶
type CacheClearExpectation struct {
Returns CacheClearReturns
}
type CacheClearReturns ¶
type CacheClearReturns struct {
Err error
}
type CacheCloseExpectation ¶
type CacheCloseExpectation struct {
Returns CacheCloseReturns
}
type CacheCloseReturns ¶
type CacheCloseReturns struct {
Err error
}
type CacheGetArtifactArgs ¶
type CacheGetArtifactExpectation ¶
type CacheGetArtifactExpectation struct { Args CacheGetArtifactArgs Returns CacheGetArtifactReturns }
type CacheGetArtifactReturns ¶
type CacheGetArtifactReturns struct { ArtifactInfo types.ArtifactInfo Err error }
type CacheGetBlobArgs ¶
type CacheGetBlobExpectation ¶
type CacheGetBlobExpectation struct { Args CacheGetBlobArgs Returns CacheGetBlobReturns }
type CacheGetBlobReturns ¶
type CacheMissingBlobsArgs ¶
type CacheMissingBlobsExpectation ¶
type CacheMissingBlobsExpectation struct { Args CacheMissingBlobsArgs Returns CacheMissingBlobsReturns }
type CachePutArtifactArgs ¶
type CachePutArtifactArgs struct { ArtifactID string ArtifactIDAnything bool ArtifactInfo types.ArtifactInfo ArtifactInfoAnything bool }
type CachePutArtifactExpectation ¶
type CachePutArtifactExpectation struct { Args CachePutArtifactArgs Returns CachePutArtifactReturns }
type CachePutArtifactReturns ¶
type CachePutArtifactReturns struct {
Err error
}
type CachePutBlobArgs ¶
type CachePutBlobExpectation ¶
type CachePutBlobExpectation struct { Args CachePutBlobArgs Returns CachePutBlobReturns }
type CachePutBlobReturns ¶
type CachePutBlobReturns struct {
Err error
}
type FSCache ¶
type FSCache struct {
// contains filtered or unexported fields
}
func NewFSCache ¶
func (FSCache) GetArtifact ¶
func (fs FSCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
GetArtifact gets artifact information such as image metadata from local cache
func (FSCache) MissingBlobs ¶
MissingBlobs returns missing blob IDs such as layer IDs
func (FSCache) PutArtifact ¶
func (fs FSCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) (err error)
PutArtifact stores artifact information such as image metadata in local cache
type LocalArtifactCache ¶
type LocalArtifactCache interface { // GetArtifact gets artifact information such as image metadata from local cache GetArtifact(artifactID string) (artifactInfo types.ArtifactInfo, err error) // GetBlob gets blob information such as layer data from local cache GetBlob(blobID string) (blobInfo types.BlobInfo, err error) // Close closes the local database Close() (err error) // Clear deletes the local database Clear() (err error) }
LocalArtifactCache always uses local cache
type LocalArtifactCacheClearExpectation ¶
type LocalArtifactCacheClearExpectation struct {
Returns LocalArtifactCacheClearReturns
}
type LocalArtifactCacheClearReturns ¶
type LocalArtifactCacheClearReturns struct {
Err error
}
type LocalArtifactCacheCloseExpectation ¶
type LocalArtifactCacheCloseExpectation struct {
Returns LocalArtifactCacheCloseReturns
}
type LocalArtifactCacheCloseReturns ¶
type LocalArtifactCacheCloseReturns struct {
Err error
}
type LocalArtifactCacheGetArtifactExpectation ¶
type LocalArtifactCacheGetArtifactExpectation struct { Args LocalArtifactCacheGetArtifactArgs Returns LocalArtifactCacheGetArtifactReturns }
type LocalArtifactCacheGetArtifactReturns ¶
type LocalArtifactCacheGetArtifactReturns struct { ArtifactInfo types.ArtifactInfo Err error }
type LocalArtifactCacheGetBlobExpectation ¶
type LocalArtifactCacheGetBlobExpectation struct { Args LocalArtifactCacheGetBlobArgs Returns LocalArtifactCacheGetBlobReturns }
type MockArtifactCache ¶
MockArtifactCache is an autogenerated mock type for the ArtifactCache type
func (*MockArtifactCache) ApplyMissingBlobsExpectation ¶
func (_m *MockArtifactCache) ApplyMissingBlobsExpectation(e ArtifactCacheMissingBlobsExpectation)
func (*MockArtifactCache) ApplyMissingBlobsExpectations ¶
func (_m *MockArtifactCache) ApplyMissingBlobsExpectations(expectations []ArtifactCacheMissingBlobsExpectation)
func (*MockArtifactCache) ApplyPutArtifactExpectation ¶
func (_m *MockArtifactCache) ApplyPutArtifactExpectation(e ArtifactCachePutArtifactExpectation)
func (*MockArtifactCache) ApplyPutArtifactExpectations ¶
func (_m *MockArtifactCache) ApplyPutArtifactExpectations(expectations []ArtifactCachePutArtifactExpectation)
func (*MockArtifactCache) ApplyPutBlobExpectation ¶
func (_m *MockArtifactCache) ApplyPutBlobExpectation(e ArtifactCachePutBlobExpectation)
func (*MockArtifactCache) ApplyPutBlobExpectations ¶
func (_m *MockArtifactCache) ApplyPutBlobExpectations(expectations []ArtifactCachePutBlobExpectation)
func (*MockArtifactCache) MissingBlobs ¶
func (_m *MockArtifactCache) MissingBlobs(artifactID string, blobIDs []string) (bool, []string, error)
MissingBlobs provides a mock function with given fields: artifactID, blobIDs
func (*MockArtifactCache) PutArtifact ¶
func (_m *MockArtifactCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) error
PutArtifact provides a mock function with given fields: artifactID, artifactInfo
type MockCache ¶
MockCache is an autogenerated mock type for the Cache type
func (*MockCache) ApplyClearExpectation ¶
func (_m *MockCache) ApplyClearExpectation(e CacheClearExpectation)
func (*MockCache) ApplyClearExpectations ¶
func (_m *MockCache) ApplyClearExpectations(expectations []CacheClearExpectation)
func (*MockCache) ApplyCloseExpectation ¶
func (_m *MockCache) ApplyCloseExpectation(e CacheCloseExpectation)
func (*MockCache) ApplyCloseExpectations ¶
func (_m *MockCache) ApplyCloseExpectations(expectations []CacheCloseExpectation)
func (*MockCache) ApplyGetArtifactExpectation ¶
func (_m *MockCache) ApplyGetArtifactExpectation(e CacheGetArtifactExpectation)
func (*MockCache) ApplyGetArtifactExpectations ¶
func (_m *MockCache) ApplyGetArtifactExpectations(expectations []CacheGetArtifactExpectation)
func (*MockCache) ApplyGetBlobExpectation ¶
func (_m *MockCache) ApplyGetBlobExpectation(e CacheGetBlobExpectation)
func (*MockCache) ApplyGetBlobExpectations ¶
func (_m *MockCache) ApplyGetBlobExpectations(expectations []CacheGetBlobExpectation)
func (*MockCache) ApplyMissingBlobsExpectation ¶
func (_m *MockCache) ApplyMissingBlobsExpectation(e CacheMissingBlobsExpectation)
func (*MockCache) ApplyMissingBlobsExpectations ¶
func (_m *MockCache) ApplyMissingBlobsExpectations(expectations []CacheMissingBlobsExpectation)
func (*MockCache) ApplyPutArtifactExpectation ¶
func (_m *MockCache) ApplyPutArtifactExpectation(e CachePutArtifactExpectation)
func (*MockCache) ApplyPutArtifactExpectations ¶
func (_m *MockCache) ApplyPutArtifactExpectations(expectations []CachePutArtifactExpectation)
func (*MockCache) ApplyPutBlobExpectation ¶
func (_m *MockCache) ApplyPutBlobExpectation(e CachePutBlobExpectation)
func (*MockCache) ApplyPutBlobExpectations ¶
func (_m *MockCache) ApplyPutBlobExpectations(expectations []CachePutBlobExpectation)
func (*MockCache) GetArtifact ¶
func (_m *MockCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
GetArtifact provides a mock function with given fields: artifactID
func (*MockCache) MissingBlobs ¶
MissingBlobs provides a mock function with given fields: artifactID, blobIDs
func (*MockCache) PutArtifact ¶
func (_m *MockCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) error
PutArtifact provides a mock function with given fields: artifactID, artifactInfo
type MockLocalArtifactCache ¶
MockLocalArtifactCache is an autogenerated mock type for the LocalArtifactCache type
func (*MockLocalArtifactCache) ApplyClearExpectation ¶
func (_m *MockLocalArtifactCache) ApplyClearExpectation(e LocalArtifactCacheClearExpectation)
func (*MockLocalArtifactCache) ApplyClearExpectations ¶
func (_m *MockLocalArtifactCache) ApplyClearExpectations(expectations []LocalArtifactCacheClearExpectation)
func (*MockLocalArtifactCache) ApplyCloseExpectation ¶
func (_m *MockLocalArtifactCache) ApplyCloseExpectation(e LocalArtifactCacheCloseExpectation)
func (*MockLocalArtifactCache) ApplyCloseExpectations ¶
func (_m *MockLocalArtifactCache) ApplyCloseExpectations(expectations []LocalArtifactCacheCloseExpectation)
func (*MockLocalArtifactCache) ApplyGetArtifactExpectation ¶
func (_m *MockLocalArtifactCache) ApplyGetArtifactExpectation(e LocalArtifactCacheGetArtifactExpectation)
func (*MockLocalArtifactCache) ApplyGetArtifactExpectations ¶
func (_m *MockLocalArtifactCache) ApplyGetArtifactExpectations(expectations []LocalArtifactCacheGetArtifactExpectation)
func (*MockLocalArtifactCache) ApplyGetBlobExpectation ¶
func (_m *MockLocalArtifactCache) ApplyGetBlobExpectation(e LocalArtifactCacheGetBlobExpectation)
func (*MockLocalArtifactCache) ApplyGetBlobExpectations ¶
func (_m *MockLocalArtifactCache) ApplyGetBlobExpectations(expectations []LocalArtifactCacheGetBlobExpectation)
func (*MockLocalArtifactCache) Clear ¶
func (_m *MockLocalArtifactCache) Clear() error
Clear provides a mock function with given fields:
func (*MockLocalArtifactCache) Close ¶
func (_m *MockLocalArtifactCache) Close() error
Close provides a mock function with given fields:
func (*MockLocalArtifactCache) GetArtifact ¶
func (_m *MockLocalArtifactCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
GetArtifact provides a mock function with given fields: artifactID
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶
func NewRedisCache(options *redis.Options) RedisCache
func (RedisCache) Clear ¶
func (c RedisCache) Clear() error
func (RedisCache) Close ¶
func (c RedisCache) Close() error
func (RedisCache) GetArtifact ¶
func (c RedisCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
func (RedisCache) MissingBlobs ¶
func (RedisCache) PutArtifact ¶
func (c RedisCache) PutArtifact(artifactID string, artifactConfig types.ArtifactInfo) error
type S3Cache ¶
type S3Cache struct {
// contains filtered or unexported fields
}
func NewS3Cache ¶
func NewS3Cache(bucketName, prefix string, api s3iface.S3API, downloaderAPI s3manageriface.DownloaderAPI) S3Cache
func (S3Cache) GetArtifact ¶
func (c S3Cache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
func (S3Cache) MissingBlobs ¶
func (S3Cache) PutArtifact ¶
func (c S3Cache) PutArtifact(artifactID string, artifactConfig types.ArtifactInfo) (err error)