matching

package
v0.11.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExactMatch added in v0.11.0

func ExactMatch(matchingString string, toMatch string) bool

func FieldMatcher added in v0.11.0

func FieldMatcher(field *models.RequestFieldMatchers, toMatch string) bool

func GlobMatch added in v0.11.0

func GlobMatch(matchingString string, toMatch string) bool

func HeaderMatcher added in v0.11.0

func HeaderMatcher(matchingHeaders, toMatch map[string][]string) bool

func JsonMatch added in v0.11.0

func JsonMatch(matchingString string, toMatch string) bool

func JsonPathMatch added in v0.11.0

func JsonPathMatch(matchingString string, toMatch string) bool

func RegexMatch added in v0.11.0

func RegexMatch(matchingString string, toMatch string) bool

func RequestMatcher

func RequestMatcher(req models.RequestDetails, webserver bool, simulation *models.Simulation) (*models.RequestMatcherResponsePair, error)

func XmlMatch added in v0.11.0

func XmlMatch(matchingString string, toMatch string) bool

func XpathMatch added in v0.11.0

func XpathMatch(matchingString string, toMatch string) bool

Types

type CacheMatcher added in v0.11.0

type CacheMatcher struct {
	RequestCache cache.Cache
	Webserver    bool
}

func (CacheMatcher) FlushCache added in v0.11.0

func (this CacheMatcher) FlushCache() error

func (CacheMatcher) GetAllResponses added in v0.11.0

func (this CacheMatcher) GetAllResponses() (v2.CacheView, error)

func (*CacheMatcher) GetCachedResponse added in v0.11.0

func (this *CacheMatcher) GetCachedResponse(req *models.RequestDetails) (*models.CachedResponse, *MatchingError)

getResponse returns stored response from cache

func (CacheMatcher) PreloadCache added in v0.11.0

func (this CacheMatcher) PreloadCache(simulation models.Simulation) error

func (*CacheMatcher) SaveRequestMatcherResponsePair added in v0.11.0

func (this *CacheMatcher) SaveRequestMatcherResponsePair(request models.RequestDetails, pair *models.RequestMatcherResponsePair) error

type MatchingError

type MatchingError struct {
	StatusCode  int
	Description string
}

func (MatchingError) Error

func (this MatchingError) Error() string

Jump to

Keyboard shortcuts

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