Spectre.GAM.GovernedAct.Catalog (Spectre v0.4.0)

Copy Markdown View Source

Governed declarations and their current revision pointers.

Genesis anchors the Domain's foundation. Principal, HostProfile, Surface, Definition and Scope records describe who participates and the environment in which proposals are evaluated. Their histories remain available after a revision; a head reference selects the current record without copying it.

This is a disposable part of Spectre.GAM.GovernedAct.State, populated only by the history fold. It is neither host configuration nor a second authority store. Keeping declarations together separates them from the changing admission, execution and accounting indexes without changing ledger records.

Summary

Functions

Stores an accepted Definition revision and advances only that declaration's head.

Stores an accepted HostProfile revision and advances its head together.

Stores an already validated Principal without changing any authority.

Stores an accepted Surface revision and advances its head together.

Types

t()

@type t() :: %Spectre.GAM.GovernedAct.Catalog{
  definition_heads: %{optional({String.t(), String.t()}) => String.t()},
  definitions: %{optional(String.t()) => Spectre.GAM.Definition.t()},
  genesis: Spectre.GAM.Genesis.t() | nil,
  host_profile_ref: String.t() | nil,
  host_profiles: %{optional(String.t()) => Spectre.GAM.HostProfile.t()},
  principals: %{optional(String.t()) => Spectre.GAM.Principal.t()},
  scopes: %{optional(String.t()) => Spectre.GAM.Scope.Opening.t()},
  surface_ref: String.t() | nil,
  surfaces: %{optional(String.t()) => Spectre.GAM.Surface.t()}
}

Functions

put_definition(catalog, definition)

@spec put_definition(t(), Spectre.GAM.Definition.t()) :: t()

Stores an accepted Definition revision and advances only that declaration's head.

put_host_profile(catalog, profile)

@spec put_host_profile(t(), Spectre.GAM.HostProfile.t()) :: t()

Stores an accepted HostProfile revision and advances its head together.

put_principal(catalog, principal)

@spec put_principal(t(), Spectre.GAM.Principal.t()) :: t()

Stores an already validated Principal without changing any authority.

put_surface(catalog, surface)

@spec put_surface(t(), Spectre.GAM.Surface.t()) :: t()

Stores an accepted Surface revision and advances its head together.