mirror of
https://github.com/project-zot/zot.git
synced 2025-01-06 22:40:28 -05:00
23 lines
530 B
Go
23 lines
530 B
Go
|
package cache
|
||
|
|
||
|
import (
|
||
|
godigest "github.com/opencontainers/go-digest"
|
||
|
)
|
||
|
|
||
|
type Cache interface {
|
||
|
// Returns the human-readable "name" of the driver.
|
||
|
Name() string
|
||
|
|
||
|
// Retrieves the blob matching provided digest.
|
||
|
GetBlob(digest godigest.Digest) (string, error)
|
||
|
|
||
|
// Uploads blob to cachedb.
|
||
|
PutBlob(digest godigest.Digest, path string) error
|
||
|
|
||
|
// Check if blob exists in cachedb.
|
||
|
HasBlob(digest godigest.Digest, path string) bool
|
||
|
|
||
|
// Delete a blob from the cachedb.
|
||
|
DeleteBlob(digest godigest.Digest, path string) error
|
||
|
}
|