BAC.API do
  require ABAC

  def decision(ABAC.request() = r) do
       :erlang.apply(:"Elixir.ABAC.PDP", :decision, [r])
  end

  def decision(_), do: false
end

-record(request, {
    type = [] :: [] | atom(),
    endpoint = [] :: [] | atom(),
    subject = [] :: [] | term(),
    context = [] :: [] | term(),
    resources = [] :: [] | list()
}).

-record(context, {
    form = [] :: [] | tuple(),
    pid  = [] :: [] | list() | binary(),
    corr = [] :: [] | tuple(),
    notification = [] :: [] | tuple(),
