guss v0.1.6 Guss View Source

Guss generates Signed URLs for Google Cloud Storage.

Signed URLs provide a mechanism for query-string authentication for storage objects. For more information, see the Storage Docs for Signed URLs.

Link to this section Summary

Functions

Returns a new Guss.Resource for a DELETE request.

Returns an expiration value for a future timestamp, with optional granularity.

Returns a new Guss.Resource for a GET request.

Returns a new Guss.Resource for a POST request.

Returns a new Guss.Resource for a PUT request.

Converts a Guss.Resource into a Signed URL.

Link to this section Functions

Link to this function

delete(bucket, objectname, opts \\ [])

View Source
delete(binary(), binary(), keyword()) :: Guss.Resource.t()

Returns a new Guss.Resource for a DELETE request.

Returns an expiration value for a future timestamp, with optional granularity.

By default, expires_in/1 expects a value in :seconds.

To specify a different granularity, pass the value as a tuple, for instance: {1, :hour} or {7, :days}

Valid granularities are :seconds, :hours, and :days, as well as their singular variants.

Link to this function

get(bucket, objectname, opts \\ [])

View Source
get(binary(), binary(), keyword()) :: Guss.Resource.t()

Returns a new Guss.Resource for a GET request.

Link to this function

new(bucket, objectname, opts \\ [])

View Source
new(binary(), binary(), keyword()) :: Guss.Resource.t()

Returns a new Guss.Resource.

Link to this function

new(verb, bucket, objectname, opts)

View Source
new(atom(), binary(), binary(), keyword()) :: Guss.Resource.t()

Returns a new Guss.Resource.

Link to this function

post(bucket, objectname, opts \\ [])

View Source

Returns a new Guss.Resource for a POST request.

Link to this function

put(bucket, objectname, opts \\ [])

View Source
put(binary(), binary(), keyword()) :: Guss.Resource.t()

Returns a new Guss.Resource for a PUT request.

Link to this function

sign(resource, opts \\ [])

View Source
sign(resource :: Guss.Resource.t(), opts :: keyword()) ::
  {:error, {atom(), any()}} | {:ok, binary()}

Converts a Guss.Resource into a Signed URL.