gtfsmanager

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package gtfsmanager provides support for retrieving, reading, parsing, deleting and saving gtfs schedules to a database

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGTFSSchedule

func DeleteGTFSSchedule(log *log.Logger,
	db *sqlx.DB,
	dataSetId int64) error

DeleteGTFSSchedule deletes all gtfs records associated with gtfs.DataSet with dataSetId

func ExportTripToJson

func ExportTripToJson(log *log.Logger,
	db *sqlx.DB,
	at time.Time,
	tripId string,
	destinationFile string) error

ExportTripToJson attempts to load tripId effective "at" a point in time and writes to destinationFile in Json format

func ListGTFSSchedules

func ListGTFSSchedules(db *sqlx.DB) error

ListGTFSSchedules displays a list of all DataSets to logger

func UpdateGTFSSchedule

func UpdateGTFSSchedule(log *log.Logger,
	db *sqlx.DB,
	localDownloadDirectory string,
	url string,
	forceDownload bool) error

UpdateGTFSSchedule checks for updated gtfs schedule on remote server if new version is detected attempts to load gtfs file in zip format to localDownloadDirectory from url to database forceDownload flag will bypass remote check

Types

This section is empty.

Jump to

Keyboard shortcuts

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