Versions in this module Expand all Collapse all v1 v1.1.0 Jan 31, 2023 Changes in this version + func KeysToLowerString(befores map[string]interface{}) (afters []string) v1.0.0 Jan 30, 2023 Changes in this version + const MaxSitemapFiles + const MaxSitemapFilesize + const MaxSitemapImages + const MaxSitemapLinks + const MaxSitemapNews + const SchemaGeo + const SchemaImage + const SchemaMobile + const SchemaNews + const SchemaPagemap + const SchemaVideo + var GzipPtn = regexp.MustCompile(".gz$") + var IndexXMLFooter = []byte("</sitemapindex>") + var IndexXMLHeader = []byte(...) + var XMLFooter = []byte("</urlset>") + var XMLHeader = []byte(...) + func MergeMap(src, dst [][]interface{}) [][]interface + func PingSearchEngines(opts *Options, urls ...string) + func SetBuilderElementValue(elm *etree.Element, data [][]interface{}, basekey string) (*etree.Element, bool) + func ToLowerString(befores []string) (afters []string) + func URLJoin(src string, joins ...string) string + type Adapter interface + Bytes func() [][]byte + Write func(loc *Location, data []byte) + type Attr map[string]string + type Attrs []interface + type BufferAdapter struct + func NewBufferAdapter() *BufferAdapter + func (adp *BufferAdapter) Bytes() [][]byte + func (adp *BufferAdapter) Write(loc *Location, data []byte) + type BufferPool struct + func NewBufferPool() *BufferPool + func (bp *BufferPool) Get() *bytes.Buffer + func (bp *BufferPool) Put(b *bytes.Buffer) + type Builder interface + Add func(interface{}) BuilderError + Content func() []byte + Write func() + XMLContent func() []byte + type BuilderError interface + FullError func() bool + type BuilderFile struct + func NewBuilderFile(opts *Options, loc *Location) *BuilderFile + func (b *BuilderFile) Add(url interface{}) BuilderError + func (b *BuilderFile) Content() []byte + func (b *BuilderFile) Write() + func (b *BuilderFile) XMLContent() []byte + type BuilderIndexfile struct + func NewBuilderIndexfile(opts *Options, loc *Location) *BuilderIndexfile + func (b *BuilderIndexfile) Add(link interface{}) BuilderError + func (b *BuilderIndexfile) Content() []byte + func (b *BuilderIndexfile) Write() + func (b *BuilderIndexfile) XMLContent() []byte + type FileAdapter struct + func NewFileAdapter() *FileAdapter + func (adp *FileAdapter) Bytes() [][]byte + func (adp *FileAdapter) Write(loc *Location, data []byte) + type Location struct + func NewLocation(opts *Options) *Location + func (loc *Location) Directory() string + func (loc *Location) Filename() string + func (loc *Location) Filesize() int64 + func (loc *Location) IsReservedName() bool + func (loc *Location) IsVerbose() bool + func (loc *Location) Namer() *Namer + func (loc *Location) Path() string + func (loc *Location) PathInPublic() string + func (loc *Location) ReserveName() string + func (loc *Location) Summary(linkCount int) string + func (loc *Location) URL() string + func (loc *Location) Write(data []byte, linkCount int) + type NOpts struct + type Namer struct + func NewNamer(opts *NOpts) *Namer + func (n *Namer) IsStart() bool + func (n *Namer) Next() *Namer + func (n *Namer) Previous() *Namer + func (n *Namer) Reset() + func (n *Namer) String() string + type Options struct + func NewOptions() *Options + func (opts *Options) Clone() *Options + func (opts *Options) IndexLocation() *Location + func (opts *Options) Location() *Location + func (opts *Options) Namer() *Namer + func (opts *Options) SetAdapter(adp Adapter) + func (opts *Options) SetCompress(compress bool) + func (opts *Options) SetDefaultHost(host string) + func (opts *Options) SetFilename(filename string) + func (opts *Options) SetOmitDefaultChangeFreq(omit bool) + func (opts *Options) SetOmitDefaultLastMod(omit bool) + func (opts *Options) SetOmitDefaultPriority(omit bool) + func (opts *Options) SetPretty(pretty bool) + func (opts *Options) SetPublicPath(path string) + func (opts *Options) SetSitemapsHost(host string) + func (opts *Options) SetSitemapsPath(path string) + func (opts *Options) SetVerbose(verbose bool) + func (opts *Options) SitemapsHost() string + type Sitemap struct + func NewSitemap(maxProc int) *Sitemap + func (sm *Sitemap) Add(url interface{}) *Sitemap + func (sm *Sitemap) Create() *Sitemap + func (sm *Sitemap) Finalize() *Sitemap + func (sm *Sitemap) PingSearchEngines(urls ...string) + func (sm *Sitemap) SetAdapter(adp Adapter) + func (sm *Sitemap) SetCompress(compress bool) + func (sm *Sitemap) SetDefaultHost(host string) + func (sm *Sitemap) SetFilename(filename string) + func (sm *Sitemap) SetPretty(pretty bool) + func (sm *Sitemap) SetPublicPath(path string) + func (sm *Sitemap) SetSitemapsHost(host string) + func (sm *Sitemap) SetSitemapsPath(path string) + func (sm *Sitemap) SetVerbose(verbose bool) + func (sm *Sitemap) XMLContent() []byte + type SitemapURL interface + XML func() []byte + func NewSitemapIndexURL(opts *Options, url URL) SitemapURL + func NewSitemapURL(opts *Options, url URL) (SitemapURL, error) + type URL [][]interface + func (u *URL) BungURLJoinBy(key string, joins ...string) + func (u URL) URLJoinBy(key string, joins ...string) URL + type URLModel struct + Alternate string + Alternates map[string]interface{} + Changefreq string + Expires time.Time + Geo string + Host string + Image string + Lastmod time.Time + Loc string + Mobile bool + News string + Pagemap map[string]interface{} + Priority float64 + Tag string + Video string