mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-13 06:10:31 +00:00
feat: add Docker image metadata support
- Store metadata (.meta.json) alongside manifests with: - push_timestamp, last_pulled, downloads counter - size_bytes, os, arch, variant - layers list with digest and size - Update metadata on manifest pull (increment downloads, update last_pulled) - Extract OS/arch from config blob on push - Extend UI API TagInfo with metadata fields - Add public_url config option for pull commands - Add Docker upstream proxy with auth support - Add raw repository support - Bump version to 0.2.12
This commit is contained in:
@@ -39,6 +39,7 @@ pub type Result<T> = std::result::Result<T, StorageError>;
|
||||
pub trait StorageBackend: Send + Sync {
|
||||
async fn put(&self, key: &str, data: &[u8]) -> Result<()>;
|
||||
async fn get(&self, key: &str) -> Result<Bytes>;
|
||||
async fn delete(&self, key: &str) -> Result<()>;
|
||||
async fn list(&self, prefix: &str) -> Vec<String>;
|
||||
async fn stat(&self, key: &str) -> Option<FileMeta>;
|
||||
async fn health_check(&self) -> bool;
|
||||
@@ -74,6 +75,11 @@ impl Storage {
|
||||
self.inner.get(key).await
|
||||
}
|
||||
|
||||
pub async fn delete(&self, key: &str) -> Result<()> {
|
||||
validate_storage_key(key)?;
|
||||
self.inner.delete(key).await
|
||||
}
|
||||
|
||||
pub async fn list(&self, prefix: &str) -> Vec<String> {
|
||||
// Empty prefix is valid for listing all
|
||||
if !prefix.is_empty() && validate_storage_key(prefix).is_err() {
|
||||
|
||||
Reference in New Issue
Block a user