Documentation ¶
Index ¶
- type Request
- func (request *Request) Compile(options *protocols.ExecutorOptions) error
- func (request *Request) ExecuteWithResults(input *contextargs.Context, dynamicValues, previous output.InternalEvent, ...) error
- func (request *Request) Extract(data map[string]interface{}, matcher *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 ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { // Operators for the current request go here. operators.Operators `yaml:",inline,omitempty" json:",inline,omitempty"` CompiledOperators *operators.Operators `yaml:"-" json:"-"` // ID is the optional id of the request ID string `yaml:"id,omitempty" json:"id,omitempty" jsonschema:"title=id of the request,description=ID of the network request"` // description: | // Query contains query for the request Query string `` /* 141-byte string literal not displayed */ // description: | // Optional WHOIS server URL. // // If present, specifies the WHOIS server to execute the Request on. // Otherwise, nil enables bootstrapping Server string `` /* 184-byte string literal not displayed */ // contains filtered or unexported fields }
Request is a request for the WHOIS protocol
func (*Request) Compile ¶
func (request *Request) Compile(options *protocols.ExecutorOptions) error
Compile compiles the request generators preparing any requests possible.
func (*Request) ExecuteWithResults ¶
func (request *Request) ExecuteWithResults(input *contextargs.Context, dynamicValues, 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{}, matcher *extractors.Extractor) map[string]struct{}
Extract performs extracting operation for an extractor on model and returns true or false.
func (*Request) GetCompiledOperators ¶
GetCompiledOperators returns a list of the compiled operators
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 performs matching operation for a matcher on model and returns: true and a list of matched snippets if the matcher type is supports it otherwise false and an empty string slice
func (*Request) Type ¶
func (request *Request) Type() templateTypes.ProtocolType
Type returns the type of the protocol request