guss v0.1.6 Guss.Resource View Source
Data structure for Signed URL components.
Link to this section Summary
Types
A request header that applies predefined (canned) ACLs to a bucket or object when you upload it or create it.
Predefined (canned) access control policies.
Canonical extension headers provide extended request functionality.
HTTP verbs for Signed URLs.
Custom metadata for resource requests/responses.
Components of a GCS Resource URL
Functions
Get a list of canonical headers for the given resource.
Link to this section Types
A request header that applies predefined (canned) ACLs to a bucket or object when you upload it or create it.
For more information, see x-goog-acl.
acl_policy()
View Sourceacl_policy() :: :private | :project_private | :public_read | :public_read_write | :authenticated_read | :bucket_owner_read | :bucket_owner_full_control | String.t()
Predefined (canned) access control policies.
extension_header()
View Sourceextension_header() :: [ acl_header() | meta_header() | {atom() | String.t(), atom() | String.t()} ]
Canonical extension headers provide extended request functionality.
For more information, see Canonical Extension Headers.
HTTP verbs for Signed URLs.
Custom metadata for resource requests/responses.
For more information, see x-goog-meta-
t()
View Sourcet() :: %Guss.Resource{
account: nil | atom() | String.t(),
base_url: String.t(),
bucket: String.t(),
content_md5: nil | String.t(),
content_type: nil | String.t(),
expires: nil | non_neg_integer(),
extensions: extensions(),
http_verb: http_verb(),
objectname: String.t()
}
Components of a GCS Resource URL
For more information, see String Components.
Link to this section Functions
Get a list of canonical headers for the given resource.
This function returns a list of tuples for all headers defined
on a Guss.Resource. The list maintains the ordering of custom
extensions. To ensure full compatibility, the request using the
Signed URL should apply the signed headers in the order returned.
For more information, see Guss.CanonicalData.
Examples
iex> Guss.put("b", "o.txt")
...> |> Guss.Resource.signed_headers()
[]
iex> Guss.Resource.signed_headers(Guss.put("b", "o.txt", content_type: "text/plain"))
[{"content-type", "text/plain"}]