FileDatabase refactor for normalization and consistency

This commit is contained in:
daniel-c-harvey
2025-09-04 16:26:10 -04:00
parent e82366e47f
commit 6fefcbcfb5
24 changed files with 3069 additions and 186 deletions
+34 -1
View File
@@ -1,7 +1,7 @@
namespace DeepDrftContent.FileDatabase.Models;
/// <summary>
/// Base interface for all index types
/// Base interface for all index types - minimal contract
/// </summary>
public interface IIndex
{
@@ -9,7 +9,13 @@ public interface IIndex
/// Gets the key identifier for this index
/// </summary>
string GetKey();
}
/// <summary>
/// Interface for indexes that support entry queries
/// </summary>
public interface IEntryQueryable : IIndex
{
/// <summary>
/// Gets all entry keys in this index
/// </summary>
@@ -25,3 +31,30 @@ public interface IIndex
/// </summary>
bool HasEntry(EntryKey entryKey);
}
/// <summary>
/// Interface for indexes that support directory operations
/// </summary>
public interface IDirectoryIndex : IEntryQueryable
{
/// <summary>
/// Adds an entry to the directory index
/// </summary>
void PutEntry(EntryKey entryKey);
}
/// <summary>
/// Interface for indexes that support vault operations with metadata
/// </summary>
public interface IVaultIndex : IEntryQueryable
{
/// <summary>
/// Gets metadata for a specific entry
/// </summary>
MetaData? GetEntry(EntryKey entryKey);
/// <summary>
/// Adds an entry with metadata to the vault index
/// </summary>
void PutEntry(EntryKey entryKey, MetaData metaData);
}