apistatus

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 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 SourceStatus

type SourceStatus struct {
	Loaded               bool     `db:"loaded" json:"loaded"`                                   // Whether the source has been loaded (any tables)
	Computed             bool     `db:"computed" json:"computed"`                               // Whether the source 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
	Mdbid                int      `db:"mdbid" json:"mdbid"`                                     // Mobility Database field 'mdb_source_id'
	Url                  string   `db:"url" json:"url"`                                         // Mobility Database field 'urls.latest'
	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)
}

SourceStatus represents the status of a particular GTFS feed from the MobilityDatabase. This is returned as a query mechanism from the SourcesetStatus function and can determine various metadata about the source both from the Mobility DB's CSV (as imported to the local DB) in addition to interal mobsql-specific metadata (such as if the source has been loaded, computed, etc.)

func SourcesetStatus

func SourcesetStatus(m *apptypes.MobsqlRuntime, sourceset []int) ([]SourceStatus, error)

SourcesetStatus queries the database for the given sourceset

Jump to

Keyboard shortcuts

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