Inttegro.FileLinks.AccessRequest (inttegro v0.2.0)

Copy Markdown View Source

Parameters for Access Request in the FileLinks API.

Build this struct with new!/1 and pass it to the corresponding function on Inttegro.FileLinks. Required keys are enforced immediately; optional values left as nil are omitted from the request sent to Inttegro.

Creates controlled links for delivering files.

File links can be time-limited, revocable, and protected by a token. Creating and administering links requires a secret key; opening a link uses its public ID and token and intentionally does not send the application's secret key.

Summary

Types

t()

A validated access request request.

Functions

Builds a Inttegro.FileLinks.AccessRequest and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.FileLinks.AccessRequest{
  allow_download: boolean() | nil,
  allowed_ip_ranges: [String.t()] | nil,
  allowed_origins: [String.t()] | nil,
  max_accesses: integer() | nil
}

A validated access request request.

Functions

new!(attrs \\ %{})

@spec new!(map() | keyword()) :: t()

Builds a Inttegro.FileLinks.AccessRequest and raises KeyError when a required field is missing.