skipper: github.com/zalando/skipper/predicates/query Index | Files

package query

import "github.com/zalando/skipper/predicates/query"

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";

Index

Package Files

query.go

func New Uses

func New() routing.PredicateSpec

New creates a new QueryParam predicate specification.

Package query imports 4 packages (graph) and is imported by 6 packages. Updated 2016-11-29. Refresh now. Tools for package owners.