zotregistry.dev/zot@v1.4.4-0.20240314164342-eec277e14d20/pkg/storage/cache/cacheinterface.go (about) 1 package cache 2 3 import ( 4 godigest "github.com/opencontainers/go-digest" 5 ) 6 7 type Cache interface { 8 // Returns the human-readable "name" of the driver. 9 Name() string 10 11 // Retrieves the blob matching provided digest. 12 GetBlob(digest godigest.Digest) (string, error) 13 14 // Uploads blob to cachedb. 15 PutBlob(digest godigest.Digest, path string) error 16 17 // Check if blob exists in cachedb. 18 HasBlob(digest godigest.Digest, path string) bool 19 20 // Delete a blob from the cachedb. 21 DeleteBlob(digest godigest.Digest, path string) error 22 23 // UsesRelativePaths returns if cache is storing blobs relative to cache rootDir 24 UsesRelativePaths() bool 25 }