View Source simple_bridge_util (simple_bridge v2.3.1)
Link to this section Summary
Link to this section Types
-type header() :: {header_key(), string()}.
-type header_key() :: string() | binary() | atom().
-type header_list() :: [header()].
-type unit_of_time() :: years | months | weeks | days | hours | minuites | seconds.
Link to this section Functions
-spec default_static_expires_header() -> header().
-spec ensure_expires_header(header_list()) -> header_list().
-spec ensure_header(header_list(), {header_key(), term()}) -> header_list().
-spec ensure_header(header_list(), header_key(), term()) -> header_list().
-spec ensure_headers(header_list(), header_list()) -> header_list().
-spec expires(unit_of_time(), integer()) -> string().
-spec get_maybe_set_env(Var :: atom(), Value :: any()) -> any().
-spec has_any_header(header_list(), [header_key()]) -> boolean().
-spec has_header(header_list(), header_key()) -> boolean().
-spec make_expires_from_seconds(integer()) -> string().
-spec maybe_to_binary(iolist() | atom() | binary()) -> binary() | undefined.
-spec maybe_to_list(any()) -> string() | undefined.
-spec needs_expires_header(header_list()) -> boolean().
-spec to_binary(iolist() | atom() | binary()) -> binary().
-spec to_list(any()) -> string().