DarkFlows.Workflows.Stages.StepOkStage (DarkFlows v1.0.2) View Source

Adds :ok tuple monad handling step to Opus.Pipeline.

Link to this section Summary

Functions

Normalize the result of :ok monad steps

Adds step_ok to the Opus.Pipeline allowing for :ok unboxing

Handles unboxing :ok monads for ease-of-use with Opus.Pipeline.

Link to this section Types

Specs

opts() :: Keyword.t()

Specs

step_result() ::
  DarkFlows.Workflow.context()
  | :ok
  | {:ok, DarkFlows.Workflow.context()}
  | {:error, any()}
  | {:error, failed_operation :: atom(), failed_value :: any(),
     changes_so_far :: map()}

Specs

Link to this section Functions

Link to this function

handle_result(context, results)

View Source

Specs

Normalize the result of :ok monad steps

Link to this macro

step_ok(name, opts \\ [])

View Source (macro)

Specs

step_ok(atom(), opts()) :: Macro.t()

Adds step_ok to the Opus.Pipeline allowing for :ok unboxing

Specs

Handles unboxing :ok monads for ease-of-use with Opus.Pipeline.