Open
Conversation
Contributor
Author
|
#9 для тикета переименовал клиента в S3BucketClient
public interface IS3BucketClient: IBucketOperations, IFileOperations
{
string Bucket { get; }
Uri Endpoint { get; }
}
public interface IBucketOperations
{
Task<bool> CreateBucket(CancellationToken ct);
Task<bool> DeleteBucket(CancellationToken ct);
Task<bool> IsBucketExists(CancellationToken ct);
}
public interface IFileOperations
{
string BuildFileUrl(string fileName, TimeSpan expiration);
Task DeleteFile(string fileName, CancellationToken ct);
Task<S3File> GetFile(string fileName, CancellationToken ct);
Task<Stream> GetFileStream(string fileName, CancellationToken ct);
Task<string?> GetFileUrl(string fileName, TimeSpan expiration, CancellationToken ct);
Task<bool> IsFileExists(string fileName, CancellationToken ct);
IAsyncEnumerable<string> List(string? prefix, CancellationToken ct);
Task<bool> UploadFile(string fileName, string contentType, byte[] data, CancellationToken ct);
Task<S3Upload> UploadFile(string fileName, string contentType, CancellationToken ct);
Task<bool> UploadFile(string fileName, string contentType, Stream data, CancellationToken ct);
}
[Obsolete("Use S3BucketClient instead.")]
public sealed class S3Client(S3Settings settings, HttpClient? client = null, IArrayPool? arrayProvider = null)
: S3BucketClient(client ?? new HttpClient(), settings.MapToBucketSettings(), arrayProvider)
{
} |
Contributor
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.