Documentation ¶
Index ¶
- func ExactMatch(matchingString string, toMatch string) bool
- func FirstMatchRequestMatcher(req models.RequestDetails, webserver bool, simulation *models.Simulation, ...) (*models.RequestMatcherResponsePair, *models.MatchError, bool)
- func GlobMatch(matchingString string, toMatch string) bool
- func JsonMatch(matchingString string, toMatch string) bool
- func JsonPathMatch(matchingString string, toMatch string) bool
- func RegexMatch(matchingString string, toMatch string) bool
- func StrongestMatchRequestMatcher(req models.RequestDetails, webserver bool, simulation *models.Simulation, ...) (requestMatch *models.RequestMatcherResponsePair, err *models.MatchError, ...)
- func XmlMatch(matchingString string, toMatch string) bool
- func XpathMatch(matchingString string, toMatch string) bool
- type CacheMatcher
- func (this CacheMatcher) FlushCache() error
- func (this CacheMatcher) GetAllResponses() (v2.CacheView, error)
- func (this *CacheMatcher) GetCachedResponse(req *models.RequestDetails) (*models.CachedResponse, *MatchingError)
- func (this CacheMatcher) PreloadCache(simulation models.Simulation) error
- func (this *CacheMatcher) SaveRequestMatcherResponsePair(request models.RequestDetails, pair *models.RequestMatcherResponsePair, ...) error
- type FieldMatch
- func CountingHeaderMatcher(requestMatcherHeaders, toMatch map[string][]string) *FieldMatch
- func CountlessHeaderMatcher(requestMatcherHeaders, toMatch map[string][]string) *FieldMatch
- func FieldMatchWithNoScore(matched bool) *FieldMatch
- func ScoredFieldMatcher(field *models.RequestFieldMatchers, toMatch string) *FieldMatch
- func ScoredStateMatcher(currentState, requiredState map[string]string) *FieldMatch
- func UnscoredFieldMatcher(field *models.RequestFieldMatchers, toMatch string) *FieldMatch
- func UnscoredStateMatcher(currentState, requiredState map[string]string) *FieldMatch
- type MatchingError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExactMatch ¶ added in v0.11.0
func FirstMatchRequestMatcher ¶ added in v0.12.0
func FirstMatchRequestMatcher(req models.RequestDetails, webserver bool, simulation *models.Simulation, currentState map[string]string) (*models.RequestMatcherResponsePair, *models.MatchError, bool)
func JsonPathMatch ¶ added in v0.11.0
func RegexMatch ¶ added in v0.11.0
func StrongestMatchRequestMatcher ¶ added in v0.12.0
func StrongestMatchRequestMatcher(req models.RequestDetails, webserver bool, simulation *models.Simulation, state map[string]string) (requestMatch *models.RequestMatcherResponsePair, err *models.MatchError, cachable bool)
func XpathMatch ¶ added in v0.11.0
Types ¶
type CacheMatcher ¶ added in v0.11.0
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, matchError *models.MatchError) error
TODO: This would be easier to reason about if we had two methods, "CacheHit" and "CacheHit" in order to reduce bloating
type FieldMatch ¶ added in v0.12.0
func CountingHeaderMatcher ¶ added in v0.12.0
func CountingHeaderMatcher(requestMatcherHeaders, toMatch map[string][]string) *FieldMatch
func CountlessHeaderMatcher ¶ added in v0.12.0
func CountlessHeaderMatcher(requestMatcherHeaders, toMatch map[string][]string) *FieldMatch
func FieldMatchWithNoScore ¶ added in v0.12.0
func FieldMatchWithNoScore(matched bool) *FieldMatch
func ScoredFieldMatcher ¶ added in v0.12.0
func ScoredFieldMatcher(field *models.RequestFieldMatchers, toMatch string) *FieldMatch
func ScoredStateMatcher ¶ added in v0.14.0
func ScoredStateMatcher(currentState, requiredState map[string]string) *FieldMatch
func UnscoredFieldMatcher ¶ added in v0.12.0
func UnscoredFieldMatcher(field *models.RequestFieldMatchers, toMatch string) *FieldMatch
func UnscoredStateMatcher ¶ added in v0.14.0
func UnscoredStateMatcher(currentState, requiredState map[string]string) *FieldMatch
type MatchingError ¶
func MissedError ¶ added in v0.12.0
func MissedError(miss *models.ClosestMiss) *MatchingError
func (MatchingError) Error ¶
func (this MatchingError) Error() string
Click to show internal directories.
Click to hide internal directories.