Module cowboy_router

Behaviours: cowboy_middleware.

Data Types

bindings()

bindings() = [{atom(), binary()}]

dispatch_rules()

abstract datatype: dispatch_rules()

route_match()

route_match() = '_' | iodata()

route_path()

route_path() = {Path::route_match(), Handler::module(), Opts::any()} | {Path::route_match(), cowboy:fields(), Handler::module(), Opts::any()}

route_rule()

route_rule() = {Host::route_match(), Paths::[route_path()]} | {Host::route_match(), cowboy:fields(), Paths::[route_path()]}

routes()

routes() = [route_rule()]

tokens()

tokens() = [binary()]

Function Index

compile/1
execute/2

Function Details

compile/1

compile(Routes::routes()) -> dispatch_rules()

execute/2

execute(Req, Env) -> {ok, Req, Env} | {halt, Req}


Generated by EDoc, Aug 2 2016, 23:19:00.