Kantoor. Retention
(Kantoor v1.0.0)
Decides the retention Kantoor asks Karta to apply to a delivery (contract 3a).
The decision is returned in the 2xx response to the inbound push. Today it is a
per-domain setting (domain_settings.retention_days, edited in the admin UI),
falling back to config :kantoor, Kantoor.Retention, default: "keep" | days
(itself defaulting to "keep").
Summary
Functions
Returns "keep" or a positive number of days for the delivery of payload.
Converts a decision to the Kantoor.Ingest option value.
Converts an ingest retention back to the JSON value.
Types
@type decision() :: String.t() | pos_integer()
Functions
@spec decide(Kantoor.Karta.InboundPayload.t()) :: decision()
Returns "keep" or a positive number of days for the delivery of payload.
@spec to_ingest(decision()) :: :keep | {:days, pos_integer()}
Converts a decision to the Kantoor.Ingest option value.
@spec to_json(:keep | {:days, pos_integer()}) :: decision()
Converts an ingest retention back to the JSON value.