Mediate.Decision (mediate v0.1.0)

Copy Markdown View Source

The stamped answer: what the port said, when, from what state, under which rules. It is the value the seam accepts under mediate:.

Summary

Types

t()

policy_version is nil where the adapter names no version for the answer.

:scoped is the verdict of a scope decision, whose rule narrows rather than allows.

Functions

The three verdicts.

Types

t()

@type t() :: %Mediate.Decision{
  adapter: module(),
  at: DateTime.t(),
  id: Mediate.Id.t(),
  object: Mediate.object(),
  operation: atom(),
  operation_id: Mediate.Id.t(),
  policy_version: Mediate.PolicyVersion.ref() | nil,
  reason: Mediate.Answer.reason(),
  subject: Mediate.subject(),
  verdict: verdict()
}

policy_version is nil where the adapter names no version for the answer.

verdict()

@type verdict() :: :allow | :deny | :scoped

:scoped is the verdict of a scope decision, whose rule narrows rather than allows.

Functions

verdicts()

@spec verdicts() :: [verdict()]

The three verdicts.