Maru v0.9.5 API Reference

Modules

This is documentation for maru

General DSLs for parsing router

Handle exceptions of current router

Method DSLs for parsing router

Namespace DSLs for parsing router

Parse and build param_content block

coerce param with base64

coerce param with json

Define helper for maru router

Maru helper for shared params

This module is a wrapper for request and response of maru

Middleware of maru is a standalone plug with Maru.Response helper

Convert param to existing atom

Convert param to boolean

Convert param to chat list

Check param match Plug.Upload struct

Convert param to float

Convert param to integer

Convert param to map from json

Check type of param is list

Check type of param is map

Convert param to string

Keep param without conversion

Deprecated. Fork from Plug.Parsers.JSON, version: plug v1.0.2

Deprecated. Fork from Plug.Parsers.URLENCODED, version: plug v1.0.2

This module is a plug, route extended modules

This module is a plug, match all path and raise Maru.Exceptions.NotFound

This module is a plug, prepare private variable

This module is a plug, route mounted routers

This module is a plug, fetch version from connect and wirte to private variable maru_version

Generate endpoint of maru router

Unittest wrapper for designated router

Param Validator: check whether black value is illegal

Param Validator: make sure at least one of designated params present

Param Validator: make sure only one of designated params present

Param Validator: raise when exclusive params present at the same time

Param Validator: check whether param and regexp matched

Param Validator: check whether param in list or range

Exceptions

Raised when get param from request

Raised when request path matched but method not matched. Catch this exception and return 405 like this

Raised when request path don’t match any router. Catch this exception and return 404 like this

Raised when validater not found

Raised when validate param failed