Buckets.Adapters.GCS.Signature (buckets v1.0.0-rc.1)
Google Cloud Storage V4 signed URL generation.
Implements the V4 signing process for creating signed URLs that allow temporary access to GCS objects without requiring authentication.
Summary
Functions
Generates a V4 signed URL for Google Cloud Storage.
Functions
Link to this function
generate_v4(credentials, bucket, object_path, opts \\ [])
Generates a V4 signed URL for Google Cloud Storage.
Options
:verb
- HTTP method (default: "GET"):expires
- Expiration time in seconds from now (default: 3600):headers
- Additional headers to include in the signature
Examples
iex> credentials = %{"client_email" => "test@example.com", "private_key" => "..."}
iex> Buckets.Adapters.GCS.Signature.generate_v4(credentials, "my-bucket", "path/to/object.jpg")
{:ok, "https://storage.googleapis.com/my-bucket/path%2Fto%2Fobject.jpg?X-Goog-Algorithm=..."}