purge chat and shout endpoints
[akkoma] / lib / pleroma / reverse_proxy / client.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.ReverseProxy.Client do
6 @type status :: pos_integer()
7 @type header_name :: String.t()
8 @type header_value :: String.t()
9 @type headers :: [{header_name(), header_value()}]
10
11 @callback request(atom(), String.t(), headers(), String.t(), list()) ::
12 {:ok, status(), headers(), reference() | map()}
13 | {:ok, status(), headers()}
14 | {:ok, reference()}
15 | {:error, term()}
16
17 @callback stream_body(map()) :: {:ok, binary(), map()} | :done | {:error, atom() | String.t()}
18
19 @callback close(reference() | pid() | map()) :: :ok
20 end