trails_handler behaviour (trails v3.0.0)

View Source

Trails handler. Handlers can implement either the trails/0 or trails/1 callback to expose the cowboy routes in the project.

Summary

Callbacks

Returns the cowboy routes defined in the called module.

Returns the cowboy routes defined in the called module.

Callbacks

trails()

(optional)
-callback trails() -> trails:trails().

Returns the cowboy routes defined in the called module.

trails(Opts)

(optional)
-callback trails(Opts :: map()) -> trails:trails().

Returns the cowboy routes defined in the called module.

Functions

trails(Opts)

-spec trails(module() | {module(), map()}) -> trails:trails().