Jidoka.Agent.Spec.Controls.Operation (Jidoka v0.8.0-beta.1)

Copy Markdown View Source

Policy control attached to model-callable operations.

Summary

Functions

Returns true when this operation control applies to an operation spec or match data.

Returns true when this operation control applies to an operation name/kind.

Types

t()

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

Functions

from_input(operation)

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

matches?(control, operation)

@spec matches?(t(), Jidoka.Agent.Spec.Operation.t() | map()) :: boolean()

Returns true when this operation control applies to an operation spec or match data.

matches?(operation, operation_name, operation_kind)

@spec matches?(t(), String.t(), atom()) :: boolean()

Returns true when this operation control applies to an operation name/kind.

new(attrs)

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

new!(attrs)

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

schema()

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

valid_kinds()

@spec valid_kinds() :: [atom()]