Warlock.Handler behaviour (warlock v0.1.1)

Link to this section Summary

Link to this section Functions

Link to this macro

error(code, default_error, response_type)

(macro)
Link to this function

json(conn, status, payload)

Link to this macro

json_error(code, default_error)

(macro)
Link to this macro

json_payload(code)

(macro)
Link to this function

message(conn, status, message)

Link to this macro

payload(code, response_type)

(macro)
Link to this function

siren(conn, status, payload)

Link to this macro

siren_error(code, default_error)

(macro)
Link to this macro

siren_payload(code)

(macro)

Link to this section Callbacks

Link to this callback

delete(conn, id)

(optional)

Specs

delete(conn :: Plug.Conn.t(), id :: String.t()) :: Plug.Conn.t() | no_return()
Link to this callback

edit(conn, id)

(optional)

Specs

edit(conn :: Plug.Conn.t(), id :: String.t()) :: Plug.Conn.t() | no_return()
Link to this callback

get(conn)

(optional)

Specs

get(conn :: Plug.Conn.t()) :: Plug.Conn.t() | no_return()
Link to this callback

new(conn)

(optional)

Specs

new(conn :: Plug.Conn.t()) :: Plug.Conn.t() | no_return()
Link to this callback

show(conn, id)

(optional)

Specs

show(conn :: Plug.Conn.t(), id :: String.t()) :: Plug.Conn.t() | no_return()