Documentation
¶
Overview ¶
Package apipurge contains internal implementation for FeedStatus
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeedStatusInfo ¶ added in v0.6.0
type FeedStatusInfo struct { FeedID int `db:"feed_id" json:"feed_id"` // Feed ID (user provided <-1 or MDB >0 via MDB 'mdb_source_id') Loaded bool `db:"loaded" json:"loaded"` // Whether the feed has been loaded (any tables) Computed bool `db:"computed" json:"computed"` // Whether the feed has been computed (any tables) TablesLoaded *string `db:"tables_loaded" json:"tables_loaded,omitempty"` // Tables loaded TablesComputed *string `db:"tables_computed" json:"tables_computed ,omitempty"` // Tables computed TimestampLoaded *string `db:"timestamp_loaded" json:"timestamp_loaded,omitempty"` // Latest timestamp of loaded tables TimestampComputed *string `db:"timestamp_computed" json:"timestamp_computed,omitempty"` // Latest timestamp of computed tables MinDate *string `db:"min_date" json:"min_date,omitempty"` // (Loaded sources only) min_date based on calendar/calendar_dates MaxDate *string `db:"max_date" json:"max_date,omitempty"` // (Loaded sources only) max_date based on calendar/calendar_dates URLGTFSDirect string `db:"url_gtfs_direct" json:"url_gtfs_direct"` // URI (user provided or via MDB 'urls.latest' correlating to origin GTFS URL from agency) URLGTFSBucket string `db:"url_gtfs_bucket" json:"url_gtfs_bucket"` // URI (user provided or via MDB 'urls.direct_download' correlating to CI/bucket mirrored GTFS) URLLicense *string `db:"url_license" json:"url_license,omitempty"` // Mobility Database field 'urls.license' Provider *string `db:"provider" json:"provider"` // Mobility Database field 'provider' Name *string `db:"name" json:"name,omitempty"` // Mobility Database field 'name' Status *string `db:"status" json:"status,omitempty"` // Mobility Database field 'status' LocationSubdivision *string `db:"subdivision" json:"subdivision"` // Mobility Database field 'location.subdivision_name' LocationCountry *string `db:"country" json:"country"` // Mobility Database field 'location.country_code' LocationMunicipality *string `db:"municipality" json:"municipality"` // Mobility Database field 'location.municipality' LocationBbox *string `db:"bbox" json:"bbox"` // Mobility Database bounding box LocationBboxKm *float64 `db:"km" json:"km"` // Mobility Database bounding box calculated area (KM) }
FeedStatusInfo represents the status of a particular GTFS feed from the MobilityDatabase. This is returned as a query mechanism from the FeedStatus function and can determine various metadata about the feed both from the Mobility DB's CSV (as imported to the local DB) in addition to interal mobsql-specific metadata (such as if the feed has been loaded, computed, etc.)
func FeedStatus ¶ added in v0.6.0
func FeedStatus(m *apptypes.MobsqlRuntime, feedIDs []int) ([]FeedStatusInfo, error)
FeedStatus queries the database for the given feedIDs from the internal database and returns an array of FeedStatusInfo. See the underlying FeedStatusInfo for information available which includes metadata from the Mobility Database in addition to loaded and computed status for the given feeds.