using Microsoft.Extensions.Logging;
using DomainResults.Common;
using MongoDB.Driver;
using DataProviders.Abstractions;
namespace DataProviders.Buckets {
///
///
///
public class ImagesBucketDataProvider : BucketDataProviderBase, IBucketDataProvider {
private const string _bucketName = "images";
///
///
///
///
///
public ImagesBucketDataProvider(
ILogger logger,
IMongoClient client
) : base(logger, client) { }
///
///
///
///
///
///
///
public (Guid?, IDomainResult) Upload(Guid siteId, Guid userId, BucketFile file) => Upload(siteId, userId, file, _bucketName);
///
///
///
///
///
///
///
public (List?, IDomainResult) UploadMany(Guid siteId, Guid userId, List files) => UploadMany(siteId, userId, files, _bucketName);
///
///
///
///
///
///
///
public (BucketFile?, IDomainResult) Download(Guid siteId, Guid userId, Guid fileId) => Download(siteId, userId, fileId, _bucketName);
///
///
///
///
///
///
///
public IDomainResult DeleteOne(Guid siteId, Guid userId, Guid fileId) => DeleteOne(siteId, userId, fileId, _bucketName);
///
///
///
///
///
///
public IDomainResult DeletMany(Guid siteId, Guid userId) => DeleteMany(siteId, userId, _bucketName);
}
}