# `Parrhesia.Storage.Moderation`

Storage callbacks for moderation and access-control state.

# `context`

```elixir
@type context() :: map()
```

# `event_id`

```elixir
@type event_id() :: binary()
```

# `ip_address`

```elixir
@type ip_address() :: binary()
```

# `pubkey`

```elixir
@type pubkey() :: binary()
```

# `reason`

```elixir
@type reason() :: term()
```

# `allow_pubkey`

```elixir
@callback allow_pubkey(context(), pubkey()) :: :ok | {:error, reason()}
```

# `ban_event`

```elixir
@callback ban_event(context(), event_id()) :: :ok | {:error, reason()}
```

# `ban_pubkey`

```elixir
@callback ban_pubkey(context(), pubkey()) :: :ok | {:error, reason()}
```

# `block_ip`

```elixir
@callback block_ip(context(), ip_address()) :: :ok | {:error, reason()}
```

# `disallow_pubkey`

```elixir
@callback disallow_pubkey(context(), pubkey()) :: :ok | {:error, reason()}
```

# `event_banned?`

```elixir
@callback event_banned?(context(), event_id()) :: {:ok, boolean()} | {:error, reason()}
```

# `has_allowed_pubkeys?`

```elixir
@callback has_allowed_pubkeys?(context()) :: {:ok, boolean()} | {:error, reason()}
```

# `ip_blocked?`

```elixir
@callback ip_blocked?(context(), ip_address()) :: {:ok, boolean()} | {:error, reason()}
```

# `pubkey_allowed?`

```elixir
@callback pubkey_allowed?(context(), pubkey()) :: {:ok, boolean()} | {:error, reason()}
```

# `pubkey_banned?`

```elixir
@callback pubkey_banned?(context(), pubkey()) :: {:ok, boolean()} | {:error, reason()}
```

# `unban_event`

```elixir
@callback unban_event(context(), event_id()) :: :ok | {:error, reason()}
```

# `unban_pubkey`

```elixir
@callback unban_pubkey(context(), pubkey()) :: :ok | {:error, reason()}
```

# `unblock_ip`

```elixir
@callback unblock_ip(context(), ip_address()) :: :ok | {:error, reason()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
