GcsSignedUrl.Client (gcs_signed_url v0.4.3) View Source

Defines Google Cloud Storage Signed Url Client

Link to this section Summary

Functions

Creates a PEM binary from the given client's private_key and decodes it.

Initialize GcsSignedUrl.Client with given map, or load a file if called with a path string.

Initialize GcsSignedUrl.Client using a config file.

Link to this section Types

Specs

t() :: %GcsSignedUrl.Client{client_email: String.t(), private_key: String.t()}

Link to this section Functions

Link to this function

get_decoded_private_key(client)

View Source

Specs

get_decoded_private_key(t()) :: tuple()

Creates a PEM binary from the given client's private_key and decodes it.

Specs

load(map() | String.t()) :: t()

Initialize GcsSignedUrl.Client with given map, or load a file if called with a path string.

Examples

iex> service_account = service_account_json_string |> Jason.decode!
iex> GcsSignedUrl.Client.load(service_account)
%GcsSignedUrl.Client{...}

iex> GcsSignedUrl.Client.load("/home/alexandrubagu/config/google.json")
%GcsSignedUrl.Client{...}

Specs

load_from_file(String.t()) :: t()

Initialize GcsSignedUrl.Client using a config file.

Examples

iex>
iex> GcsSignedUrl.Client.load_from_file("/home/alexandrubagu/config/google.json")
%GcsSignedUrl.Client{...}