Remove S3 + encryption
All checks were successful
All checks were successful
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use pile_io::{AsyncReader, AsyncSeekReader, S3Reader, chacha::ChaChaReaderv1Async};
|
||||
use pile_io::{AsyncReader, AsyncSeekReader};
|
||||
use std::{fs::File, io::Seek};
|
||||
|
||||
//
|
||||
@@ -7,16 +7,12 @@ use std::{fs::File, io::Seek};
|
||||
|
||||
pub enum ItemReader {
|
||||
File(File),
|
||||
S3(S3Reader),
|
||||
EncryptedS3(ChaChaReaderv1Async<S3Reader>),
|
||||
}
|
||||
|
||||
impl AsyncReader for ItemReader {
|
||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, std::io::Error> {
|
||||
match self {
|
||||
Self::File(x) => std::io::Read::read(x, buf),
|
||||
Self::S3(x) => x.read(buf).await,
|
||||
Self::EncryptedS3(x) => x.read(buf).await,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,8 +21,6 @@ impl AsyncSeekReader for ItemReader {
|
||||
async fn seek(&mut self, pos: std::io::SeekFrom) -> Result<u64, std::io::Error> {
|
||||
match self {
|
||||
Self::File(x) => x.seek(pos),
|
||||
Self::S3(x) => x.seek(pos).await,
|
||||
Self::EncryptedS3(x) => x.seek(pos).await,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user