Threadline.Evidence.Subject (Threadline v0.7.0)

Copy Markdown View Source

Closed subject inventory for Threadline-owned evidence records.

This boundary is kept intentionally narrow so later evidence APIs and surfaces cannot silently expand into host-owned auth, tenancy, or compliance workflow semantics.

Summary

Functions

Returns whether a subject or subject descriptor is supported.

Returns the closed supported subject inventory for v1.22.

Validates a subject or subject descriptor against the closed inventory.

Types

subject_descriptor()

@type subject_descriptor() ::
  atom()
  | String.t()
  | %{
      optional(:subject) => atom() | String.t(),
      optional(:name) => atom() | String.t()
    }
  | %{optional(String.t()) => atom() | String.t()}

Functions

supported?(subject)

@spec supported?(subject_descriptor()) :: boolean()

Returns whether a subject or subject descriptor is supported.

supported_subjects()

Returns the closed supported subject inventory for v1.22.

validate(subject)

@spec validate(subject_descriptor()) :: :ok | {:error, {:unsupported_subject, term()}}

Validates a subject or subject descriptor against the closed inventory.