Documentation ¶
Index ¶
- Variables
- type Request
- func (request *Request) Compile(options *protocols.ExecutorOptions) error
- func (request *Request) ExecuteWithResults(input *contextargs.Context, metadata, previous output.InternalEvent, ...) error
- func (request *Request) Extract(data map[string]interface{}, extractor *extractors.Extractor) map[string]struct{}
- func (request *Request) GetCompiledOperators() []*operators.Operators
- func (request *Request) GetID() string
- func (request *Request) MakeResultEvent(wrapped *output.InternalWrappedEvent) []*output.ResultEvent
- func (request *Request) MakeResultEventItem(wrapped *output.InternalWrappedEvent) *output.ResultEvent
- func (request *Request) Match(data map[string]interface{}, matcher *matchers.Matcher) (bool, []string)
- func (request *Request) Requests() int
- func (request *Request) Type() templateTypes.ProtocolType
Constants ¶
This section is empty.
Variables ¶
var RequestPartDefinitions = map[string]string{
"template-id": "ID of the template executed",
"template-info": "Info Block of the template executed",
"template-path": "Path of the template executed",
"host": "Host is the input to the template",
"matched": "Matched is the input which was matched upon",
"type": "Type is the type of request made",
"request": "HTTP request made from the client",
"response": "HTTP response received from server",
"status_code": "Status Code received from the Server",
"body": "HTTP response body received from server (default)",
"content_length": "HTTP Response content length",
"header,all_headers": "HTTP response headers",
"duration": "HTTP request time duration",
"all": "HTTP response body + headers",
"cookies_from_response": "HTTP response cookies in name:value format",
"headers_from_response": "HTTP response headers in name:value format",
}
RequestPartDefinitions contains a mapping of request part definitions and their description. Multiple definitions are separated by commas. Definitions not having a name (generated on runtime) are prefixed & suffixed by <>.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request is a offline http response processing request
func (*Request) Compile ¶
func (request *Request) Compile(options *protocols.ExecutorOptions) error
Compile compiles the protocol request for further execution.
func (*Request) ExecuteWithResults ¶
func (request *Request) ExecuteWithResults(input *contextargs.Context, metadata, previous output.InternalEvent, callback protocols.OutputEventCallback) error
ExecuteWithResults executes the protocol requests and returns results instead of writing them.
func (*Request) Extract ¶
func (request *Request) Extract(data map[string]interface{}, extractor *extractors.Extractor) map[string]struct{}
Extract performs extracting operation for an extractor on model and returns true or false.
func (*Request) GetCompiledOperators ¶
func (*Request) MakeResultEvent ¶
func (request *Request) MakeResultEvent(wrapped *output.InternalWrappedEvent) []*output.ResultEvent
MakeResultEvent creates a result event from internal wrapped event
func (*Request) MakeResultEventItem ¶
func (request *Request) MakeResultEventItem(wrapped *output.InternalWrappedEvent) *output.ResultEvent
func (*Request) Match ¶
func (request *Request) Match(data map[string]interface{}, matcher *matchers.Matcher) (bool, []string)
Match matches a generic data response again a given matcher
func (*Request) Type ¶
func (request *Request) Type() templateTypes.ProtocolType
Type returns the type of the protocol request