Spectre.GAM.Fallback.Policy (Spectre v0.4.0)

Copy Markdown View Source

Portable refusal policy embedded in a governed Surface declaration.

Templates omit occurrence identity, proposer and Scope. Those values are bound to the refused Decision's authenticated context at materialization. Evidence, consent, Presentation and requested Mandate default to empty/nil rather than being copied from the refused proposal.

Summary

Functions

Returns the exact value embedded in a Surface.

Restores a policy while rejecting noncanonical templates.

Builds and validates a fallback policy.

Types

mode()

@type mode() :: :silence | :candidate_template | :governed_handoff

t()

@type t() :: %Spectre.GAM.Fallback.Policy{
  mode: mode(),
  schema_version: 1,
  template: map() | nil
}

Functions

canonical(policy)

@spec canonical(t()) :: map()

Returns the exact value embedded in a Surface.

from_canonical(value)

@spec from_canonical(map()) :: {:ok, t()} | {:error, term()}

Restores a policy while rejecting noncanonical templates.

new(policy)

@spec new(t() | map() | keyword() | atom()) :: {:ok, t()} | {:error, term()}

Builds and validates a fallback policy.