sitemap

package
v0.0.0-...-c971602 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2014 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const NAMESPACE = "http://www.sitemaps.org/schemas/sitemap/0.9"

Variables

View Source
var (
	Host string
)

Functions

func Add

func Add(name string, urls ...*Url)

Types

type Sitemap

type Sitemap struct {
	Loc     string    `xml:"loc"`
	LastMod time.Time `xml:"lastmod,omitempty"`
}

type SitemapController

type SitemapController struct {
	*gadget.DefaultController
}

func (*SitemapController) IdPattern

func (c *SitemapController) IdPattern() string

func (*SitemapController) Index

func (c *SitemapController) Index(r *gadget.Request) (int, interface{})

func (*SitemapController) Show

func (c *SitemapController) Show(r *gadget.Request) (int, interface{})

type SitemapIndex

type SitemapIndex struct {
	XMLName   xml.Name   `xml:"sitemapindex"`
	Namespace string     `xml:"xmlns,attr"`
	Sitemaps  []*Sitemap `xml:"sitemap"`
}

func NewSitemapIndex

func NewSitemapIndex() *SitemapIndex

type Url

type Url struct {
	Loc        string    `xml:"loc"`
	LastMod    time.Time `xml:"lastmod,omitempty"`
	ChangeFreq string    `xml:"changefreq,omitempty"`
	Priority   float64   `xml:"priority,omitempty"`
}

type UrlSet

type UrlSet struct {
	XMLName   xml.Name  `xml:"urlset"`
	Namespace string    `xml:"xmlns,attr"`
	LastMod   time.Time `xml:"-"`
	Urls      []*Url    `xml:"url"`
}

func NewUrlSet

func NewUrlSet(urls ...*Url) *UrlSet

Jump to

Keyboard shortcuts

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