Routex.Route (Routex v1.2.2)
View SourceFunction for working with Routex augmented Phoenix Routes
Summary
Functions
Compatibility wrapper around Phoenix.Router.Route.exprs
Returns a list of unique backends
Returns the nesting level of an (ancestor) route. By default the parent. This can be adjusted by providing an negative depth offset.
Returns routes grouped by the combination of method and origin path
Returns routes grouped by nesting level of an (ancestor) route. By default groups by parent. This can be adjusted by providing an negative depth offset
Functions
@spec exprs(Routex.Types.route(), Routex.Types.env()) :: map()
Compatibility wrapper around Phoenix.Router.Route.exprs
@spec get_backends(Routex.Types.routes()) :: [Routex.Types.backend()]
Returns a list of unique backends
@spec get_nesting(Routex.Types.route(), integer()) :: [integer()]
Returns the nesting level of an (ancestor) route. By default the parent. This can be adjusted by providing an negative depth offset.
Returns routes grouped by the combination of method and origin path
@spec group_by_method_and_path(Routex.Types.routes(), integer()) :: %{ required({atom(), binary()}) => Routex.Types.routes() }
@spec group_by_nesting(Routex.Types.routes(), integer()) :: %{ required([integer()]) => Routex.Types.routes() }
Returns routes grouped by nesting level of an (ancestor) route. By default groups by parent. This can be adjusted by providing an negative depth offset