18 releases (5 breaking)

new 0.6.7 Jul 24, 2024
0.6.4 Jun 28, 2024

#5 in #gcloud

Download history 183/week @ 2024-04-02 362/week @ 2024-04-09 272/week @ 2024-04-16 405/week @ 2024-04-23 96/week @ 2024-04-30 222/week @ 2024-05-07 81/week @ 2024-05-14 217/week @ 2024-05-21 385/week @ 2024-05-28 152/week @ 2024-06-04 268/week @ 2024-06-11 238/week @ 2024-06-18 232/week @ 2024-06-25 268/week @ 2024-07-02 243/week @ 2024-07-09 64/week @ 2024-07-16

850 downloads per month

MIT/Apache

130KB
3K SLoC

cloud-storage-signature

This crate is in ALPHA. Do not use in production.

ci crates.io docs.rs license

TODOs

  • Support signBlob with ServiceAccount
  • Support HMAC key
  • Improve error handling
  • Add doc comments
  • Refactor
    • Remove http crate from dependencies

lib.rs:

A Cloud Storage signature utils

HTML Form Data

HtmlFormData is a struct that represents a form data for a POST request to upload an object to Google Cloud Storage.

https://cloud.google.com/storage/docs/xml-api/post-object-forms

use cloud_storage_signature::HtmlFormData;
assert_eq!(
    HtmlFormData::builder()
        .key("object_name1")
        .build()
        .await?
        .into_vec(),
    vec![("key".to_string(), "object_name1".to_string())]
);

This form data does not include the file field, so you need to add the file field to upload a file. See image-uploader example.

Dependencies

~12–24MB
~460K SLoC