sitemaps

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Always  ChangeFreq = "always"
	Hourly             = "hourly"
	Daily              = "daily"
	Weekly             = "weekly"
	Monthly            = "monthly"
	Yearly             = "yearly"
	Never              = "never"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeFreq

type ChangeFreq string

func (ChangeFreq) MarshalText

func (c ChangeFreq) MarshalText() ([]byte, error)

func (*ChangeFreq) UnmarshalText

func (c *ChangeFreq) UnmarshalText(text []byte) error

type SiteUrl

type SiteUrl struct {
	Location        string     `xml:"loc"`
	LastModified    *time.Time `xml:"lastmod,omitempty"`
	ChangeFrequency ChangeFreq `xml:"changefreq,omitempty"`
	Priority        float32    `xml:"priority,omitempty"`
}

type Sitemap

type Sitemap struct {
	XMLName xml.Name
	Urls    []*SiteUrl `xml:"url"`
}

func NewSitemap

func NewSitemap() *Sitemap

type SitemapIndex added in v0.5.1

type SitemapIndex struct {
	XMLName  xml.Name
	Sitemaps []*SitemapRef `xml:"sitemap"`
}

func NewSitemapIndex added in v0.5.1

func NewSitemapIndex() *SitemapIndex

type SitemapRef added in v0.5.1

type SitemapRef struct {
	Url          string     `xml:"loc"`
	LastModified *time.Time `xml:"lastmod,omitempty"`
}

type SitemapTime

type SitemapTime time.Time

func (SitemapTime) MarshalText

func (t SitemapTime) MarshalText() ([]byte, error)

func (*SitemapTime) UnmarshalText

func (t *SitemapTime) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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