View Source Plausible.Shields (Plausible v0.0.1)

Contextual interface for shields.

Summary

Functions

Link to this function

add_country_rule(site_or_id, params, opts \\ [])

View Source
@spec add_country_rule(Plausible.Site.t() | non_neg_integer(), map(), Keyword.t()) ::
  {:ok, Plausible.Shield.CountryRule.t()} | {:error, Ecto.Changeset.t()}
Link to this function

add_ip_rule(site_or_id, params, opts \\ [])

View Source
@spec add_ip_rule(Plausible.Site.t() | non_neg_integer(), map(), Keyword.t()) ::
  {:ok, Plausible.Shield.IPRule.t()} | {:error, Ecto.Changeset.t()}
Link to this function

count_country_rules(site_or_id)

View Source
@spec count_country_rules(Plausible.Site.t() | non_neg_integer()) :: non_neg_integer()
Link to this function

count_ip_rules(site_or_id)

View Source
@spec count_ip_rules(Plausible.Site.t() | non_neg_integer()) :: non_neg_integer()
Link to this function

list_country_rules(site_or_id)

View Source
@spec list_country_rules(Plausible.Site.t() | non_neg_integer()) :: [
  Plausible.Shield.CountryRule.t()
]
Link to this function

list_ip_rules(site_or_id)

View Source
@spec list_ip_rules(Plausible.Site.t() | non_neg_integer()) :: [
  Plausible.Shield.IPRule.t()
]
Link to this function

remove_country_rule(site_or_id, rule_id)

View Source
@spec remove_country_rule(Plausible.Site.t() | non_neg_integer(), String.t()) :: :ok
Link to this function

remove_ip_rule(site_or_id, rule_id)

View Source
@spec remove_ip_rule(Plausible.Site.t() | non_neg_integer(), String.t()) :: :ok