Jido.Flow.Data (Jido Action v3.0.0-beta.12)

View Source

Advanced validation for portable literal and metadata data used by a Jido.Flow.

Portable data contains JSON values plus existing atoms and non-string map keys that the trusted Flow Registry can encode. All strings must contain valid UTF-8 data.

Summary

Functions

Validates portable Flow data.

Validates a portable Flow metadata object.

Types

key()

@type key() :: String.t() | non_neg_integer() | atom()

object()

@type object() :: %{optional(key()) => t()}

scalar()

@type scalar() :: nil | boolean() | number() | String.t() | atom()

t()

@type t() :: scalar() | [t()] | %{optional(key()) => t()}

Functions

validate(value)

@spec validate(term()) :: :ok | {:error, Jido.Flow.Error.InvalidDefinitionError.t()}

Validates portable Flow data.

validate_object(value)

@spec validate_object(term()) ::
  :ok | {:error, Jido.Flow.Error.InvalidDefinitionError.t()}

Validates a portable Flow metadata object.