multiverse v0.5.1 Multiverse

This is a Plug that allows to manage multiple API versions via API gateways.

Example Usage

pipeline :api do
  ...
  plug Multiverse, gates: [
    "2016-07-31": GateName
  ], version_header: "x-api-version", error_callback: &custom_error_callback/1
end

Link to this section Summary

Functions

Callback implementation for Plug.call/2

Default error callback, that will be used if no error_callback was specified in options

Returns string with a current date in format YYYY-MM-DD

Callback implementation for Plug.init/1

Link to this section Types

Link to this section Functions

Callback implementation for Plug.call/2.

Link to this function default_error_callback(_, _)

Default error callback, that will be used if no error_callback was specified in options.

Returns string with a current date in format YYYY-MM-DD.

Link to this function get_latest_version()

Returns string with a current date in format YYYY-MM-DD.

Callback implementation for Plug.init/1.