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
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.