Documentation ¶
Index ¶
- func ConvertArrayFieldsToMatchers[T any, M any](builder MatcherBuilder[T, M], arrayValue []any) (err error)
- func ConvertMapKeysToMatchers[T any, M any](builder MatcherBuilder[T, M], mapValue map[string]any) (err error)
- type CookieMatcher
- type CookieMatcherBuilder
- func (b CookieMatcherBuilder) Create(field map[string]any) (Matcher[expectation.Cookie, http.Cookie], error)
- func (b CookieMatcherBuilder) CreateFromArrayValue(value []any, matchExpr string) (Matcher[expectation.Cookie, http.Cookie], error)
- func (b CookieMatcherBuilder) CreateFromSingleValue(value any, matchExpr string) (Matcher[expectation.Cookie, http.Cookie], error)
- type Matcher
- type MatcherBuilder
- type RequestMatcher
- type RequestParameterMatcher
- type StringArrayMatcher
- type StringArrayMatcherBuilder
- func (b StringArrayMatcherBuilder) Create(field map[string]any) (Matcher[[]string, []string], error)
- func (b StringArrayMatcherBuilder) CreateFromArrayValue(value []any, matchExpr string) (Matcher[[]string, []string], error)
- func (b StringArrayMatcherBuilder) CreateFromSingleValue(value any, matchExpr string) (Matcher[[]string, []string], error)
- type StringMatcher
- type StringMatcherBuilder
- func (b StringMatcherBuilder) Create(field map[string]any) (Matcher[string, string], error)
- func (b StringMatcherBuilder) CreateFromArrayValue(value []any, matchExpr string) (Matcher[string, string], error)
- func (b StringMatcherBuilder) CreateFromSingleValue(value any, matchExpr string) (Matcher[string, string], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertArrayFieldsToMatchers ¶
func ConvertArrayFieldsToMatchers[T any, M any](builder MatcherBuilder[T, M], arrayValue []any) (err error)
Types ¶
type CookieMatcher ¶
type CookieMatcher struct { expectation.CueMatcher[expectation.Cookie] }
func NewCookieMatcher ¶
func NewCookieMatcher(value expectation.Cookie, matchType string) *CookieMatcher
type CookieMatcherBuilder ¶
type CookieMatcherBuilder struct{}
func (CookieMatcherBuilder) Create ¶
func (b CookieMatcherBuilder) Create(field map[string]any) (Matcher[expectation.Cookie, http.Cookie], error)
func (CookieMatcherBuilder) CreateFromArrayValue ¶
func (b CookieMatcherBuilder) CreateFromArrayValue(value []any, matchExpr string) (Matcher[expectation.Cookie, http.Cookie], error)
func (CookieMatcherBuilder) CreateFromSingleValue ¶
func (b CookieMatcherBuilder) CreateFromSingleValue(value any, matchExpr string) (Matcher[expectation.Cookie, http.Cookie], error)
type Matcher ¶
TODO: consider merging this package with the expectation package as expectation package cannot use matcher as it causes a circular dependency
type MatcherBuilder ¶
type RequestMatcher ¶
type RequestMatcher struct { Value expectation.Request RequestParameterMatcher *RequestParameterMatcher }
func NewRequestMatcher ¶
func NewRequestMatcher(value expectation.Request) *RequestMatcher
func (RequestMatcher) Matches ¶
func (rm RequestMatcher) Matches(request *http.Request, requestParameters *schema.RequestParameters) bool
type RequestParameterMatcher ¶
type RequestParameterMatcher struct { expectation.CueMatcher[expectation.RequestParameters] }
func NewRequestParameterMatcher ¶
func NewRequestParameterMatcher(value *expectation.RequestParameters) *RequestParameterMatcher
func (*RequestParameterMatcher) Matches ¶
func (r *RequestParameterMatcher) Matches(rp *schema.RequestParameters) bool
type StringArrayMatcher ¶
type StringArrayMatcher struct { expectation.CueMatcher[[]string] }
func NewStringArrayMatcher ¶
func NewStringArrayMatcher(value *[]string, matchType string) *StringArrayMatcher
func (StringArrayMatcher) Matches ¶
func (m StringArrayMatcher) Matches(value *[]string) bool
type StringArrayMatcherBuilder ¶
type StringArrayMatcherBuilder struct{}
func (StringArrayMatcherBuilder) CreateFromArrayValue ¶
func (StringArrayMatcherBuilder) CreateFromSingleValue ¶
type StringMatcher ¶
type StringMatcher struct { expectation.CueMatcher[string] }
func NewStringMatcher ¶
func NewStringMatcher(value *string, matchType string) *StringMatcher
func (StringMatcher) Matches ¶
func (m StringMatcher) Matches(value *string) bool
type StringMatcherBuilder ¶
type StringMatcherBuilder struct{}
func (StringMatcherBuilder) CreateFromArrayValue ¶
func (StringMatcherBuilder) CreateFromSingleValue ¶
Click to show internal directories.
Click to hide internal directories.