Jidoka.Agent.Spec.Controls.Input (Jidoka v0.9.0)

Copy Markdown View Source

Control attached to the input boundary.

Summary

Functions

Normalizes an existing input control, keyword list, or map.

Builds an input control from keyword or map attributes.

Builds an input control and raises if the attributes are invalid.

Returns the Zoi schema for an input control.

Types

t()

@type t() :: %Jidoka.Agent.Spec.Controls.Input{control: atom(), metadata: map()}

Functions

from_input(input)

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

Normalizes an existing input control, keyword list, or map.

new(attrs)

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

Builds an input control from keyword or map attributes.

new!(attrs)

@spec new!(keyword() | map()) :: t()

Builds an input control and raises if the attributes are invalid.

schema()

@spec schema() :: Zoi.schema()

Returns the Zoi schema for an input control.