using Microsoft.Extensions.Logging;
using DomainResults.Common;
using MongoDB.Driver;
using DataProviders.Abstractions;
namespace DataProviders.Buckets {
///
///
///
public class SpecificBucketDataProviderBase : BucketDataProviderBase {
private readonly string _bucketName;
///
///
///
///
///
public SpecificBucketDataProviderBase(
ILogger logger,
IMongoClient client,
string bucketName
) : base(logger, client) {
_bucketName = bucketName;
}
///
///
///
///
///
///
///
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);
}
}