mirror of
https://github.com/jcreek/Creek.FileRepository.git
synced 2026-07-12 18:33:43 +00:00
feat(*): Add base implementations of all repositories
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using FileRepository.Models;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FileRepository.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// The repository implementation for Disk.
|
||||
/// </summary>
|
||||
internal class DiskRepository : IFileRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialises a new instance of the <see cref="DiskRepository"/> class with configuration.
|
||||
/// </summary>
|
||||
/// <param name="config">The configuration to initialise the repository with.</param>
|
||||
internal DiskRepository(IConfiguration config)
|
||||
{
|
||||
//this.host = config["DiskRepository:host"];
|
||||
}
|
||||
|
||||
public async Task<string> CreateFileAsync(RepoFile file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteFileAsync(string filename)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<RepoFile> ReadFileAsync(string filename)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateFileAsync(RepoFile file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using FileRepository.Models;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FileRepository.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// The repository implementation for MongoDb.
|
||||
/// </summary>
|
||||
internal class MongoDbRepository : IFileRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialises a new instance of the <see cref="MongoDbRepository"/> class with configuration.
|
||||
/// </summary>
|
||||
/// <param name="config">The configuration to initialise the repository with.</param>
|
||||
internal MongoDbRepository(IConfiguration config)
|
||||
{
|
||||
//this.host = config["MongoDbRepository:host"];
|
||||
}
|
||||
|
||||
public async Task<string> CreateFileAsync(RepoFile file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteFileAsync(string filename)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<RepoFile> ReadFileAsync(string filename)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateFileAsync(RepoFile file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using FileRepository.Models;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FileRepository.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// The repository implementation for S3.
|
||||
/// </summary>
|
||||
internal class S3Repository : IFileRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialises a new instance of the <see cref="S3Repository"/> class with configuration.
|
||||
/// </summary>
|
||||
/// <param name="config">The configuration to initialise the repository with.</param>
|
||||
internal S3Repository(IConfiguration config)
|
||||
{
|
||||
//this.host = config["S3Repository:host"];
|
||||
}
|
||||
|
||||
public async Task<string> CreateFileAsync(RepoFile file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteFileAsync(string filename)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<RepoFile> ReadFileAsync(string filename)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateFileAsync(RepoFile file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using FileRepository.Models;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FileRepository.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// The repository implementation for SQL.
|
||||
/// </summary>
|
||||
internal class SqlRepository : IFileRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialises a new instance of the <see cref="SqlRepository"/> class with configuration.
|
||||
/// </summary>
|
||||
/// <param name="config">The configuration to initialise the repository with.</param>
|
||||
internal SqlRepository(IConfiguration config)
|
||||
{
|
||||
//this.host = config["SqlRepository:host"];
|
||||
}
|
||||
|
||||
public async Task<string> CreateFileAsync(RepoFile file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteFileAsync(string filename)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<RepoFile> ReadFileAsync(string filename)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateFileAsync(RepoFile file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user