Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Scraper ¶
type Scraper struct {
Rules []*ScraperRule
}
func (*Scraper) AppendFromFile ¶
FromFile initializes a scraper instance and reads rules from a file
func (*Scraper) NeedsResponseBody ¶
NeedsResponseBody reports whether any active rule observes response data. Execute treats "headers" as the only header-only target; body, both, and unknown/omitted targets all include resp.Data and therefore require GET.
type ScraperGroup ¶
type ScraperGroup struct {
Rules []*ScraperRule `json:"rules"`
Name string `json:"groupname"`
Active bool `json:"active"`
}
type ScraperRule ¶
type ScraperRule struct {
Name string `json:"name"`
Rule string `json:"rule"`
Target string `json:"target"`
Type string `json:"type"`
OnlyMatched bool `json:"onlymatched"`
Action []string `json:"action"`
// contains filtered or unexported fields
}
func (*ScraperRule) Check ¶
func (r *ScraperRule) Check(data string) []string
Click to show internal directories.
Click to hide internal directories.