sitemap

package
v0.0.0-...-b0e2d2c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element struct {
	Loc        string  `xml:"loc"`
	LastMod    string  `xml:"lastmod"`
	ChangeFreq string  `xml:"changefreq"`
	Priority   float32 `xml:"priority"`
}

Element single sitemap element

type Index

type Index struct {
	XMLName  xml.Name  `xml:"sitemapindex"`
	Elements []Element `xml:"sitemap"`
}

Index sitemap index

func GetIndex

func GetIndex(url string) (*Index, error)

GetIndex get sitemap index from URL

func (*Index) GetSitemaps

func (i *Index) GetSitemaps() ([]*Sitemap, error)

GetSitemaps loads all sitemaps from index

type Sitemap

type Sitemap struct {
	XMLName  xml.Name  `xml:"urlset"`
	Elements []Element `xml:"url"`
}

Sitemap sitemap data

func GetSitemap

func GetSitemap(url string) (*Sitemap, error)

GetSitemap get sitemap from URL

func GetSitemapGZ

func GetSitemapGZ(url string) (*Sitemap, error)

GetSitemapGZ get sitemaps from .gz URL

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL