Exop v0.3.4 Exop.Operation behaviour
Provides macros for an operation’s contract definition and process/1 function.
Example
defmodule SomeOperation do
use Exop.Operation
parameter :param1, type: :integer, required: true
parameter :param2, type: :string, length: %{max: 3}, format: ~r/foo/
def process(params) do
"This is the operation's result with one of the params = " <> params[:param1]
end
end