utilities

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRobotFile

func GenerateRobotFile(cfg *config.Config, commandline *FlagFields)

func GenerateSitemap

func GenerateSitemap(cfg *config.Config, commandline *FlagFields)

func LoadStaticSitemap

func LoadStaticSitemap(cfg *config.Config, commandLine *FlagFields)

func NewFakeScroll

func NewFakeScroll() sitemap.Scroll

func UpdateSitemap

func UpdateSitemap(cfg *config.Config, commandLine *FlagFields) error

Types

type FakeScroll

type FakeScroll struct {
}

FakeScroll is used to replicate elastic search

func (*FakeScroll) GetScroll

func (fs *FakeScroll) GetScroll(_ context.Context, _ string, _ interface{}) error

func (*FakeScroll) StartScroll

func (fs *FakeScroll) StartScroll(_ context.Context, result interface{}) error

type FlagFields

type FlagFields struct {
	RobotsFilePath       string // path to the robots file that will be generated
	RobotsFilePathReader string // path to the robots file that we are reading from
	APIURL               string // elastic search api url
	SitemapIndex         string // elastic search sitemap index
	ScrollTimeout        string // elastic search scroll timeout
	ScrollSize           int    // elastic search scroll size
	SitemapPath          string // path to the sitemap file that will be generated
	SitemapPathReader    string // path to the sitemap file that we are reading from
	ZebedeeURL           string // zebedee url
	FakeScroll           bool   // toggle to use or not the fake scroll implementation that replicates elastic search
}

Config represents service configuration for dp-sitemap

var CmdFlagFields *FlagFields

Jump to

Keyboard shortcuts

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