Insider.Sentinel.Verification.Candidate (Insider Lab v0.1.0)

Copy Markdown View Source

A bounded opaque candidate repair.

Its bytes are inert data and cannot select execution authority. They may contain any byte sequence; only a host-allowlisted body decides how to interpret them.

Summary

Types

t()

@type t() :: %Insider.Sentinel.Verification.Candidate{
  byte_size: term(),
  content_base64: term(),
  content_sha256: term(),
  format: term(),
  id: term(),
  integrity: term(),
  schema: term()
}

Functions

canonical_binary(candidate)

@spec canonical_binary(term()) ::
  {:ok, binary()} | {:error, Insider.Protocol.Error.t()}

content(candidate)

@spec content(t()) :: {:ok, binary()} | {:error, Insider.Protocol.Error.t()}

decode(value)

@spec decode(binary()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}

decode_map(wire)

@spec decode_map(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}

new(content, format)

@spec new(binary(), String.t()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}

to_wire_map(candidate)

@spec to_wire_map(t()) :: map()

validate(candidate)

@spec validate(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}