GcsSignedUrl.StringToSign (gcs_signed_url v0.4.3) View Source

Generates the string-to-sign and the URL the signature is being signed.

Link to this section Summary

Functions

Creates the string to sign according to https://cloud.google.com/storage/docs/access-control/signed-urls-v2 and returns it together with a template for the URL that is being signed.

Creates the string to sign according to https://cloud.google.com/storage/docs/authentication/signatures#string-to-sign and returns it together with a template of the URL that is being signed.

Link to this section Types

Specs

t() :: %GcsSignedUrl.StringToSign{
  string_to_sign: String.t(),
  url_template: String.t()
}

Link to this section Functions

Link to this function

generate_v2(client_email, bucket, filename, opts \\ [])

View Source

Specs

generate_v2(String.t(), String.t(), String.t(), GcsSignedUrl.sign_v2_opts()) ::
  t()

Creates the string to sign according to https://cloud.google.com/storage/docs/access-control/signed-urls-v2 and returns it together with a template for the URL that is being signed.

The URL template contains a placeholder #SIGNATURE# for the actual signature.

Link to this function

generate_v4(client_email, bucket, filename, opts \\ [])

View Source

Specs

generate_v4(String.t(), String.t(), String.t(), GcsSignedUrl.sign_v4_opts()) ::
  t()

Creates the string to sign according to https://cloud.google.com/storage/docs/authentication/signatures#string-to-sign and returns it together with a template of the URL that is being signed.

The URL template contains a placeholder #SIGNATURE# for the actual signature.