sync

package
v1.2.14 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HideUnseedFeeds

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

HideUnseedFeeds .

func HideUnseedOperators

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

HideUnseedOperators .

func UpdateFeed

func UpdateFeed(ctx context.Context, atx tldb.Adapter, rfeed dmfr.Feed) (int, bool, bool, error)

UpdateFeed .

func UpdateFeedGeneratedOperators

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

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

func UpdateOperator

func UpdateOperator(ctx context.Context, atx tldb.Adapter, operator dmfr.Operator) (int, bool, bool, error)

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

Types

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(ctx context.Context, atx tldb.Adapter, opts Options) (Result, error)

func Sync

func Sync(ctx context.Context, atx tldb.Adapter, opts Options) (Result, error)

Jump to

Keyboard shortcuts

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