Altar.ADM.FunctionCall (Altar v0.1.2)

View Source

FunctionCall represents a request to invoke a function by name with arguments.

Use new/1 to construct validated instances.

Summary

Types

t()

A validated FunctionCall.

Functions

Construct a new validated FunctionCall.

Types

t()

@type t() :: %Altar.ADM.FunctionCall{
  args: map(),
  call_id: String.t(),
  name: String.t()
}

A validated FunctionCall.

Functions

new(attrs)

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

Construct a new validated FunctionCall.

Accepts a map or keyword list with:

  • :call_id (required): non-empty string
  • :name (required): non-empty string
  • :args (optional): map(), defaults to %{}

Returns {:ok, %FunctionCall{}} on success or {:error, reason}.