nova_router behaviour (nova v0.9.1) View Source

Link to this section Summary

Link to this section Types

Specs

bindings() :: #{binary() := binary()}.

Specs

host_tree() :: #host_tree{}.

Specs

options() :: #{use_strict := boolean(), convert_to_binary := boolean()}.

Specs

routing_tree() :: #routing_tree{}.

Link to this section Callbacks

Specs

routes(Env :: atom()) -> {ok, Routes :: any()}.

Link to this section Functions

Specs

compile(Apps :: [atom()]) -> host_tree().

Specs

execute(Req, Env :: cowboy_middleware:env()) -> {ok, Req, Env0} | {stop, Req}
           when Req :: cowboy_req:req(), Env0 :: cowboy_middleware:env().
Link to this function

lookup_url(Host, Path, Method)

View Source
Link to this function

render_status_page(StatusCode, Req)

View Source

Specs

render_status_page(StatusCode :: integer(), Req :: cowboy_req:req()) ->
                      {ok, Req0 :: cowboy_req:req(), Env :: map()}.
Link to this function

render_status_page(StatusCode, Data, Req)

View Source

Specs

render_status_page(StatusCode :: integer(), Data :: map(), Req :: cowboy_req:req()) ->
                      {ok, Req0 :: cowboy_req:req(), Env :: map()}.
Link to this function

render_status_page(Host, StatusCode, Data, Req, Env)

View Source

Specs

render_status_page(Host :: binary() | atom(),
                   StatusCode :: integer(),
                   Data :: map(),
                   Req :: cowboy_req:req(),
                   Env :: map()) ->
                      {ok, Req0 :: cowboy_req:req(), Env :: map()}.