Documentation ¶
Overview ¶
Package parser parses websites and generates tree structures (i.e. maps) of their connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Client *http.Client
)
Functions ¶
Types ¶
type HttpPage ¶
type HttpPage struct {
Path string
}
HttpPage represents web page with html content
func (HttpPage) GetBasePath ¶
GetBasePath Returns base path of a page
func (HttpPage) GetContent ¶
GetContent Returns page content
type Link ¶
type Link struct { Value string `json:"value"` // Full url Info LinkInfo `json:"info"` // Additional information object Children []Link `json:"children"` // Slice of Links found on this link's url }
Link represents a parsed site URL, it is a node, children are links found on parent node's html page response.
type LinkInfo ¶
type LinkInfo struct { Id int `json:"id"` // Unique id for the node in a tree ShortValue string `json:"value_short"` // Shorthand value/name Depth int `json:"depth"` // Depth of the node in a tree Width int `json:"width"` // Position of node in children slice (0 for each first node child) }
LinkInfo represents some additional information regarding link (it's position, index and so on)
Click to show internal directories.
Click to hide internal directories.