Documentation ¶
Index ¶
- func CalcKey(id string, analyzerVersions analyzer.Versions, hookVersions map[string]int, ...) (string, error)
- func DefaultDir() string
- func GetTLSConfig(caCertPath, certPath, keyPath string) (*x509.CertPool, tls.Certificate, error)
- type ArtifactCache
- type ArtifactCacheDeleteBlobsArgs
- type ArtifactCacheDeleteBlobsExpectation
- type ArtifactCacheDeleteBlobsReturns
- 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 CacheDeleteBlobArgs
- type CacheDeleteBlobExpectation
- type CacheDeleteBlobReturns
- 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) DeleteBlobs(blobIDs []string) 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 MemoryCache
- func (c *MemoryCache) Clear() error
- func (c *MemoryCache) Close() error
- func (c *MemoryCache) DeleteBlobs(blobIDs []string) error
- func (c *MemoryCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
- func (c *MemoryCache) GetBlob(blobID string) (types.BlobInfo, error)
- func (c *MemoryCache) MissingBlobs(artifactID string, blobIDs []string) (bool, []string, error)
- func (c *MemoryCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) error
- func (c *MemoryCache) PutBlob(blobID string, blobInfo types.BlobInfo) error
- type MockArtifactCache
- func (_m *MockArtifactCache) ApplyDeleteBlobsExpectation(e ArtifactCacheDeleteBlobsExpectation)
- func (_m *MockArtifactCache) ApplyDeleteBlobsExpectations(expectations []ArtifactCacheDeleteBlobsExpectation)
- 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) *mock.Call
- func (_m *MockArtifactCache) ApplyPutBlobExpectations(expectations []ArtifactCachePutBlobExpectation)
- func (_m *MockArtifactCache) DeleteBlobs(blobIDs []string) error
- 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) ApplyDeleteBlobExpectation(e CacheDeleteBlobExpectation)
- func (_m *MockCache) ApplyDeleteBlobExpectations(expectations []CacheDeleteBlobExpectation)
- 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) DeleteBlob(blobID string) 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 NopCache
- type Options
- type RedisCache
- func (c RedisCache) Clear() error
- func (c RedisCache) Close() error
- func (c RedisCache) DeleteBlobs(blobIDs []string) 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 RedisOptions
- type RedisTLSOptions
- type RemoteCache
- func (c RemoteCache) DeleteBlobs(blobIDs []string) error
- func (c RemoteCache) MissingBlobs(imageID string, layerIDs []string) (bool, []string, error)
- func (c RemoteCache) PutArtifact(imageID string, artifactInfo types.ArtifactInfo) error
- func (c RemoteCache) PutBlob(diffID string, blobInfo types.BlobInfo) error
- type RemoteOptions
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDir ¶ added in v0.53.0
func DefaultDir() string
DefaultDir returns/creates the cache-dir to be used for trivy operations
func GetTLSConfig ¶ added in v0.53.0
GetTLSConfig gets tls config from CA, Cert and Key file
Types ¶
type ArtifactCache ¶ added in v0.53.0
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) // DeleteBlobs removes blobs by IDs DeleteBlobs(blobIDs []string) error }
ArtifactCache uses local or remote cache
type ArtifactCacheDeleteBlobsArgs ¶ added in v0.53.0
type ArtifactCacheDeleteBlobsExpectation ¶ added in v0.53.0
type ArtifactCacheDeleteBlobsExpectation struct { Args ArtifactCacheDeleteBlobsArgs Returns ArtifactCacheDeleteBlobsReturns }
type ArtifactCacheDeleteBlobsReturns ¶ added in v0.53.0
type ArtifactCacheDeleteBlobsReturns struct {
// contains filtered or unexported fields
}
type ArtifactCacheMissingBlobsArgs ¶ added in v0.53.0
type ArtifactCacheMissingBlobsExpectation ¶ added in v0.53.0
type ArtifactCacheMissingBlobsExpectation struct { Args ArtifactCacheMissingBlobsArgs Returns ArtifactCacheMissingBlobsReturns }
type ArtifactCacheMissingBlobsReturns ¶ added in v0.53.0
type ArtifactCachePutArtifactArgs ¶ added in v0.53.0
type ArtifactCachePutArtifactArgs struct { ArtifactID string ArtifactIDAnything bool ArtifactInfo types.ArtifactInfo ArtifactInfoAnything bool }
type ArtifactCachePutArtifactExpectation ¶ added in v0.53.0
type ArtifactCachePutArtifactExpectation struct { Args ArtifactCachePutArtifactArgs Returns ArtifactCachePutArtifactReturns }
type ArtifactCachePutArtifactReturns ¶ added in v0.53.0
type ArtifactCachePutArtifactReturns struct {
Err error
}
type ArtifactCachePutBlobArgs ¶ added in v0.53.0
type ArtifactCachePutBlobExpectation ¶ added in v0.53.0
type ArtifactCachePutBlobExpectation struct { Args ArtifactCachePutBlobArgs Returns ArtifactCachePutBlobReturns }
type ArtifactCachePutBlobReturns ¶ added in v0.53.0
type ArtifactCachePutBlobReturns struct {
Err error
}
type Cache ¶ added in v0.53.0
type Cache interface { ArtifactCache LocalArtifactCache }
type CacheClearExpectation ¶ added in v0.53.0
type CacheClearExpectation struct {
Returns CacheClearReturns
}
type CacheClearReturns ¶ added in v0.53.0
type CacheClearReturns struct {
Err error
}
type CacheCloseExpectation ¶ added in v0.53.0
type CacheCloseExpectation struct {
Returns CacheCloseReturns
}
type CacheCloseReturns ¶ added in v0.53.0
type CacheCloseReturns struct {
Err error
}
type CacheDeleteBlobArgs ¶ added in v0.53.0
type CacheDeleteBlobExpectation ¶ added in v0.53.0
type CacheDeleteBlobExpectation struct { Args CacheDeleteBlobArgs Returns CacheDeleteBlobReturns }
type CacheDeleteBlobReturns ¶ added in v0.53.0
type CacheDeleteBlobReturns struct {
// contains filtered or unexported fields
}
type CacheGetArtifactArgs ¶ added in v0.53.0
type CacheGetArtifactExpectation ¶ added in v0.53.0
type CacheGetArtifactExpectation struct { Args CacheGetArtifactArgs Returns CacheGetArtifactReturns }
type CacheGetArtifactReturns ¶ added in v0.53.0
type CacheGetArtifactReturns struct { ArtifactInfo types.ArtifactInfo Err error }
type CacheGetBlobArgs ¶ added in v0.53.0
type CacheGetBlobExpectation ¶ added in v0.53.0
type CacheGetBlobExpectation struct { Args CacheGetBlobArgs Returns CacheGetBlobReturns }
type CacheGetBlobReturns ¶ added in v0.53.0
type CacheMissingBlobsArgs ¶ added in v0.53.0
type CacheMissingBlobsExpectation ¶ added in v0.53.0
type CacheMissingBlobsExpectation struct { Args CacheMissingBlobsArgs Returns CacheMissingBlobsReturns }
type CacheMissingBlobsReturns ¶ added in v0.53.0
type CachePutArtifactArgs ¶ added in v0.53.0
type CachePutArtifactArgs struct { ArtifactID string ArtifactIDAnything bool ArtifactInfo types.ArtifactInfo ArtifactInfoAnything bool }
type CachePutArtifactExpectation ¶ added in v0.53.0
type CachePutArtifactExpectation struct { Args CachePutArtifactArgs Returns CachePutArtifactReturns }
type CachePutArtifactReturns ¶ added in v0.53.0
type CachePutArtifactReturns struct {
Err error
}
type CachePutBlobArgs ¶ added in v0.53.0
type CachePutBlobExpectation ¶ added in v0.53.0
type CachePutBlobExpectation struct { Args CachePutBlobArgs Returns CachePutBlobReturns }
type CachePutBlobReturns ¶ added in v0.53.0
type CachePutBlobReturns struct {
Err error
}
type FSCache ¶ added in v0.53.0
type FSCache struct {
// contains filtered or unexported fields
}
func NewFSCache ¶ added in v0.53.0
func (FSCache) DeleteBlobs ¶ added in v0.53.0
DeleteBlobs removes blobs by IDs
func (FSCache) GetArtifact ¶ added in v0.53.0
func (fs FSCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
GetArtifact gets artifact information such as image metadata from local cache
func (FSCache) GetBlob ¶ added in v0.53.0
GetBlob gets blob information such as layer data from local cache
func (FSCache) MissingBlobs ¶ added in v0.53.0
MissingBlobs returns missing blob IDs such as layer IDs
func (FSCache) PutArtifact ¶ added in v0.53.0
func (fs FSCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) (err error)
PutArtifact stores artifact information such as image metadata in local cache
type LocalArtifactCache ¶ added in v0.53.0
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 ¶ added in v0.53.0
type LocalArtifactCacheClearExpectation struct {
Returns LocalArtifactCacheClearReturns
}
type LocalArtifactCacheClearReturns ¶ added in v0.53.0
type LocalArtifactCacheClearReturns struct {
Err error
}
type LocalArtifactCacheCloseExpectation ¶ added in v0.53.0
type LocalArtifactCacheCloseExpectation struct {
Returns LocalArtifactCacheCloseReturns
}
type LocalArtifactCacheCloseReturns ¶ added in v0.53.0
type LocalArtifactCacheCloseReturns struct {
Err error
}
type LocalArtifactCacheGetArtifactArgs ¶ added in v0.53.0
type LocalArtifactCacheGetArtifactExpectation ¶ added in v0.53.0
type LocalArtifactCacheGetArtifactExpectation struct { Args LocalArtifactCacheGetArtifactArgs Returns LocalArtifactCacheGetArtifactReturns }
type LocalArtifactCacheGetArtifactReturns ¶ added in v0.53.0
type LocalArtifactCacheGetArtifactReturns struct { ArtifactInfo types.ArtifactInfo Err error }
type LocalArtifactCacheGetBlobArgs ¶ added in v0.53.0
type LocalArtifactCacheGetBlobExpectation ¶ added in v0.53.0
type LocalArtifactCacheGetBlobExpectation struct { Args LocalArtifactCacheGetBlobArgs Returns LocalArtifactCacheGetBlobReturns }
type LocalArtifactCacheGetBlobReturns ¶ added in v0.53.0
type MemoryCache ¶ added in v0.53.0
type MemoryCache struct {
// contains filtered or unexported fields
}
func NewMemoryCache ¶ added in v0.53.0
func NewMemoryCache() *MemoryCache
func (*MemoryCache) Clear ¶ added in v0.53.0
func (c *MemoryCache) Clear() error
Clear clears the artifact and blob information from the memory cache
func (*MemoryCache) Close ¶ added in v0.53.0
func (c *MemoryCache) Close() error
Close clears the artifact and blob information from the memory cache
func (*MemoryCache) DeleteBlobs ¶ added in v0.53.0
func (c *MemoryCache) DeleteBlobs(blobIDs []string) error
DeleteBlobs removes the specified blobs from the memory cache
func (*MemoryCache) GetArtifact ¶ added in v0.53.0
func (c *MemoryCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
GetArtifact retrieves the artifact information from the memory cache
func (*MemoryCache) GetBlob ¶ added in v0.53.0
func (c *MemoryCache) GetBlob(blobID string) (types.BlobInfo, error)
GetBlob retrieves the blob information from the memory cache
func (*MemoryCache) MissingBlobs ¶ added in v0.53.0
MissingBlobs determines the missing artifact and blob information in the memory cache
func (*MemoryCache) PutArtifact ¶ added in v0.53.0
func (c *MemoryCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) error
PutArtifact stores the artifact information in the memory cache
type MockArtifactCache ¶ added in v0.53.0
MockArtifactCache is an autogenerated mock type for the ArtifactCache type
func (*MockArtifactCache) ApplyDeleteBlobsExpectation ¶ added in v0.53.0
func (_m *MockArtifactCache) ApplyDeleteBlobsExpectation(e ArtifactCacheDeleteBlobsExpectation)
func (*MockArtifactCache) ApplyDeleteBlobsExpectations ¶ added in v0.53.0
func (_m *MockArtifactCache) ApplyDeleteBlobsExpectations(expectations []ArtifactCacheDeleteBlobsExpectation)
func (*MockArtifactCache) ApplyMissingBlobsExpectation ¶ added in v0.53.0
func (_m *MockArtifactCache) ApplyMissingBlobsExpectation(e ArtifactCacheMissingBlobsExpectation)
func (*MockArtifactCache) ApplyMissingBlobsExpectations ¶ added in v0.53.0
func (_m *MockArtifactCache) ApplyMissingBlobsExpectations(expectations []ArtifactCacheMissingBlobsExpectation)
func (*MockArtifactCache) ApplyPutArtifactExpectation ¶ added in v0.53.0
func (_m *MockArtifactCache) ApplyPutArtifactExpectation(e ArtifactCachePutArtifactExpectation)
func (*MockArtifactCache) ApplyPutArtifactExpectations ¶ added in v0.53.0
func (_m *MockArtifactCache) ApplyPutArtifactExpectations(expectations []ArtifactCachePutArtifactExpectation)
func (*MockArtifactCache) ApplyPutBlobExpectation ¶ added in v0.53.0
func (_m *MockArtifactCache) ApplyPutBlobExpectation(e ArtifactCachePutBlobExpectation) *mock.Call
func (*MockArtifactCache) ApplyPutBlobExpectations ¶ added in v0.53.0
func (_m *MockArtifactCache) ApplyPutBlobExpectations(expectations []ArtifactCachePutBlobExpectation)
func (*MockArtifactCache) DeleteBlobs ¶ added in v0.53.0
func (_m *MockArtifactCache) DeleteBlobs(blobIDs []string) error
DeleteBlobs provides a mock function with given fields: blobIDs
func (*MockArtifactCache) MissingBlobs ¶ added in v0.53.0
func (_m *MockArtifactCache) MissingBlobs(artifactID string, blobIDs []string) (bool, []string, error)
MissingBlobs provides a mock function with given fields: artifactID, blobIDs
func (*MockArtifactCache) PutArtifact ¶ added in v0.53.0
func (_m *MockArtifactCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) error
PutArtifact provides a mock function with given fields: artifactID, artifactInfo
type MockCache ¶ added in v0.53.0
MockCache is an autogenerated mock type for the Cache type
func (*MockCache) ApplyClearExpectation ¶ added in v0.53.0
func (_m *MockCache) ApplyClearExpectation(e CacheClearExpectation)
func (*MockCache) ApplyClearExpectations ¶ added in v0.53.0
func (_m *MockCache) ApplyClearExpectations(expectations []CacheClearExpectation)
func (*MockCache) ApplyCloseExpectation ¶ added in v0.53.0
func (_m *MockCache) ApplyCloseExpectation(e CacheCloseExpectation)
func (*MockCache) ApplyCloseExpectations ¶ added in v0.53.0
func (_m *MockCache) ApplyCloseExpectations(expectations []CacheCloseExpectation)
func (*MockCache) ApplyDeleteBlobExpectation ¶ added in v0.53.0
func (_m *MockCache) ApplyDeleteBlobExpectation(e CacheDeleteBlobExpectation)
func (*MockCache) ApplyDeleteBlobExpectations ¶ added in v0.53.0
func (_m *MockCache) ApplyDeleteBlobExpectations(expectations []CacheDeleteBlobExpectation)
func (*MockCache) ApplyGetArtifactExpectation ¶ added in v0.53.0
func (_m *MockCache) ApplyGetArtifactExpectation(e CacheGetArtifactExpectation)
func (*MockCache) ApplyGetArtifactExpectations ¶ added in v0.53.0
func (_m *MockCache) ApplyGetArtifactExpectations(expectations []CacheGetArtifactExpectation)
func (*MockCache) ApplyGetBlobExpectation ¶ added in v0.53.0
func (_m *MockCache) ApplyGetBlobExpectation(e CacheGetBlobExpectation)
func (*MockCache) ApplyGetBlobExpectations ¶ added in v0.53.0
func (_m *MockCache) ApplyGetBlobExpectations(expectations []CacheGetBlobExpectation)
func (*MockCache) ApplyMissingBlobsExpectation ¶ added in v0.53.0
func (_m *MockCache) ApplyMissingBlobsExpectation(e CacheMissingBlobsExpectation)
func (*MockCache) ApplyMissingBlobsExpectations ¶ added in v0.53.0
func (_m *MockCache) ApplyMissingBlobsExpectations(expectations []CacheMissingBlobsExpectation)
func (*MockCache) ApplyPutArtifactExpectation ¶ added in v0.53.0
func (_m *MockCache) ApplyPutArtifactExpectation(e CachePutArtifactExpectation)
func (*MockCache) ApplyPutArtifactExpectations ¶ added in v0.53.0
func (_m *MockCache) ApplyPutArtifactExpectations(expectations []CachePutArtifactExpectation)
func (*MockCache) ApplyPutBlobExpectation ¶ added in v0.53.0
func (_m *MockCache) ApplyPutBlobExpectation(e CachePutBlobExpectation)
func (*MockCache) ApplyPutBlobExpectations ¶ added in v0.53.0
func (_m *MockCache) ApplyPutBlobExpectations(expectations []CachePutBlobExpectation)
func (*MockCache) DeleteBlob ¶ added in v0.53.0
DeleteBlob provides a mock function with given fields: blobID
func (*MockCache) GetArtifact ¶ added in v0.53.0
func (_m *MockCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
GetArtifact provides a mock function with given fields: artifactID
func (*MockCache) GetBlob ¶ added in v0.53.0
GetBlob provides a mock function with given fields: blobID
func (*MockCache) MissingBlobs ¶ added in v0.53.0
MissingBlobs provides a mock function with given fields: artifactID, blobIDs
func (*MockCache) PutArtifact ¶ added in v0.53.0
func (_m *MockCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) error
PutArtifact provides a mock function with given fields: artifactID, artifactInfo
type MockLocalArtifactCache ¶ added in v0.53.0
MockLocalArtifactCache is an autogenerated mock type for the LocalArtifactCache type
func (*MockLocalArtifactCache) ApplyClearExpectation ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) ApplyClearExpectation(e LocalArtifactCacheClearExpectation)
func (*MockLocalArtifactCache) ApplyClearExpectations ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) ApplyClearExpectations(expectations []LocalArtifactCacheClearExpectation)
func (*MockLocalArtifactCache) ApplyCloseExpectation ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) ApplyCloseExpectation(e LocalArtifactCacheCloseExpectation)
func (*MockLocalArtifactCache) ApplyCloseExpectations ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) ApplyCloseExpectations(expectations []LocalArtifactCacheCloseExpectation)
func (*MockLocalArtifactCache) ApplyGetArtifactExpectation ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) ApplyGetArtifactExpectation(e LocalArtifactCacheGetArtifactExpectation)
func (*MockLocalArtifactCache) ApplyGetArtifactExpectations ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) ApplyGetArtifactExpectations(expectations []LocalArtifactCacheGetArtifactExpectation)
func (*MockLocalArtifactCache) ApplyGetBlobExpectation ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) ApplyGetBlobExpectation(e LocalArtifactCacheGetBlobExpectation)
func (*MockLocalArtifactCache) ApplyGetBlobExpectations ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) ApplyGetBlobExpectations(expectations []LocalArtifactCacheGetBlobExpectation)
func (*MockLocalArtifactCache) Clear ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) Clear() error
Clear provides a mock function with given fields:
func (*MockLocalArtifactCache) Close ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) Close() error
Close provides a mock function with given fields:
func (*MockLocalArtifactCache) GetArtifact ¶ added in v0.53.0
func (_m *MockLocalArtifactCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
GetArtifact provides a mock function with given fields: artifactID
type NopCache ¶ added in v0.25.0
type NopCache struct{}
func NewNopCache ¶ added in v0.53.0
func NewNopCache() NopCache
func (NopCache) GetArtifact ¶ added in v0.53.0
func (NopCache) GetArtifact(string) (types.ArtifactInfo, error)
type RedisCache ¶ added in v0.53.0
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶ added in v0.53.0
func (RedisCache) Clear ¶ added in v0.53.0
func (c RedisCache) Clear() error
func (RedisCache) Close ¶ added in v0.53.0
func (c RedisCache) Close() error
func (RedisCache) DeleteBlobs ¶ added in v0.53.0
func (c RedisCache) DeleteBlobs(blobIDs []string) error
func (RedisCache) GetArtifact ¶ added in v0.53.0
func (c RedisCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)
func (RedisCache) GetBlob ¶ added in v0.53.0
func (c RedisCache) GetBlob(blobID string) (types.BlobInfo, error)
func (RedisCache) MissingBlobs ¶ added in v0.53.0
func (RedisCache) PutArtifact ¶ added in v0.53.0
func (c RedisCache) PutArtifact(artifactID string, artifactConfig types.ArtifactInfo) error
type RedisOptions ¶ added in v0.53.0
type RedisOptions struct { Backend string TLS bool TLSOptions RedisTLSOptions }
func NewRedisOptions ¶ added in v0.53.0
func NewRedisOptions(backend, caCert, cert, key string, enableTLS bool) (RedisOptions, error)
func (*RedisOptions) BackendMasked ¶ added in v0.53.0
func (o *RedisOptions) BackendMasked() string
BackendMasked returns the redis connection string masking credentials
type RedisTLSOptions ¶ added in v0.53.0
RedisTLSOptions holds the options for redis cache
func NewRedisTLSOptions ¶ added in v0.53.0
func NewRedisTLSOptions(caCert, cert, key string) (RedisTLSOptions, error)
type RemoteCache ¶
type RemoteCache struct {
// contains filtered or unexported fields
}
RemoteCache implements remote cache
func NewRemoteCache ¶
func NewRemoteCache(opts RemoteOptions) *RemoteCache
NewRemoteCache is the factory method for RemoteCache
func (RemoteCache) DeleteBlobs ¶ added in v0.25.0
func (c RemoteCache) DeleteBlobs(blobIDs []string) error
DeleteBlobs removes blobs by IDs from RemoteCache
func (RemoteCache) MissingBlobs ¶ added in v0.9.0
MissingBlobs fetches missing blobs from RemoteCache
func (RemoteCache) PutArtifact ¶ added in v0.9.0
func (c RemoteCache) PutArtifact(imageID string, artifactInfo types.ArtifactInfo) error
PutArtifact sends artifact to remote client