Parrhesia.Storage.ACL behaviour (parrhesia v0.12.0)

Copy Markdown

Storage callbacks for persisted ACL rules.

Summary

Types

context()

@type context() :: map()

opts()

@type opts() :: keyword()

reason()

@type reason() :: term()

rule()

@type rule() :: map()

Callbacks

delete_rule(context, map)

@callback delete_rule(context(), map()) :: :ok | {:error, reason()}

list_rules(context, opts)

@callback list_rules(context(), opts()) :: {:ok, [rule()]} | {:error, reason()}

put_rule(context, rule)

@callback put_rule(context(), rule()) :: {:ok, rule()} | {:error, reason()}