predicates

package
v0.9.31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPredicateParameters = errors.New("invalid predicate parameters")

Error used in case of invalid predicate parameters.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package cookie implements prediate to check parsed cookie headers by name and value.
Package cookie implements prediate to check parsed cookie headers by name and value.
Package interval implements custom predicates to match routes only during some period of time.
Package interval implements custom predicates to match routes only during some period of time.
Package source implements a custom predicate to match routes based on the Query Params in URL It supports checking existence of query params and also checking whether query params value match to a given regular exp Examples: // Checking existence of a query param // matches http://example.org?bb=a&query=withvalue example1: QueryParam("query") -> "http://example.org"; // Even a query param without a value // matches http://example.org?bb=a&query= example1: QueryParam("query") -> "http://example.org"; // matches with regexp // matches http://example.org?bb=a&query=example example1: QueryParam("query", "^example$") -> "http://example.org"; // matches with regexp and multiple values of query param // matches http://example.org?bb=a&query=testing&query=example example1: QueryParam("query", "^example$") -> "http://example.org";
Package source implements a custom predicate to match routes based on the Query Params in URL It supports checking existence of query params and also checking whether query params value match to a given regular exp Examples: // Checking existence of a query param // matches http://example.org?bb=a&query=withvalue example1: QueryParam("query") -> "http://example.org"; // Even a query param without a value // matches http://example.org?bb=a&query= example1: QueryParam("query") -> "http://example.org"; // matches with regexp // matches http://example.org?bb=a&query=example example1: QueryParam("query", "^example$") -> "http://example.org"; // matches with regexp and multiple values of query param // matches http://example.org?bb=a&query=testing&query=example example1: QueryParam("query", "^example$") -> "http://example.org";
Package source implements a custom predicate to match routes based on the source IP of a request.
Package source implements a custom predicate to match routes based on the source IP of a request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL