package querystring
import "github.com/google/martian/v3/querystring"
Package querystring contains a modifier to rewrite query strings in a request.
Index ¶
- func NewModifier(key, value string) martian.RequestModifier
- func NewVerifier(key, value string) (verify.RequestVerifier, error)
- type Filter
- type Matcher
Functions ¶
func NewModifier ¶
func NewModifier(key, value string) martian.RequestModifier
NewModifier returns a request modifier that will set the query string at key with the given value. If the query string key already exists all values will be overwritten.
func NewVerifier ¶
func NewVerifier(key, value string) (verify.RequestVerifier, error)
NewVerifier returns a new param verifier.
Types ¶
type Filter ¶
Filter runs modifiers iff the request query parameter for name matches value.
func NewFilter ¶
NewFilter builds a querystring.Filter that filters on name and optionally value.
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher is a conditonal evalutor of query string parameters to be used in structs that take conditions.
func NewMatcher ¶
NewMatcher builds a new querystring matcher
func (*Matcher) MatchRequest ¶
MatchRequest evaluates a request and returns whether or not the request contains a querystring param that matches the provided name and value.
func (*Matcher) MatchResponse ¶
MatchResponse evaluates a response and returns whether or not the request that resulted in that response contains a querystring param that matches the provided name and value.
Source Files ¶
query_string_filter.go query_string_matcher.go query_string_modifier.go query_string_verifier.go
- Version
- v3.0.0
- Published
- Jul 9, 2019
- Platform
- windows/amd64
- Imports
- 8 packages
- Last checked
- 1 hour ago –
Tools for package owners.