Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ members = [
"solana",
"task_manager",
"hex_assignments",
"aws_local",
"tls_init",
]
resolver = "2"
Expand Down
20 changes: 0 additions & 20 deletions aws_local/Cargo.toml

This file was deleted.

4 changes: 2 additions & 2 deletions file_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ derive_builder = { workspace = true }
retainer = { workspace = true }
task-manager = { path = "../task_manager" }
tls-init = { path = "../tls_init" }
uuid = { workspace = true }
tempfile = { workspace = true }

aws-config = { workspace = true }
aws-sdk-s3 = { workspace = true }
aws-smithy-types-convert = { workspace = true }

[dev-dependencies]
tempfile = { workspace = true }
aws-local = { path = "../aws_local" }

[features]
default = ["sqlx-postgres"]
Expand Down
20 changes: 11 additions & 9 deletions aws_local/src/lib.rs → file_store/src/aws_local.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use anyhow::Result;
use crate::{BucketClient, GzippedFramedFile};
use chrono::{DateTime, Utc};
use file_store::{BucketClient, GzippedFramedFile};
use std::env;
use uuid::Uuid;

pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;

pub const AWSLOCAL_ENDPOINT_ENV: &str = "AWSLOCAL_ENDPOINT";
pub const AWSLOCAL_DEFAULT_ENDPOINT: &str = "http://localhost:4566";

Expand Down Expand Up @@ -53,9 +54,9 @@ impl AwsLocal {
.create_bucket()
.bucket(&self.client.bucket)
.send()
.await
.map(|_| ())
.map_err(anyhow::Error::from)
.await?;

Ok(())
}

pub async fn delete_bucket(&self) -> Result<()> {
Expand All @@ -67,8 +68,9 @@ impl AwsLocal {
aws_sdk_s3::types::ObjectIdentifier::builder()
.key(fi.key)
.build()
.map_err(Into::into)
})
.collect::<Result<_, _>>()?;
.collect::<Result<_>>()?;

self.client
.client
Expand All @@ -87,9 +89,9 @@ impl AwsLocal {
.delete_bucket()
.bucket(&self.client.bucket)
.send()
.await
.map(|_| ())
.map_err(anyhow::Error::from)
.await?;

Ok(())
}

pub async fn put_protos<T: prost::Message>(
Expand Down
Loading