fetch

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{
	Name:    "fetch",
	Aliases: []string{"f"},
	Usage:   "fetch webmentions from the endpoint",
	Action:  fetchAction,
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:     "token",
			Aliases:  []string{"t"},
			Required: true,
		},
		&cli.StringFlag{
			Name:     "domain",
			Aliases:  []string{"d"},
			Required: true,
		},
		&cli.StringFlag{
			Name:     "destination",
			Aliases:  []string{"D"},
			Required: true,
		},
		&cli.StringFlag{
			Name:    "state-file",
			Aliases: []string{"s"},
			Value:   "./fetch.webmentions.state",
		},
		&cli.IntFlag{
			Name:  "page-size",
			Value: 10,
		},
	},
}
View Source
var FetchFunc = webmention.DoFetch
View Source
var PersistFunc = webmention.DoPersist

Functions

This section is empty.

Types

type Context

type Context struct {
	Domain   string
	Token    string
	State    *state.State
	PageSize int
}

func NewFetchContext

func NewFetchContext(cliContext *cli.Context) (*Context, error)

NewFetchContext constructs a fetch context representative of the passed cli.Context.

Jump to

Keyboard shortcuts

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