Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changeable ¶
type Config ¶
type Config struct { URL string `json:"url"` Parsing *ParsingConfig `json:"parsing"` Output []*Filter `json:"output"` }
Config describes the whole process of generating sitemap
type Filter ¶
type Filter struct { Regex *Regex `json:"regex"` PerFile int `json:"perFile"` FilePrefix string `json:"filePrefix"` Modifiers Changeable `json:"modifiers,omitempty"` IncludeModificationDate bool `json:"modificationDate,omitempty"` }
Filter defines how urls are being put into separated files sitemap
type ParamsFilter ¶
type ParsingConfig ¶
type ParsingConfig struct { Workers int `json:"workers"` //ParseExclusions regex array defines what sites content is not parsed but included in sitemap ParseExclusions []*Regex `json:"parseExclusions,omitempty"` RespectRobots bool `json:"respectRobots,omitempty"` //ResultExclusions regex array defines what sites are being excluded from the sitemap Params []*ParamsFilter `json:"params,omitempty"` CutProtocol bool `json:"cutProtocol,omitempty"` Proxies []Proxy `json:"proxies,omitempty"` UserAgent string `json:"userAgent,omitempty"` RequestsPerSecond int64 `json:"requestsPerSec,omitempty"` Burst int `json:"burst,omitempty"` StripQueryString bool `json:"stripQueryString,omitempty"` StripWWW bool `json:"stripWWW,omitempty"` NoProxyClient bool `json:"noProxyClient,omitempty"` }
ParsingConfig describes site parsing process
type Proxy ¶
type Proxy struct { Address string `json:"address"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` }
Proxy represents a proxy configuration to be used for parsing
type Regex ¶
Regex is a wrapper for regexp.Regexp but implements json marshaler interface
func (*Regex) MarshalJSON ¶
MarshalJSON turns regex into string/json
func (*Regex) UnmarshalJSON ¶
UnmarshalJSON turns a string into proper regex
Click to show internal directories.
Click to hide internal directories.