Warlock.Controller behaviour (warlock v2.0.0)

Link to this section Summary

Functions

Takes the result of query and normalizes it to a tuple.

Link to this section Callbacks

Link to this callback

delete(id, user)

(optional)

Specs

delete(id :: any(), user :: Warlock.Schema.user()) ::
  Warlock.Schema.query_result()
Link to this callback

edit(params, id, user)

(optional)

Specs

edit(params :: map(), id :: any(), user :: Warlock.Schema.user()) ::
  Warlock.Schema.query_result()
Link to this callback

get(params, user)

(optional)

Specs

get(params :: map(), user :: Warlock.Schema.user()) ::
  Warlock.Schema.query_result()
Link to this callback

get_count(params, user)

(optional)

Specs

get_count(params :: map(), user :: Warlock.Schema.user()) ::
  Warlock.Schema.query_result()
Link to this callback

new(params, user)

(optional)

Specs

new(params :: map(), user :: Warlock.Schema.user()) ::
  Warlock.Schema.query_result()
Link to this callback

show(id, user)

(optional)

Specs

show(id :: any(), user :: Warlock.Schema.user()) ::
  Warlock.Schema.query_result()

Link to this section Functions

Link to this function

list_to_outcome(list)

Takes the result of query and normalizes it to a tuple.