View Source S3 (S3 v0.1.0-rc.0)

Small S3-compatible API request builder and stuff

Summary

Types

@type headers() :: [{String.t(), String.t()}]
@type option() ::
  {:access_key_id, String.t()}
  | {:secret_access_key, String.t()}
  | {:url, URI.t() | :uri_string.uri_string() | :uri_string.uri_map()}
  | {:host, String.t()}
  | {:region, String.t()}
  | {:method,
     :get | :post | :head | :patch | :delete | :options | :put | String.t()}
  | {:path, String.t()}
  | {:query, Enumerable.t()}
  | {:headers, headers()}
  | {:body, iodata() | {:stream, Enumerable.t()} | :url}
  | {:utc_now, DateTime.t()}
@type options() :: [option()]
@type xml_element() :: {String.t(), [xml_element() | String.t()]}

Functions

@spec build(options()) :: {URI.t(), headers(), body :: iodata() | Enumerable.t()}
@spec signature(options()) :: String.t()
@spec signed_url(options()) :: URI.t()
@spec xml(binary()) :: {:ok, xml_element()} | {:error, any()}
@spec xml(xml_element()) :: iodata()