Documentation ¶
Index ¶
Constants ¶
View Source
const ( QUERY_PARAM string = "Query" PATH_PARAM string = "Path" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cookie ¶
type Cookie struct { Name string Value string Path string // optional Domain string // optional Expires time.Time // optional RawExpires string // for reading cookies only // MaxAge=0 means no 'Max-Age' attribute specified. // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0' // MaxAge>0 means Max-Age attribute present and given in seconds MaxAge int Secure bool HttpOnly bool SameSite SameSite Raw string Unparsed []string // Raw text of unparsed attribute-value pairs }
struct taking from net/http package
type Expectation ¶
type Expectation struct { Priority int `json:"priority"` Request Request `json:"request"` Response Response `json:"response"` Callback *Callback `json:"callback"` }
func (*Expectation) AddRequestParameterMatchers ¶
func (*Expectation) ValidateRequestParameters ¶
func (e *Expectation) ValidateRequestParameters(requestParamProp schema.RequestParameterProperty) error
ValidateRequestParameters validates the request parameters against the schema
type ExpectationError ¶
type ExpectationError struct { Expectation ExpectationFieldErrors []ExpectationFieldError }
func (ExpectationError) Error ¶
func (e ExpectationError) Error() string
type ExpectationFieldError ¶
type Expectations ¶
type Expectations struct {
Expectations []Expectation `json:"expectations"`
}
type Request ¶
type Request struct { Path string `json:"path"` Method string `json:"method"` Body any `json:"body"` Parameters *RequestParameters `json:"params"` Headers map[string]any `json:"headers"` Cookies *[]Cookie `json:"cookies"` }
type RequestParameters ¶
type RequestParameters struct { Path map[string]any `json:"path"` Query map[string]any `json:"query"` }
func (*RequestParameters) Match ¶
func (r *RequestParameters) Match(rp schema.RequestParameters) bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.