Arke.Utils.Gcp (Arke v0.8.0)

Copy Markdown View Source

Google Cloud Storage backend for Arke.Utils.FileStorage.

Talks to the GCS JSON API over Req. The requests it builds are pinned by test/support/fixtures/gcs_requests.exs.

Summary

Functions

delete_file(file_path, opts \\ [])

get_bucket_file_signed_url(file_path, opts \\ [])

A V2 signed url for the object, signed with the service account key.

Requires service account credentials: metadata server and gcloud user credentials have no private key to sign with.

get_file(file_path, opts \\ [])

get_public_url(unit, opts \\ [])

upload_file(file_name, file_data, opts \\ [])