.NET 10 solution for Ping, a Discord style chat app: Domain, Application and Infrastructure projects plus the Api host. SignalR for chat and presence, LiveKit for call tokens, EF Core on Postgres, S3 compatible storage for attachments, and OIDC auth shared with the Musify Zitadel instance. Includes the Compose stack for local development.
22 lines
773 B
C#
22 lines
773 B
C#
namespace Ping.Application.Contracts
|
|
{
|
|
public interface IStorageService
|
|
{
|
|
Task<Stream> GetFileAsync(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<ObjectMetaData?> HeadObjectAsync(string bucket, string key, CancellationToken cancellationToken);
|
|
|
|
Task RemoveFileAsync(string bucket, string key, CancellationToken cancellationToken);
|
|
}
|
|
}
|