-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbehaviour.eex
21 lines (17 loc) · 922 Bytes
/
behaviour.eex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
defmodule <%= module_root %>.ClientBehaviour do
@moduledoc "Autogenerated by `elixir-rpc-proto-gen-helpers`"
alias RpcClient.AdapterBehaviour
<%= for %{name: function, request: request, response: response} <- methods do %>
@callback <%= function %>(<%= request %>.t(), AdapterBehaviour.opts()) ::
{:ok, <%= response %>.t()}
| {:error, atom() | list()}
| {:error, atom() | list(), list() | nil}
@callback <%= function %>!(<%= request %>.t(), AdapterBehaviour.opts()) ::
<%= response %>.t() | no_return()
@callback <%= function %>(<%= request %>.t()) ::
{:ok, <%= response %>.t()}
| {:error, atom() | list()}
| {:error, atom() | list(), list() | nil}
@callback <%= function %>!(<%= request %>.t()) ::
<%= response %>.t() | no_return()
<% end %>end