View Source API Reference Unplug v1.1.0

Modules

The purpose of Unplug is to provide a wrapper around any arbitrary plug, with the ability to conditionally execute that plug at run-time. The runtime conditions that are leveraged by Unplug must conform to the Unplug.Predicate behaviour. Out of the box Unplug comes with predicates that can be used to execute plugs based on

Given a list of predicates, execute the plug if all of the predicates return true.

Given a list of predicates, execute the plug if any of the predicates return true.

This behaviour defines the structure of a module that can be used as an Unplug filter.

Given an application and a key, execute the plug if the configured value matches the expected value.

Given an application and a key, execute the plug if the configured value is in the provided enumerable of values.

Given an application and a key, do not execute the plug if the configured value matches the expected value.

Given an application and a key, execute the plug if the configured value is not in the provided enumerable of values.

Given an environment variable, execute the plug if the configured value matches the expected value.

Given an environment variable, execute the plug if the environment variable value is in the provided enumerable of values.

Given an environment variable, do not execute the plug if the configured value matches the expected value.

Given an environment variable, execute the plug if the environment variable value is not in the provided enumerable of values.

Given a request header, execute the plug if the request value matches the expected value.

Given a request header, do not execute the plug if the request value matches the expected value.

Given a request path, execute the plug if the request value matches the expected value.

Given a request path, execute the plug if the request value is in the the provided enumerable of values.

Given a request path, do not execute the plug if the request value matches the expected value.

Given a request path, do not execute the plug if the request value is in the the provided enumerable of values.