Documentation ¶
Overview ¶
Package requests implements requests for templates that will be sent to hosts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSRequest ¶ added in v1.1.1
type DNSRequest struct { Recursion bool `yaml:"recursion"` // Path contains the path/s for the request Name string `yaml:"name"` Type string `yaml:"type"` Class string `yaml:"class"` Retries int `yaml:"retries"` // Matchers contains the detection mechanism for the request to identify // whether the request was successful Matchers []*matchers.Matcher `yaml:"matchers,omitempty"` // MatchersCondition is the condition of the matchers // whether to use AND or OR. Default is OR. MatchersCondition string `yaml:"matchers-condition,omitempty"` // Extractors contains the extraction mechanism for the request to identify // and extract parts of the response. Extractors []*extractors.Extractor `yaml:"extractors,omitempty"` // contains filtered or unexported fields }
DNSRequest contains a request to be made from a template
func (*DNSRequest) GetMatchersCondition ¶ added in v1.1.1
func (r *DNSRequest) GetMatchersCondition() matchers.ConditionType
GetMatchersCondition returns the condition for the matcher
func (*DNSRequest) MakeDNSRequest ¶ added in v1.1.1
func (r *DNSRequest) MakeDNSRequest(domain string) (*dns.Msg, error)
MakeDNSRequest creates a *dns.Request from a request template
func (*DNSRequest) SetMatchersCondition ¶ added in v1.1.1
func (r *DNSRequest) SetMatchersCondition(condition matchers.ConditionType)
SetMatchersCondition sets the condition for the matcher
type HTTPRequest ¶ added in v1.1.1
type HTTPRequest struct { // Method is the request method, whether GET, POST, PUT, etc Method string `yaml:"method"` // Path contains the path/s for the request Path []string `yaml:"path"` // Headers contains headers to send with the request Headers map[string]string `yaml:"headers,omitempty"` // Body is an optional parameter which contains the request body for POST methods, etc Body string `yaml:"body,omitempty"` // Matchers contains the detection mechanism for the request to identify // whether the request was successful Matchers []*matchers.Matcher `yaml:"matchers,omitempty"` // MatchersCondition is the condition of the matchers // whether to use AND or OR. Default is OR. MatchersCondition string `yaml:"matchers-condition,omitempty"` // Extractors contains the extraction mechanism for the request to identify // and extract parts of the response. Extractors []*extractors.Extractor `yaml:"extractors,omitempty"` // Redirects specifies whether redirects should be followed. Redirects bool `yaml:"redirects,omitempty"` // MaxRedirects is the maximum number of redirects that should be followed. MaxRedirects int `yaml:"max-redirects,omitempty"` // contains filtered or unexported fields }
HTTPRequest contains a request to be made from a template
func (*HTTPRequest) GetMatchersCondition ¶ added in v1.1.1
func (r *HTTPRequest) GetMatchersCondition() matchers.ConditionType
GetMatchersCondition returns the condition for the matcher
func (*HTTPRequest) MakeHTTPRequest ¶ added in v1.1.1
func (r *HTTPRequest) MakeHTTPRequest(baseURL string) ([]*retryablehttp.Request, error)
MakeHTTPRequest creates a *http.Request from a request template
func (*HTTPRequest) SetMatchersCondition ¶ added in v1.1.1
func (r *HTTPRequest) SetMatchersCondition(condition matchers.ConditionType)
SetMatchersCondition sets the condition for the matcher
Click to show internal directories.
Click to hide internal directories.