View Source Plausible.Shields (Plausible v0.0.1)
Contextual interface for shields.
Summary
Functions
@spec add_country_rule(Plausible.Site.t() | non_neg_integer(), map(), Keyword.t()) :: {:ok, Plausible.Shield.CountryRule.t()} | {:error, Ecto.Changeset.t()}
@spec add_ip_rule(Plausible.Site.t() | non_neg_integer(), map(), Keyword.t()) :: {:ok, Plausible.Shield.IPRule.t()} | {:error, Ecto.Changeset.t()}
@spec count_country_rules(Plausible.Site.t() | non_neg_integer()) :: non_neg_integer()
@spec count_ip_rules(Plausible.Site.t() | non_neg_integer()) :: non_neg_integer()
@spec list_country_rules(Plausible.Site.t() | non_neg_integer()) :: [ Plausible.Shield.CountryRule.t() ]
@spec list_ip_rules(Plausible.Site.t() | non_neg_integer()) :: [ Plausible.Shield.IPRule.t() ]
@spec remove_country_rule(Plausible.Site.t() | non_neg_integer(), String.t()) :: :ok
@spec remove_ip_rule(Plausible.Site.t() | non_neg_integer(), String.t()) :: :ok