Compare commits

..
Author SHA1 Message Date
phoenix 2b6127f6a6 Code formatting
simodels Build / Rustfmt (pull_request) Successful in 1m54s
labyrinth release Tagging / release (pull_request) Successful in 1m54s
simodels Build / Clippy (pull_request) Successful in 2m30s
simodels Build / Test Suite (pull_request) Successful in 2m52s
simodels Build / build (pull_request) Successful in 2m53s
simodels Build / Check (pull_request) Successful in 2m56s
2026-08-10 17:16:18 -04:00
phoenix 8464401337 Adding code to download from the bucket 2026-08-10 17:14:48 -04:00
phoenix 7db41e190e Adding license
labyrinth release Tagging / release (pull_request) Successful in 3m4s
simodels Build / Check (pull_request) Successful in 3m27s
simodels Build / Test Suite (pull_request) Successful in 3m32s
simodels Build / Rustfmt (pull_request) Successful in 4m42s
simodels Build / Clippy (pull_request) Failing after 4m52s
simodels Build / build (pull_request) Successful in 5m8s
2026-08-10 16:51:59 -04:00
phoenix 966aad363b ci: Adding workflow 2026-08-10 16:51:52 -04:00
3 changed files with 2 additions and 23 deletions
Generated
+1 -1
View File
@@ -1370,7 +1370,7 @@ dependencies = [
[[package]] [[package]]
name = "labyrinth" name = "labyrinth"
version = "0.0.4" version = "0.0.2"
dependencies = [ dependencies = [
"aws-config", "aws-config",
"aws-sdk-s3", "aws-sdk-s3",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "labyrinth" name = "labyrinth"
version = "0.0.4" version = "0.0.2"
edition = "2024" edition = "2024"
license = "MIT" license = "MIT"
description = "Library for managing soaricarus storage" description = "Library for managing soaricarus storage"
-21
View File
@@ -47,7 +47,6 @@ pub enum Error {
} }
impl Labyrinth { impl Labyrinth {
/// Upload object to the bucket
pub async fn upload( pub async fn upload(
&self, &self,
file_key: &str, file_key: &str,
@@ -78,7 +77,6 @@ impl Labyrinth {
} }
} }
/// Download object from the bucket
pub async fn download(&self, file_key: &str) -> Result<Vec<u8>, Error> { pub async fn download(&self, file_key: &str) -> Result<Vec<u8>, Error> {
let client = init_client(&self.config).await; let client = init_client(&self.config).await;
@@ -105,23 +103,4 @@ impl Labyrinth {
Err(err) => Err(Error::Info(err.to_string())), Err(err) => Err(Error::Info(err.to_string())),
} }
} }
/// Delete an object from the bucket
pub async fn delete(
&self,
file_key: &str,
) -> Result<aws_sdk_s3::operation::delete_object::DeleteObjectOutput, Error> {
let client = init_client(&self.config).await;
match client
.delete_object()
.bucket(self.config.bucket.clone())
.key(file_key)
.send()
.await
{
Ok(response) => Ok(response),
Err(err) => Err(Error::Info(err.to_string())),
}
}
} }