chore: group .NET into backend/ and drop non-.NET test artifacts
- Move all .NET (6 projects, solution, Directory.*.props, nuget.config) into backend/ so the monorepo root can host non-.NET projects later - Remove throwaway test artifacts: player.html, pl.json - Trim dead Flutter rules from .gitignore Build from backend/Musify.slnx: 0 warnings, 0 errors.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace Musify.Application.Contracts
|
||||
{
|
||||
public interface IAudioTranscoderService
|
||||
{
|
||||
Task<int> TranscodeToAudioFileAsync(Stream audioStream, string destinationPath, CancellationToken cancellationToken);
|
||||
|
||||
Task<bool> IsValidAudioFileAsync(string filePath, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Musify.Domain.Entities;
|
||||
|
||||
namespace Musify.Application.Contracts
|
||||
{
|
||||
public interface IDatabase
|
||||
{
|
||||
DbSet<User> Users { get; }
|
||||
|
||||
DbSet<PlayList> PlayLists { get; }
|
||||
|
||||
DbSet<Track> Tracks { get; }
|
||||
|
||||
DbSet<UserHasTrack> UserHasTracks { get; }
|
||||
|
||||
DbSet<PlayListHasTrack> PlayListHasTracks { get; }
|
||||
|
||||
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.Contracts
|
||||
{
|
||||
public interface IDatabaseTransaction : IAsyncDisposable
|
||||
{
|
||||
Task CommitAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Musify.Application.Contracts
|
||||
{
|
||||
public interface IEventBus
|
||||
{
|
||||
Task PublishAsync<T>(T message, CancellationToken cancellationToken) where T : class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Musify.Application.Contracts
|
||||
{
|
||||
public interface IPictureService
|
||||
{
|
||||
Task<Stream> ResizePictureAsWebpAsync(Stream pictureStream, int width, int height, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace Musify.Application.Contracts
|
||||
{
|
||||
public interface IStorageService
|
||||
{
|
||||
Task<Stream> GetFileAsync(string bucket, string key, CancellationToken cancellationToken);
|
||||
|
||||
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, bool preventOverwrite = true);
|
||||
|
||||
Task UploadFileAsync(string filePath, string bucket, string key, CancellationToken cancellationToken);
|
||||
|
||||
Task UploadFileAsync(Stream sourceStream, string contentType, string bucket, string key, CancellationToken cancellationToken);
|
||||
|
||||
Task TransferFilesAsync(string sourceDirectory, string bucket, string route, CancellationToken cancellationToken);
|
||||
|
||||
Task RemoveFileAsync(string bucket, string key, CancellationToken cancellationToken);
|
||||
|
||||
Task CopyFileAsync(string sourceBucket, string sourceKey, string destinationBucket, string destinationKey,
|
||||
CancellationToken cancellationToken);
|
||||
|
||||
Task RemoveFolderAsync(string bucket, string folderKey, CancellationToken cancellationToken);
|
||||
|
||||
IAsyncEnumerable<StorageObject> ListObjectsAsync(string bucket, string prefix, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Musify.Application.Contracts
|
||||
{
|
||||
public interface IStreamTicketService
|
||||
{
|
||||
StreamTicket IssueTicket(long userId, string keyPrefix);
|
||||
}
|
||||
|
||||
public record StreamTicket(string Token, int ExpiresInSeconds);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace Musify.Application.Contracts
|
||||
{
|
||||
public record ObjectMetaData(string ContentType, long ContentLength);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace Musify.Application.Contracts
|
||||
{
|
||||
public record StorageObject(string Key, DateTime LastModifiedUtc);
|
||||
}
|
||||
Reference in New Issue
Block a user