Compare commits

..
Author SHA1 Message Date
phoenix 85069f366c bump: rust ci
simodels Build / Rustfmt (pull_request) Successful in 56s
labyrinth release Tagging / release (pull_request) Successful in 1m24s
simodels Build / Clippy (pull_request) Failing after 1m50s
simodels Build / Check (pull_request) Successful in 2m2s
simodels Build / Test Suite (pull_request) Successful in 2m9s
simodels Build / build (pull_request) Successful in 2m11s
2026-10-08 18:48:44 -04:00
phoenix 824e49da88 bump: labyrinth 2026-10-08 18:48:33 -04:00
phoenix 4cfdaa7cbd bump: uuid 2026-10-08 18:47:25 -04:00
phoenix f4d8465b8c bump: aws-sdk-s3 2026-10-08 18:46:33 -04:00
phoenix 91876ae7f4 bump: aws-config 2026-10-08 18:45:24 -04:00
3 changed files with 297 additions and 322 deletions

No files matched your search

Generated
+285 -310
View File
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -1,13 +1,13 @@
[package] [package]
name = "labyrinth" name = "labyrinth"
version = "0.0.7" version = "0.0.6"
edition = "2024" edition = "2024"
license = "MIT" license = "MIT"
description = "Library for managing soaricarus storage" description = "Library for managing soaricarus storage"
[dependencies] [dependencies]
aws-config = { version = "1.13.0", features = ["behavior-version-latest"] } aws-config = { version = "1.12.0", features = ["behavior-version-latest"] }
aws-sdk-s3 = { version = "1.157.0" } aws-sdk-s3 = { version = "1.152.0" }
time = "0.3.55" time = "0.3.55"
tokio = { version = "1.54.1", features = ["full"] } tokio = { version = "1.53.1", features = ["full"] }
uuid = "1.27.0" uuid = "1.27.0"
+8 -8
View File
@@ -52,12 +52,12 @@ impl Labyrinth {
&self, &self,
file_key: &str, file_key: &str,
data: &Data, data: &Data,
) -> Result<aws_sdk_s3::operation::put_object::PutObjectOutput, Box<Error>> { ) -> Result<aws_sdk_s3::operation::put_object::PutObjectOutput, Error> {
let client = init_client(&self.config).await; let client = init_client(&self.config).await;
let data_content = if data.raw_data.is_empty() { let data_content = if data.raw_data.is_empty() {
match load_data(&data.filepath).await { match load_data(&data.filepath).await {
Ok(content) => content, Ok(content) => content,
Err(err) => return Err(Box::new(Error::Info(err.to_string()))), Err(err) => return Err(Error::Info(err.to_string())),
} }
} else { } else {
data.raw_data.to_owned() data.raw_data.to_owned()
@@ -74,12 +74,12 @@ impl Labyrinth {
.await .await
{ {
Ok(response) => Ok(response), Ok(response) => Ok(response),
Err(err) => Err(Box::new(Error::Info(err.to_string()))), Err(err) => Err(Error::Info(err.to_string())),
} }
} }
/// Download object from the bucket /// Download object from the bucket
pub async fn download(&self, file_key: &str) -> Result<Vec<u8>, Box<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;
match client match client
@@ -99,10 +99,10 @@ impl Labyrinth {
let raw_data = bytes.to_vec(); let raw_data = bytes.to_vec();
Ok(raw_data) Ok(raw_data)
} }
Err(err) => Err(Box::new(Error::Info(err.to_string()))), Err(err) => Err(Error::Info(err.to_string())),
} }
} }
Err(err) => Err(Box::new(Error::Info(err.to_string()))), Err(err) => Err(Error::Info(err.to_string())),
} }
} }
@@ -110,7 +110,7 @@ impl Labyrinth {
pub async fn delete( pub async fn delete(
&self, &self,
file_key: &str, file_key: &str,
) -> Result<aws_sdk_s3::operation::delete_object::DeleteObjectOutput, Box<Error>> { ) -> Result<aws_sdk_s3::operation::delete_object::DeleteObjectOutput, Error> {
let client = init_client(&self.config).await; let client = init_client(&self.config).await;
match client match client
@@ -121,7 +121,7 @@ impl Labyrinth {
.await .await
{ {
Ok(response) => Ok(response), Ok(response) => Ok(response),
Err(err) => Err(Box::new(Error::Info(err.to_string()))), Err(err) => Err(Error::Info(err.to_string())),
} }
} }
} }