gen_router v0.1.1 GenRouter.Behaviour behaviour
Callbacks for custom implementation for the Router.
Link to this section Summary
Callbacks
Renders the view and deliver response to the end client
Function which converts generic message into GenRouter.Conn structure then match it according to the router specification
Link to this section Types
Link to this type
assigns()
assigns()
assigns() :: map()
assigns() :: map()
Link to this type
message()
message()
message() :: map()
message() :: map()
Link to this type
opts()
opts()
opts() :: Keyword.t()
opts() :: Keyword.t()
Link to this type
params()
params()
params() :: map()
params() :: map()
Link to this type
path()
path()
path() :: String.t()
path() :: String.t()
Link to this type
router()
router()
router() :: module()
router() :: module()
Link to this type
scope()
scope()
scope() :: map()
scope() :: map()
Link to this type
template()
template()
template() :: String.t()
template() :: String.t()
Link to this type
view()
view()
view() :: module()
view() :: module()
Link to this section Callbacks
Link to this callback
deliver(%, view, template, params, opts)
deliver(%, view, template, params, opts)
deliver(
%GenRouter.Conn{
__skip__: term(),
assigns: term(),
code: term(),
params: term(),
path: term(),
response: term(),
scope: term()
},
view(),
template(),
params(),
opts()
) :: %GenRouter.Conn{
__skip__: term(),
assigns: term(),
code: term(),
params: term(),
path: term(),
response: term(),
scope: term()
}
deliver( %GenRouter.Conn{ __skip__: term(), assigns: term(), code: term(), params: term(), path: term(), response: term(), scope: term() }, view(), template(), params(), opts() ) :: %GenRouter.Conn{ __skip__: term(), assigns: term(), code: term(), params: term(), path: term(), response: term(), scope: term() }
Renders the view and deliver response to the end client.
Link to this callback
match_message(router, message, path, scope, assigns, opts)
Function which converts generic message into GenRouter.Conn structure then match it according to the router specification.