Compare commits

..
Author SHA1 Message Date
phoenix 4ea5587777 bump: labyrinth
labyrinth release Tagging / release (pull_request) Successful in 21s
simodels Build / Rustfmt (pull_request) Successful in 31s
simodels Build / Clippy (pull_request) Successful in 1m13s
simodels Build / Check (pull_request) Successful in 1m16s
simodels Build / Test Suite (pull_request) Successful in 1m24s
simodels Build / build (pull_request) Successful in 1m26s
2026-10-30 18:29:42 -04:00
phoenix 2fb0d7c8e8 cargo update 2026-10-30 18:29:23 -04:00
phoenix af911a9531 bump: aws-config 2026-10-30 18:27:14 -04:00
phoenix 11246bcb35 bump: aws-sdk-s3 2026-10-30 18:26:44 -04:00
phoenix d35ad2f482 bump: tokio
simodels Build / Rustfmt (pull_request) Successful in 19s
labyrinth release Tagging / release (pull_request) Successful in 25s
simodels Build / Clippy (pull_request) Successful in 1m14s
simodels Build / build (pull_request) Successful in 1m24s
simodels Build / Check (pull_request) Successful in 1m32s
simodels Build / Test Suite (pull_request) Successful in 1m55s
2026-10-30 18:17:01 -04:00
phoenix b9a40a20dd Update rust (#4)
labyrinth release Tagging / release (push) Successful in 38s
simodels Build / build (push) Successful in 52s
simodels Build / Rustfmt (push) Successful in 1m15s
simodels Build / Check (push) Successful in 1m51s
simodels Build / Clippy (push) Successful in 1m52s
simodels Build / Test Suite (push) Successful in 2m15s
Reviewed-on: http://git.kundeng.us/phoenix/labyrinth/pulls/4
2026-10-09 13:00:25 -04:00
5 changed files with 335 additions and 330 deletions

No files matched your search

+5 -5
View File
@@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.99
- uses: Swatinem/rust-cache@v2
- run: cargo check
@@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.99
- uses: Swatinem/rust-cache@v2
- run: cargo test
@@ -43,7 +43,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.99
- uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
@@ -55,7 +55,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.99
- uses: Swatinem/rust-cache@v2
- run: rustup component add clippy
- run: cargo clippy -- -D warnings
@@ -67,7 +67,7 @@ jobs:
- uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.97
toolchain: 1.99
- uses: Swatinem/rust-cache@v2
- run: cargo build
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.97
toolchain: 1.99
components: cargo
- uses: Swatinem/rust-cache@v2
Generated
+316 -311
View File
File diff suppressed because it is too large. Load diff
+5 -5
View File
@@ -1,13 +1,13 @@
[package]
name = "labyrinth"
version = "0.0.5"
version = "0.0.7"
edition = "2024"
license = "MIT"
description = "Library for managing soaricarus storage"
[dependencies]
aws-config = { version = "1.10.1", features = ["behavior-version-latest"] }
aws-sdk-s3 = { version = "1.141.0" }
aws-config = { version = "1.13.0", features = ["behavior-version-latest"] }
aws-sdk-s3 = { version = "1.157.0" }
time = "0.3.55"
tokio = { version = "1.53.1", features = ["full"] }
uuid = "1.24.1"
tokio = { version = "1.54.1", features = ["full"] }
uuid = "1.27.0"
+8 -8
View File
@@ -52,12 +52,12 @@ impl Labyrinth {
&self,
file_key: &str,
data: &Data,
) -> Result<aws_sdk_s3::operation::put_object::PutObjectOutput, Error> {
) -> Result<aws_sdk_s3::operation::put_object::PutObjectOutput, Box<Error>> {
let client = init_client(&self.config).await;
let data_content = if data.raw_data.is_empty() {
match load_data(&data.filepath).await {
Ok(content) => content,
Err(err) => return Err(Error::Info(err.to_string())),
Err(err) => return Err(Box::new(Error::Info(err.to_string()))),
}
} else {
data.raw_data.to_owned()
@@ -74,12 +74,12 @@ impl Labyrinth {
.await
{
Ok(response) => Ok(response),
Err(err) => Err(Error::Info(err.to_string())),
Err(err) => Err(Box::new(Error::Info(err.to_string()))),
}
}
/// 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>, Box<Error>> {
let client = init_client(&self.config).await;
match client
@@ -99,10 +99,10 @@ impl Labyrinth {
let raw_data = bytes.to_vec();
Ok(raw_data)
}
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())),
Err(err) => Err(Box::new(Error::Info(err.to_string()))),
}
}
@@ -110,7 +110,7 @@ impl Labyrinth {
pub async fn delete(
&self,
file_key: &str,
) -> Result<aws_sdk_s3::operation::delete_object::DeleteObjectOutput, Error> {
) -> Result<aws_sdk_s3::operation::delete_object::DeleteObjectOutput, Box<Error>> {
let client = init_client(&self.config).await;
match client
@@ -121,7 +121,7 @@ impl Labyrinth {
.await
{
Ok(response) => Ok(response),
Err(err) => Err(Error::Info(err.to_string())),
Err(err) => Err(Box::new(Error::Info(err.to_string()))),
}
}
}