24 releases (5 breaking)

new 0.6.13 Jan 8, 2025
0.6.12 Nov 28, 2024
0.6.10 Sep 28, 2024
0.6.7 Jul 24, 2024

#2162 in Web programming

Download history 163/week @ 2024-09-18 280/week @ 2024-09-25 88/week @ 2024-10-02 60/week @ 2024-10-09 42/week @ 2024-10-16 38/week @ 2024-10-23 33/week @ 2024-10-30 65/week @ 2024-11-06 237/week @ 2024-11-13 72/week @ 2024-11-20 180/week @ 2024-11-27 91/week @ 2024-12-04 78/week @ 2024-12-11 65/week @ 2024-12-18 51/week @ 2024-12-25 21/week @ 2025-01-01

229 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

~13–25MB
~452K SLoC