View Source Jido.Actions.Files.DeleteFile (Jido v1.0.0)
Deletes a file or directory
Summary
Functions
Callback implementation for Jido.Action.on_after_run/1
.
Callback implementation for Jido.Action.on_after_validate_params/1
.
Callback implementation for Jido.Action.on_before_validate_params/1
.
Callback implementation for Jido.Action.on_error/4
.
Executes the Action with the given parameters and context.
Validates the input parameters for the Action.
Functions
Callback implementation for Jido.Action.on_after_run/1
.
Callback implementation for Jido.Action.on_after_validate_params/1
.
Callback implementation for Jido.Action.on_before_validate_params/1
.
Callback implementation for Jido.Action.on_error/4
.
Executes the Action with the given parameters and context.
The run/2
function must be implemented in the module using Jido.Action.
Validates the input parameters for the Action.
Examples
iex> defmodule ExampleAction do
...> use Jido.Action,
...> name: "example_action",
...> schema: [
...> input: [type: :string, required: true]
...> ]
...> end
...> ExampleAction.validate_params(%{input: "test"})
{:ok, %{input: "test"}}
iex> ExampleAction.validate_params(%{})
{:error, "Invalid parameters for Action: Required key :input not found"}