Documentation

Index

Constants

This section is empty.

Variables

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

    ErrInvalidPredicateParameters is used in case of invalid predicate parameters.

    Functions

    This section is empty.

    Types

    This section is empty.

    Source Files

    Directories

    Path Synopsis
    Package auth implements custom predicates to match based on content of the HTTP Authorization header.
    Package auth implements custom predicates to match based on content of the HTTP Authorization header.
    Package cookie implements predicate to check parsed cookie headers by name and value.
    Package cookie implements predicate to check parsed cookie headers by name and value.
    Package cron implements custom predicates to match routes only when they also match the system time matches the given cron-like expressions.
    Package cron implements custom predicates to match routes only when they also match the system time matches the given cron-like expressions.
    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 methods implements a custom predicate to match routes based on the http method in request It supports multiple http methods, with case insensitive input Examples: // matches GET request example1: Methods("GET") -> "http://example.org"; // matches GET or POST request example1: Methods("GET", "post") -> "http://example.org";
    Package methods implements a custom predicate to match routes based on the http method in request It supports multiple http methods, with case insensitive input Examples: // matches GET request example1: Methods("GET") -> "http://example.org"; // matches GET or POST request example1: Methods("GET", "post") -> "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 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.
    Package traffic implements a predicate to control the matching probability for a given route by setting its weight.
    Package traffic implements a predicate to control the matching probability for a given route by setting its weight.