Documentation
¶
Index ¶
- Constants
- type GTFS
- func (g *GTFS) FromDB(dbFile string) error
- func (g *GTFS) FromURL(gtfsURL, dbFile string) error
- func (g *GTFS) GetAgencyByID(agencyID models.Key) (*models.Agency, error)
- func (g *GTFS) GetAgencyByRouteID(routeID models.Key) (*models.Agency, error)
- func (g *GTFS) GetAllAgencies() ([]*models.Agency, error)
- func (g *GTFS) GetAllCurrentTrips() ([]*models.Trip, error)
- func (g *GTFS) GetRouteByID(routeID models.Key) (*models.Route, error)
- func (g *GTFS) GetServiceByID(serviceID models.Key) (*models.Service, error)
- func (g *GTFS) GetServiceExceptionsByServiceID(serviceID models.Key) ([]*models.ServiceException, error)
- func (g *GTFS) GetStopByID(stopID models.Key) (*models.Stop, error)
- func (g *GTFS) GetTripByID(tripID models.Key) (*models.Trip, error)
- func (g *GTFS) GetTripsByRouteID(routeID models.Key) ([]*models.Trip, error)
- func (g *GTFS) IsRunningToday(tripID models.Key) (bool, error)
- func (g *GTFS) Save() error
Constants ¶
View Source
const CurrentVersion = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GTFS ¶
type GTFS struct { Version int // contains filtered or unexported fields }
Represents a GTFS database connection
func (*GTFS) GetAgencyByID ¶
Returns the agency with the given ID
func (*GTFS) GetAgencyByRouteID ¶
Returns the agency for a given route ID
func (*GTFS) GetAllAgencies ¶
Returns all agencies in the GTFS database
func (*GTFS) GetAllCurrentTrips ¶
Returns all trips that are currently running
func (*GTFS) GetRouteByID ¶
Returns the route with the given ID
func (*GTFS) GetServiceByID ¶
Returns the service with the given ID
func (*GTFS) GetServiceExceptionsByServiceID ¶
func (g *GTFS) GetServiceExceptionsByServiceID(serviceID models.Key) ([]*models.ServiceException, error)
Returns all services exceptions for a given service ID
func (*GTFS) GetStopByID ¶
Returns the agency with the given ID
func (*GTFS) GetTripsByRouteID ¶
Returns all trips for a given route ID
func (*GTFS) IsRunningToday ¶
Checks if the given trip is running today
Click to show internal directories.
Click to hide internal directories.