Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SiteMapItemList ¶
type SiteMapItemList []*SitemapItem
SiteMapItemList implements sort.Interface
func (SiteMapItemList) Len ¶
func (s SiteMapItemList) Len() int
func (SiteMapItemList) Less ¶
func (s SiteMapItemList) Less(i, j int) bool
func (SiteMapItemList) Swap ¶
func (s SiteMapItemList) Swap(i, j int)
type Sitemap ¶
type Sitemap struct { XMLName []struct{} `xml:"urlset"` List SiteMapItemList `xml:"url"` Xmlns string `xml:"xmlns,attr"` XmlnsDO string `xml:"xmlns:webcrawler,attr"` }
Sitemap represents the main structure to render a sitemap xml file.
type SitemapItem ¶
type SitemapItem struct { Location string `xml:"loc"` Links []string `xml:"webcrawler:links>webcrawler:link"` Assets []string `xml:"webcrawler:assets>webcrawler:asset"` ErrorInFetch bool `xml:"webcrawler:error"` ErrorMessage string `xml:"webcrawler:errormessage,omitempty"` Updated time.Time `xml:"webcrawler:updated"` }
SitemapItem represents a SitemapList item
type SitemapList ¶
type SitemapList struct { List map[string]*SitemapItem // contains filtered or unexported fields }
SitemapList represents a thread-safe list to keep the sitemap itens
func NewSitemapList ¶
func NewSitemapList() *SitemapList
NewSitemapList creates a new SitemapList instance
func (*SitemapList) CreateSitemap ¶
func (sl *SitemapList) CreateSitemap() Sitemap
CreateSitemap generates a Sitemap xml structure
func (*SitemapList) Search ¶
func (smt *SitemapList) Search(location string) *SitemapItem
Search a specific item by location
Click to show internal directories.
Click to hide internal directories.