Documentation ¶
Index ¶
- func GetRequestFingerprint(req *http.Request, requestBody []byte, webserver bool) string
- type MatchingError
- type RequestMatcher
- type RequestTemplate
- type RequestTemplateResponsePair
- func (this *RequestTemplateResponsePair) ConvertToRequestResponsePairView() v2.RequestResponsePairView
- func (this *RequestTemplateResponsePair) ConvertToRequestTemplateResponsePairView() v1.RequestTemplateResponsePairView
- func (this *RequestTemplateResponsePair) ConvertToV1RequestResponsePairView() v1.RequestResponsePairView
- type RequestTemplateStore
- func (this RequestTemplateStore) GetPayload() v1.RequestTemplateResponsePairPayload
- func (this *RequestTemplateStore) GetResponse(req models.RequestDetails, webserver bool) (*models.ResponseDetails, error)
- func (this *RequestTemplateStore) ImportPayloads(pairPayload v1.RequestTemplateResponsePairPayload) error
- func (this *RequestTemplateStore) Wipe()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MatchingError ¶
func (MatchingError) Error ¶
func (this MatchingError) Error() string
type RequestMatcher ¶
type RequestMatcher struct { RequestCache cache.Cache TemplateStore RequestTemplateStore Webserver *bool }
func (*RequestMatcher) GetResponse ¶
func (this *RequestMatcher) GetResponse(req *models.RequestDetails) (*models.ResponseDetails, *MatchingError)
getResponse returns stored response from cache
func (*RequestMatcher) SaveRequestResponsePair ¶ added in v0.8.1
func (this *RequestMatcher) SaveRequestResponsePair(pair *models.RequestResponsePair) error
type RequestTemplate ¶
type RequestTemplateResponsePair ¶ added in v0.8.1
type RequestTemplateResponsePair struct { RequestTemplate RequestTemplate `json:"requestTemplate"` Response models.ResponseDetails `json:"response"` }
func ConvertToRequestTemplateResponsePair ¶ added in v0.9.0
func ConvertToRequestTemplateResponsePair(pairView v1.RequestTemplateResponsePairView) RequestTemplateResponsePair
func (*RequestTemplateResponsePair) ConvertToRequestResponsePairView ¶ added in v0.8.1
func (this *RequestTemplateResponsePair) ConvertToRequestResponsePairView() v2.RequestResponsePairView
func (*RequestTemplateResponsePair) ConvertToRequestTemplateResponsePairView ¶ added in v0.8.1
func (this *RequestTemplateResponsePair) ConvertToRequestTemplateResponsePairView() v1.RequestTemplateResponsePairView
func (*RequestTemplateResponsePair) ConvertToV1RequestResponsePairView ¶ added in v0.9.0
func (this *RequestTemplateResponsePair) ConvertToV1RequestResponsePairView() v1.RequestResponsePairView
DEPRICATED - Once we remove the v1 API, this will also go
type RequestTemplateStore ¶
type RequestTemplateStore []RequestTemplateResponsePair
func ConvertPayloadToRequestTemplateStore ¶ added in v0.9.0
func ConvertPayloadToRequestTemplateStore(payload v1.RequestTemplateResponsePairPayload) RequestTemplateStore
func (RequestTemplateStore) GetPayload ¶ added in v0.8.1
func (this RequestTemplateStore) GetPayload() v1.RequestTemplateResponsePairPayload
func (*RequestTemplateStore) GetResponse ¶
func (this *RequestTemplateStore) GetResponse(req models.RequestDetails, webserver bool) (*models.ResponseDetails, error)
func (*RequestTemplateStore) ImportPayloads ¶
func (this *RequestTemplateStore) ImportPayloads(pairPayload v1.RequestTemplateResponsePairPayload) error
ImportPayloads - a function to save given payloads into the database.
func (*RequestTemplateStore) Wipe ¶
func (this *RequestTemplateStore) Wipe()
Click to show internal directories.
Click to hide internal directories.