Maverick.Route (Maverick v0.2.0) View Source
A struct detailing a Maverick Route. The contents are determined at compile time by the annotations applied to routable functions.
Maverick uses the routes to construct request handlers for each routable function at runtime.
Link to this section Summary
Functions
Takes an OTP app name and a root scope and returns a list of all routes the app defines as %MODULE structs.
Link to this section Types
Specs
args() :: :params | :request | {:required_params, [atom()]}
Specs
error_code() :: non_neg_integer()
Specs
method() :: binary()
Specs
success_code() :: non_neg_integer()
Specs
t() :: %Maverick.Route{
args: args(),
error_code: error_code(),
function: atom(),
method: method(),
module: module(),
path: Maverick.Path.path(),
raw_path: Maverick.Path.raw_path(),
success_code: success_code()
}
Link to this section Functions
Specs
list_routes(Maverick.otp_app(), Maverick.root_scope()) :: [t()]
Takes an OTP app name and a root scope and returns a list of all routes the app defines as %MODULE structs.