diff options
author | Loïc Hoguin <[email protected]> | 2011-04-18 13:24:27 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-04-18 13:24:27 +0200 |
commit | 2beb5c8206cf33f04ef778ebc67839c1bd71add8 (patch) | |
tree | 886f908b1a16e7de0aecbf2bf25f6b405f8b67ee /src/cowboy_dispatcher.erl | |
parent | 6712eaa5c8196dc1ba179257d050b131959c2a1b (diff) | |
download | cowboy-2beb5c8206cf33f04ef778ebc67839c1bd71add8.tar.gz cowboy-2beb5c8206cf33f04ef778ebc67839c1bd71add8.tar.bz2 cowboy-2beb5c8206cf33f04ef778ebc67839c1bd71add8.zip |
Move the dispatcher related types into cowboy_dispatcher.
Diffstat (limited to 'src/cowboy_dispatcher.erl')
-rw-r--r-- | src/cowboy_dispatcher.erl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cowboy_dispatcher.erl b/src/cowboy_dispatcher.erl index 46cf717..e4e5b78 100644 --- a/src/cowboy_dispatcher.erl +++ b/src/cowboy_dispatcher.erl @@ -15,6 +15,15 @@ -module(cowboy_dispatcher). -export([split_host/1, split_path/1, match/3]). %% API. +-type bindings() :: list({Key::atom(), Value::string()}). +-type path_tokens() :: list(nonempty_string()). +-type match_rule() :: '_' | '*' | list(string() | '_' | atom()). +-type dispatch_rule() :: {Host::match_rule(), list({Path::match_rule(), + Handler::module(), Opts::term()})}. +-type dispatch_rules() :: list(dispatch_rule()). + +-export_type([bindings/0, path_tokens/0, dispatch_rules/0]). + -include("include/types.hrl"). -include_lib("eunit/include/eunit.hrl"). |