View Source nova_router behaviour (nova v0.10.4)
Summary
Functions
Add routes to the dispatch-table for the given app. The routes can be either a list of maps or a map. It use the same structure as the routes-callback in the router-module.
Types
Callbacks
Functions
-spec execute(Req, Env :: cowboy_middleware:env()) -> {ok, Req, Env0} | {stop, Req} when Req :: cowboy_req:req(), Env0 :: cowboy_middleware:env().
-spec render_status_page(StatusCode :: integer(), Req :: cowboy_req:req()) -> {ok, Req0 :: cowboy_req:req(), Env :: map()}.
-spec render_status_page(StatusCode :: integer(), Data :: map(), Req :: cowboy_req:req()) -> {ok, Req0 :: cowboy_req:req(), Env :: map()}.
-spec render_status_page(Host :: binary() | atom(), StatusCode :: integer(), Data :: map(), Req :: cowboy_req:req(), Env :: map()) -> {ok, Req0 :: cowboy_req:req(), Env :: map()}.