Generated response

This commit is contained in:
2026-05-14 19:53:26 +02:00
parent 7aef20fe71
commit deb4bfda90
33 changed files with 1555 additions and 102 deletions
@@ -17,6 +17,10 @@ namespace Musify.Application.Abstractions.Infrastructure
DbSet<Upload> Uploads { get; }
DbSet<UploadIntent> UploadIntents { get; }
Task<IDatabaseTransaction> BeginTransactionAsync(System.Data.IsolationLevel isolationLevel, CancellationToken cancellationToken);
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
}
}
@@ -0,0 +1,7 @@
namespace Musify.Application.Abstractions.Infrastructure
{
public interface IDatabaseTransaction : IAsyncDisposable
{
Task CommitAsync(CancellationToken cancellationToken = default);
}
}
@@ -4,6 +4,9 @@
{
Task<Stream> GetFileAsync(string bucket, string key, CancellationToken cancellationToken);
// Returns null if the object does not exist
Task<ObjectMetadata?> HeadObjectAsync(string bucket, string key, CancellationToken cancellationToken);
Task<string> GetUrlAsync(string bucket, string key, TimeSpan ExpirationTime, CancellationToken cancellationToken);
Task<string> GetUploadUrlAsync(string bucket, string key, string contentType, TimeSpan expirationTime, CancellationToken cancellationToken);
@@ -20,5 +23,8 @@
CancellationToken cancellationToken);
Task RemoveFolderAsync(string bucket, string folderKey, CancellationToken cancellationToken);
// Returns (key, lastModifiedUtc) for all objects under the given prefix
IAsyncEnumerable<(string Key, DateTime LastModifiedUtc)> ListObjectsAsync(string bucket, string prefix, CancellationToken cancellationToken);
}
}
@@ -0,0 +1,4 @@
namespace Musify.Application.Abstractions.Infrastructure
{
public record ObjectMetadata(string ContentType, long ContentLength);
}