You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
using StabilityMatrix.Core.Models; |
|
using StabilityMatrix.Core.Models.Database; |
|
|
|
namespace StabilityMatrix.Core.Services; |
|
|
|
public interface IModelIndexService |
|
{ |
|
Dictionary<SharedFolderType, List<LocalModelFile>> ModelIndex { get; } |
|
|
|
/// <summary> |
|
/// Refreshes the local model file index. |
|
/// </summary> |
|
Task RefreshIndex(); |
|
|
|
/// <summary> |
|
/// Starts a background task to refresh the local model file index. |
|
/// </summary> |
|
void BackgroundRefreshIndex(); |
|
|
|
/// <summary> |
|
/// Get all models of the specified type from the existing (in-memory) index. |
|
/// </summary> |
|
IEnumerable<LocalModelFile> GetFromModelIndex(SharedFolderType types); |
|
|
|
/// <summary> |
|
/// Find all models of the specified SharedFolderType. |
|
/// </summary> |
|
Task<IEnumerable<LocalModelFile>> FindAsync(SharedFolderType type); |
|
|
|
/// <summary> |
|
/// Find all models with the specified Blake3 hash. |
|
/// </summary> |
|
Task<IEnumerable<LocalModelFile>> FindByHashAsync(string hashBlake3); |
|
|
|
/// <summary> |
|
/// Remove a model from the index. |
|
/// </summary> |
|
Task<bool> RemoveModelAsync(LocalModelFile model); |
|
}
|
|
|