Documentation ¶
Index ¶
- func GetRequestFingerprint(req *http.Request, requestBody []byte, webserver bool) string
- type MatchingError
- type RequestMatcher
- type RequestTemplate
- type RequestTemplateResponsePair
- type RequestTemplateResponsePairPayload
- type RequestTemplateResponsePairView
- type RequestTemplateStore
- func (this *RequestTemplateStore) GetPayload() RequestTemplateResponsePairPayload
- func (this *RequestTemplateStore) GetResponse(req models.RequestDetails, webserver bool) (*models.ResponseDetails, error)
- func (this *RequestTemplateStore) ImportPayloads(pairPayload 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 (*RequestTemplateResponsePair) ConvertToRequestResponsePairView ¶ added in v0.8.1
func (this *RequestTemplateResponsePair) ConvertToRequestResponsePairView() views.RequestResponsePairView
func (*RequestTemplateResponsePair) ConvertToRequestTemplateResponsePairView ¶ added in v0.8.1
func (this *RequestTemplateResponsePair) ConvertToRequestTemplateResponsePairView() RequestTemplateResponsePairView
type RequestTemplateResponsePairPayload ¶ added in v0.8.1
type RequestTemplateResponsePairPayload struct {
Data *[]RequestTemplateResponsePairView `json:"data"`
}
func (*RequestTemplateResponsePairPayload) ConvertToRequestTemplateStore ¶ added in v0.8.1
func (this *RequestTemplateResponsePairPayload) ConvertToRequestTemplateStore() RequestTemplateStore
type RequestTemplateResponsePairView ¶ added in v0.8.1
type RequestTemplateResponsePairView struct { RequestTemplate RequestTemplate `json:"requestTemplate"` Response views.ResponseDetailsView `json:"response"` }
func (*RequestTemplateResponsePairView) ConvertToRequestTemplateResponsePair ¶ added in v0.8.1
func (this *RequestTemplateResponsePairView) ConvertToRequestTemplateResponsePair() RequestTemplateResponsePair
type RequestTemplateStore ¶
type RequestTemplateStore []RequestTemplateResponsePair
func (*RequestTemplateStore) GetPayload ¶ added in v0.8.1
func (this *RequestTemplateStore) GetPayload() RequestTemplateResponsePairPayload
func (*RequestTemplateStore) GetResponse ¶
func (this *RequestTemplateStore) GetResponse(req models.RequestDetails, webserver bool) (*models.ResponseDetails, error)
func (*RequestTemplateStore) ImportPayloads ¶
func (this *RequestTemplateStore) ImportPayloads(pairPayload 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.