Files
deepdrft/DeepDrftContent.Data/FileDatabase/Models/IIndex.cs
T
Daniel Harvey cd700dc758 feat(data): rename *.Services projects, lift TrackEntity onto BlazorBlocks data layer, regenerate initial Postgres migration
DeepDrftWeb.Services → DeepDrftData; DeepDrftContent.Services → DeepDrftContent.Data.
TrackEntity:BaseEntity, TrackRepository:Repository<>, TrackManager:Manager<>+ITrackService.
Drops DeepDrftModels PagingParameters/PagedResult in favour of Models.Common.* from BlazorBlocks.
InitialCreate migration captures full schema including is_deleted index.
2026-05-18 22:22:09 -04:00

67 lines
1.6 KiB
C#

namespace DeepDrftContent.Data.FileDatabase.Models;
/// <summary>
/// Base interface for all index types - minimal contract
/// </summary>
public interface IIndex
{
/// <summary>
/// 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 IDs in this index
/// </summary>
IReadOnlyList<string> GetEntries();
/// <summary>
/// Gets the number of entries in this index
/// </summary>
int GetEntriesSize();
/// <summary>
/// Checks if the index contains the specified entry ID
/// </summary>
bool HasEntry(string entryId);
}
/// <summary>
/// Interface for indexes that support directory operations
/// </summary>
public interface IDirectoryIndex : IEntryQueryable
{
/// <summary>
/// Adds an entry to the directory index
/// </summary>
void PutEntry(string entryId);
}
/// <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(string entryId);
/// <summary>
/// Adds an entry with metadata to the vault index
/// </summary>
void PutEntry(string entryId, MetaData metaData);
/// <summary>
/// Removes an entry (and its metadata) from the vault index.
/// Returns true if an entry was removed, false if it was not present.
/// </summary>
bool RemoveEntry(string entryId);
}