apistatus

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

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')
	URLGTFS           string  `db:"url_gtfs" json:"url_gtfs"`                               // URI (user provided or via MDB 'urls.latest')
	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

	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

Jump to

Keyboard shortcuts

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