Routable is interface for registering Route with Router. During route registration process the Router will convert Routable to RouteInfo with ToRouteInfo method. By creating custom implementation of Routable additional information about registered route can be stored in Routes (i.e. privileges used with route etc.)

Hierarchy

  • Routable

Indexable

[key: string]: any

Methods

  • ForGroup recreates routable with added group prefix and group middlewares it is grouped to.

    Is necessary for Echo.Group to be able to add/register Routable with Router and having group prefix and group middlewares included in actually registered Route.

    Parameters

    Returns Routable

  • ToRoute converts Routable to Route which Router uses to register the method handler for path.

    This method is meant to be used by Router to get fields (including handler and middleware functions) needed to add Route to Router.

    Returns Route

  • ToRouteInfo converts Routable to RouteInfo

    This method is meant to be used by Router after it parses url for path parameters, to store information about route just added.

    Parameters

    • params: string[]

    Returns RouteInfo

Generated using TypeDoc