matcher

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	HTTPRequest *http.Request
	SessionID   string
}

func (Context) CountID

func (r Context) CountID() string

func (Context) Key added in v0.0.40

func (r Context) Key() string

func (Context) SequenceID

func (r Context) SequenceID() string

type ResponseMatcher

type ResponseMatcher struct {
	// contains filtered or unexported fields
}

func NewResponseMatcher

func NewResponseMatcher(
	mok *cfg.Mock,
	route *cfg.Route,
	response *cfg.Response,
	req Context,
	db database.EngineDB,
) *ResponseMatcher

func (*ResponseMatcher) Match

func (r *ResponseMatcher) Match() (bool, error)

type RouteMatcher

type RouteMatcher struct {
	// contains filtered or unexported fields
}

func NewRouteMatcher

func NewRouteMatcher(mock *cfg.Mock, route *cfg.Route, req Context, db database.EngineDB) *RouteMatcher

func (*RouteMatcher) Match

func (r *RouteMatcher) Match() (*cfg.Response, error)

type RuleMatcher

type RuleMatcher struct {
	// contains filtered or unexported fields
}

func NewRuleMatcher

func NewRuleMatcher(mok *cfg.Mock, route *cfg.Route, rule *cfg.Rule, req Context, db database.EngineDB) *RuleMatcher

func (*RuleMatcher) GetTargetValue

func (r *RuleMatcher) GetTargetValue() (string, error)

func (*RuleMatcher) Match

func (r *RuleMatcher) Match() (bool, error)

Jump to

Keyboard shortcuts

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