Spectre.Governance.ChangeSet.Operation (Spectre v0.3.0)

Copy Markdown View Source

One inert operation in a governed Definition ChangeSet.

Operations carry only a stable textual type and JSON-shaped payload. The type is resolved against a registry assembled by trusted host code; authored data never selects a module, function, evaluator, or policy implementation.

Summary

Functions

Builds a transport-stable, non-executable operation.

Returns the JSON-shaped representation sealed into ChangeSet identity.

Types

t()

@type t() :: %Spectre.Governance.ChangeSet.Operation{payload: map(), type: String.t()}

Functions

new(operation)

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

Builds a transport-stable, non-executable operation.

to_data(operation)

@spec to_data(t()) :: map()

Returns the JSON-shaped representation sealed into ChangeSet identity.