github.com/ngocphuongnb/tetua@v0.0.7-alpha/app/web/sitemap/types.go (about) 1 package websitemap 2 3 import "encoding/xml" 4 5 const SITEMAP_PAGESIZE = 10000 6 7 type SitemapItems struct { 8 XMLName xml.Name `xml:"sitemapindex"` 9 Xmlns string `xml:"xmlns,attr"` 10 Items []*SitemapItem `xml:"sitemap"` 11 } 12 13 type SitemapItem struct { 14 Loc *SitemapLoc 15 LastMod *SitemapLastMod 16 } 17 18 type SitemapLoc struct { 19 XMLName xml.Name `xml:"loc"` 20 Value string `xml:",chardata"` 21 } 22 23 type SitemapLastMod struct { 24 XMLName xml.Name `xml:"lastmod"` 25 Value string `xml:",chardata"` 26 } 27 28 type SitemapUrlSets struct { 29 XMLName xml.Name `xml:"urlset"` 30 Xmlns string `xml:"xmlns,attr"` 31 XmlnsXsi string `xml:"xmlns:xsi,attr"` 32 XmlnsImage string `xml:"xmlns:image,attr"` 33 XmlnsSchemaLocation string `xml:"xsi:schemaLocation,attr"` 34 Urls []*SitemapUrl `xml:"url"` 35 } 36 37 type SitemapUrl struct { 38 Loc *SitemapLoc 39 LastMod *SitemapLastMod 40 Image *SitemapImage 41 } 42 43 type SitemapImage struct { 44 XMLName xml.Name `xml:"image:image"` 45 Loc *SitemapImageLoc 46 } 47 48 type SitemapImageLoc struct { 49 XMLName xml.Name `xml:"image:loc"` 50 Value string `xml:",chardata"` 51 }