Documentation ¶
Index ¶
- func GetRequestFingerprint(req *http.Request, requestBody []byte, webserver bool) string
- type MatchingError
- type RequestMatcher
- type RequestTemplate
- type RequestTemplatePayload
- type RequestTemplatePayloadJson
- type RequestTemplatePayloadView
- type RequestTemplateStore
- func (this *RequestTemplateStore) ConvertToPayloadJson() RequestTemplatePayloadJson
- func (this *RequestTemplateStore) GetResponse(req models.RequestDetails, webserver bool) (*models.ResponseDetails, error)
- func (this *RequestTemplateStore) ImportPayloads(payloadsView RequestTemplatePayloadJson) 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) SavePayload ¶
func (this *RequestMatcher) SavePayload(payload *models.Payload) error
type RequestTemplate ¶
type RequestTemplatePayload ¶
type RequestTemplatePayload struct { RequestTemplate RequestTemplate `json:"requestTemplate"` Response models.ResponseDetails `json:"response"` }
func (*RequestTemplatePayload) ConvertToRequestTemplatePayloadView ¶
func (this *RequestTemplatePayload) ConvertToRequestTemplatePayloadView() RequestTemplatePayloadView
type RequestTemplatePayloadJson ¶
type RequestTemplatePayloadJson struct {
Data *[]RequestTemplatePayloadView `json:"data"`
}
func (*RequestTemplatePayloadJson) ConvertToRequestTemplateStore ¶
func (this *RequestTemplatePayloadJson) ConvertToRequestTemplateStore() RequestTemplateStore
type RequestTemplatePayloadView ¶
type RequestTemplatePayloadView struct { RequestTemplate RequestTemplate `json:"requestTemplate"` Response views.ResponseDetailsView `json:"response"` }
func (*RequestTemplatePayloadView) ConvertToPayload ¶
func (this *RequestTemplatePayloadView) ConvertToPayload() RequestTemplatePayload
type RequestTemplateStore ¶
type RequestTemplateStore []RequestTemplatePayload
func (*RequestTemplateStore) ConvertToPayloadJson ¶
func (this *RequestTemplateStore) ConvertToPayloadJson() RequestTemplatePayloadJson
func (*RequestTemplateStore) GetResponse ¶
func (this *RequestTemplateStore) GetResponse(req models.RequestDetails, webserver bool) (*models.ResponseDetails, error)
func (*RequestTemplateStore) ImportPayloads ¶
func (this *RequestTemplateStore) ImportPayloads(payloadsView RequestTemplatePayloadJson) 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.