importer

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateFeedVersion

func ActivateFeedVersion(atx tldb.Adapter, fvid int) error

ActivateFeedVersion .

func AfterFeedVersionImport

func AfterFeedVersionImport(atx tldb.Adapter, fvid int) error

AfterFeedVersionImport .

func FindImportableFeeds

func FindImportableFeeds(adapter tldb.Adapter) ([]int, error)

FindImportableFeeds .

func ImportFeedVersion

func ImportFeedVersion(atx tldb.Adapter, fv tl.FeedVersion, opts Options) (dmfr.FeedVersionImport, error)

ImportFeedVersion .

Types

type Command

type Command struct {
	Options      Options
	Workers      int
	Limit        int
	DBURL        string
	CoverDate    string
	FetchedSince string
	Latest       bool
	DryRun       bool
	FeedIDs      []string
	FVIDs        cli.ArrayFlags
	FVSHA1       cli.ArrayFlags
	Adapter      tldb.Adapter // allow for mocks
}

Command imports FeedVersions into a database.

func (*Command) Parse

func (cmd *Command) Parse(args []string) error

Parse command line flags

func (*Command) Run

func (cmd *Command) Run() error

Run this command

type Options

type Options struct {
	FeedVersionID int
	Directory     string
	S3            string
	Activate      bool
	copier.Options
}

Options sets various options for importing a feed.

type Result

type Result struct {
	FeedVersionImport dmfr.FeedVersionImport
}

Result contains the results of a feed import.

func MainImportFeedVersion

func MainImportFeedVersion(adapter tldb.Adapter, opts Options) (Result, error)

MainImportFeedVersion create FVI and run Copier inside a Tx.

Jump to

Keyboard shortcuts

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