Behaviours: cowboy_middleware.
bindings() = [{atom(), binary()}]
constraints() = [{atom(), int} | {atom(), function, fun((binary()) -> true | {true, any()} | false)}]
abstract datatype: dispatch_rules()
route_match() = '_' | iodata()
route_path() = {Path::route_match(), Handler::module(), Opts::any()} | {Path::route_match(), constraints(), Handler::module(), Opts::any()}
route_rule() = {Host::route_match(), Paths::[route_path()]} | {Host::route_match(), constraints(), Paths::[route_path()]}
routes() = [route_rule()]
tokens() = [binary()]
compile/1 | |
execute/2 |
compile(Routes::routes()) -> dispatch_rules()
execute(Req, Env) -> {ok, Req, Env} | {error, 400 | 404, Req}
Generated by EDoc, Aug 23 2014, 16:29:06.