sync

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HideUnseedFeeds

func HideUnseedFeeds(atx tldb.Adapter, found []int) (int, error)

HideUnseedFeeds .

func HideUnseedOperators added in v0.8.5

func HideUnseedOperators(atx tldb.Adapter, found []int) (int, error)

HideUnseedOperators .

func UpdateFeed

func UpdateFeed(atx tldb.Adapter, rfeed tl.Feed) (int, bool, bool, error)

UpdateFeed .

func UpdateFeedGeneratedOperators added in v0.8.5

func UpdateFeedGeneratedOperators(atx tldb.Adapter, found []int) error

UpdateFeedGeneratedOperators creates OperatorInFeed records for agencies that are not associated with an operator

func UpdateOperator added in v0.8.5

func UpdateOperator(atx tldb.Adapter, operator tl.Operator) (int, bool, bool, error)

UpdateOperator updates or inserts a single operator, as well as managing associated operator-in-feed records

Types

type Command

type Command struct {
	DBURL   string
	Adapter tldb.Adapter
	Options
}

Command syncs a DMFR to a database.

func (*Command) Parse

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

Parse command line options.

func (*Command) Run

func (cmd *Command) Run() error

Run this command.

type Options

type Options struct {
	Filenames           []string
	HideUnseen          bool
	HideUnseenOperators bool
}

Options sets options for a sync operation.

type Result

type Result struct {
	FeedIDs         []int
	OperatorIDs     []int
	Errors          []error
	HiddenCount     int
	HiddenOperators int
}

Result is the result of a sync operation.

func MainSync

func MainSync(atx tldb.Adapter, opts Options) (Result, error)

MainSync .

Jump to

Keyboard shortcuts

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