using RackPeek.Domain.Resources; using RackPeek.Domain.Resources.Connections; using RackPeek.Domain.Resources.Hardware; using RackPeek.Domain.Resources.Services; using RackPeek.Domain.Resources.SystemResources; namespace RackPeek.Domain.Persistence; public interface IResourceCollection { IReadOnlyList HardwareResources { get; } IReadOnlyList SystemResources { get; } IReadOnlyList ServiceResources { get; } Task AddAsync(Resource resource); Task UpdateAsync(Resource resource); Task DeleteAsync(string name); Task GetByNameAsync(string name); Task GetByNameAsync(string name) where T : Resource; Resource? GetByName(string name); Task Exists(string name); Task GetKind(string? name); Task LoadAsync(); // required for WASM startup Task> GetByTagAsync(string name); public Task> GetTagsAsync(); Task> GetByLabelAsync(string name); public Task> GetLabelsAsync(); Task> GetResourceIpsAsync(); Task> GetAllOfTypeAsync(); Task> GetDependantsAsync(string name); Task Merge(string incomingYaml, MergeMode mode); Task AddConnectionAsync(Connection connection); Task RemoveConnectionAsync(Connection connection); Task RemoveConnectionsForPortAsync(PortReference port); Task> GetConnectionsAsync(); Task> GetConnectionsForResourceAsync(string resource); Task GetConnectionForPortAsync(PortReference port); }