Skip to content

Commit

Permalink
Merge pull request #47 from technosophos/feat/filters
Browse files Browse the repository at this point in the history
feat: Add filtering API for parcels
  • Loading branch information
technosophos authored Dec 11, 2020
2 parents dc157eb + b12c93a commit 02a24b3
Show file tree
Hide file tree
Showing 8 changed files with 1,012 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bin/as2bindle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async fn main() {
media_type: "application/wasm".to_owned(),
sha256: sha,
size: md.len() as u64,
annotations: None,
..bindle::Label::default()
};

// Return the parcel section to be added to the invoice.
Expand Down
2 changes: 1 addition & 1 deletion bin/cargo2bindle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async fn main() {
media_type: "application/wasm".to_owned(),
sha256: sha,
size: md.len() as u64,
annotations: None,
..bindle::Label::default()
};

// Return the parcel section to be added to the invoice.
Expand Down
1 change: 1 addition & 0 deletions bin/client/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ async fn generate_label(
size,
name,
annotations: None, // TODO: allow annotations from command line
..bindle::Label::default()
})
}

Expand Down
4 changes: 1 addition & 3 deletions src/cache/dumb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ impl<S: Storage + Send + Sync + Clone> Storage for DumbCache<S> {
let label = crate::Label {
sha256: parcel_id.to_owned(),
name: "".to_string(),
size: 0,
media_type: "*/*".to_string(),
annotations: None,
..crate::Label::default()
};
let stream = self.client.get_parcel_stream(parcel_id).await?;
// Attempt to insert the parcel into the store, if it fails, warn the user and
Expand Down
Loading

0 comments on commit 02a24b3

Please sign in to comment.