Documentation ¶
Index ¶
- Variables
- func AddConfig(cfg Config) func(http.Handler) http.Handler
- func WithConfig(ctx context.Context, cfg Config) context.Context
- type Agency
- type AgencyFilter
- type AgencyParam
- type AgencyPlace
- type AgencyPlaceFilter
- type AgencyPlaceParam
- type Alert
- type BoundingBox
- type Calendar
- type CalendarDate
- type CalendarDateFilter
- type CalendarDateParam
- type CensusGeography
- type CensusGeographyParam
- type CensusTable
- type CensusTableParam
- type CensusValue
- type CensusValueParam
- type Checker
- type Config
- type Cursor
- type DirectionRequest
- type Directions
- type Distance
- type DistanceUnit
- type Duration
- type DurationUnit
- type EntityDeleteResult
- type EntityFinder
- type EntityLoader
- type EntityMutator
- type Feed
- type FeedAuthorization
- type FeedFetch
- type FeedFetchFilter
- type FeedFetchParam
- type FeedFilter
- type FeedInfo
- type FeedInfoParam
- type FeedLicense
- type FeedParam
- type FeedSourceURL
- type FeedSourceURLTypes
- type FeedSpecTypes
- type FeedState
- type FeedUrls
- type FeedVersion
- type FeedVersionDeleteResult
- type FeedVersionFetchResult
- type FeedVersionFileInfo
- type FeedVersionFileInfoParam
- type FeedVersionFilter
- type FeedVersionGtfsImport
- type FeedVersionImportResult
- type FeedVersionInput
- type FeedVersionParam
- type FeedVersionServiceLevel
- type FeedVersionServiceLevelFilter
- type FeedVersionServiceLevelParam
- type FeedVersionSetInput
- type FeedVersionUnimportResult
- type Finder
- type Frequency
- type FrequencyParam
- type GbfsAlertTime
- type GbfsBikeRequest
- type GbfsBrandAsset
- type GbfsDockRequest
- type GbfsFeed
- type GbfsFinder
- type GbfsFreeBikeStatus
- func (g *GbfsFreeBikeStatus) HomeStation() *GbfsStationInformation
- func (g *GbfsFreeBikeStatus) PricingPlan() *GbfsSystemPricingPlan
- func (g *GbfsFreeBikeStatus) RentalUris() *GbfsRentalUris
- func (g *GbfsFreeBikeStatus) Station() *GbfsStationInformation
- func (g *GbfsFreeBikeStatus) VehicleType() *GbfsVehicleType
- type GbfsGeofenceFeature
- type GbfsGeofenceProperty
- type GbfsGeofenceRule
- type GbfsGeofenceZone
- type GbfsPlanPrice
- type GbfsRentalApp
- type GbfsRentalApps
- type GbfsRentalUris
- type GbfsStationInformation
- type GbfsStationStatus
- type GbfsSystemAlert
- type GbfsSystemCalendar
- type GbfsSystemHour
- type GbfsSystemInformation
- type GbfsSystemPricingPlan
- type GbfsSystemRegion
- type GbfsSystemVersion
- type GbfsVehicleAssets
- type GbfsVehicleDockAvailable
- type GbfsVehicleType
- type GbfsVehicleTypeAvailable
- type ImportStatus
- type Itinerary
- type Leg
- type Level
- type LevelParam
- type LevelSetInput
- type LicenseFilter
- type LicenseValue
- type Me
- type Mutation
- type Operator
- type OperatorFilter
- type OperatorParam
- type Pathway
- type PathwayFilter
- type PathwayParam
- type PathwaySetInput
- type PermFilter
- type PermFinder
- type Place
- type PlaceAggregationLevel
- type PlaceFilter
- type PointRadius
- type Query
- type RTFinder
- type RTTimeRange
- type RTTranslation
- type RTTripDescriptor
- type RTVehicleDescriptor
- type Route
- type RouteAttribute
- type RouteFilter
- type RouteGeometry
- type RouteGeometryParam
- type RouteHeadway
- type RouteHeadwayParam
- type RouteParam
- type RouteStop
- type RouteStopBuffer
- type RouteStopBufferParam
- type RouteStopParam
- type RouteStopPattern
- type RouteStopPatternParam
- type ScheduleRelationship
- type Segment
- type SegmentPattern
- type SegmentPatternParam
- type ServiceCoversFilter
- type Shape
- type Step
- type StepMode
- type Stop
- type StopExternalReference
- type StopFilter
- type StopObservation
- type StopObservationFilter
- type StopObservationParam
- type StopParam
- type StopPlace
- type StopPlaceParam
- type StopSetInput
- type StopTime
- type StopTimeEvent
- type StopTimeFilter
- type StopTimeParam
- type Trip
- type TripFilter
- type TripParam
- type TripStopTimeFilter
- type TripStopTimeParam
- type ValidationRealtimeResult
- type ValidationReport
- type ValidationReportDetails
- type ValidationReportError
- type ValidationReportErrorExemplarParam
- type ValidationReportErrorGroup
- type ValidationReportErrorGroupParam
- type ValidationReportFilter
- type ValidationReportParam
- type VehiclePosition
- type Waypoint
- type WaypointInput
Constants ¶
This section is empty.
Variables ¶
var AllDistanceUnit = []DistanceUnit{ DistanceUnitKilometers, DistanceUnitMiles, }
var AllDurationUnit = []DurationUnit{ DurationUnitSeconds, }
var AllFeedSourceURLTypes = []FeedSourceURLTypes{ FeedSourceURLTypesStaticCurrent, FeedSourceURLTypesStaticHistoric, FeedSourceURLTypesStaticPlanned, FeedSourceURLTypesStaticHypothetical, FeedSourceURLTypesRealtimeVehiclePositions, FeedSourceURLTypesRealtimeTripUpdates, FeedSourceURLTypesRealtimeAlerts, FeedSourceURLTypesGbfsAutoDiscovery, FeedSourceURLTypesMdsProvider, }
var AllFeedSpecTypes = []FeedSpecTypes{ FeedSpecTypesGtfs, FeedSpecTypesGtfsRt, FeedSpecTypesGbfs, FeedSpecTypesMds, }
var AllImportStatus = []ImportStatus{ ImportStatusSuccess, ImportStatusError, ImportStatusInProgress, }
var AllLicenseValue = []LicenseValue{ LicenseValueYes, LicenseValueNo, LicenseValueExcludeNo, LicenseValueUnknown, }
var AllPlaceAggregationLevel = []PlaceAggregationLevel{ PlaceAggregationLevelAdm0, PlaceAggregationLevelAdm0Adm1, PlaceAggregationLevelAdm0Adm1City, PlaceAggregationLevelAdm0City, PlaceAggregationLevelAdm1City, PlaceAggregationLevelCity, }
var AllScheduleRelationship = []ScheduleRelationship{ ScheduleRelationshipScheduled, ScheduleRelationshipAdded, ScheduleRelationshipUnscheduled, ScheduleRelationshipCanceled, }
var AllStepMode = []StepMode{ StepModeWalk, StepModeAuto, StepModeBicycle, StepModeTransit, StepModeLine, }
Functions ¶
Types ¶
type AgencyFilter ¶
type AgencyFilter struct { OnestopID *string `json:"onestop_id,omitempty"` FeedVersionSha1 *string `json:"feed_version_sha1,omitempty"` FeedOnestopID *string `json:"feed_onestop_id,omitempty"` AgencyID *string `json:"agency_id,omitempty"` // Search for records with this GTFS agency_name AgencyName *string `json:"agency_name,omitempty"` Bbox *BoundingBox `json:"bbox,omitempty"` Within *tt.Polygon `json:"within,omitempty"` // Search for agencies within a radius Near *PointRadius `json:"near,omitempty"` // Full text search Search *string `json:"search,omitempty"` // Search by city name (provided by Natural Earth) CityName *string `json:"city_name,omitempty"` // Search by country name (provided by Natural Earth) Adm0Name *string `json:"adm0_name,omitempty"` // Search by state/province/division name (provided by Natural Earth) Adm1Name *string `json:"adm1_name,omitempty"` // Search by country 2 letter ISO 3166 code (provided by Natural Earth) Adm0Iso *string `json:"adm0_iso,omitempty"` // Search by state/province/division ISO 3166-2 code (provided by Natural Earth) Adm1Iso *string `json:"adm1_iso,omitempty"` License *LicenseFilter `json:"license,omitempty"` }
type AgencyParam ¶
type AgencyParam struct { FeedVersionID int Limit *int OnestopID *string Where *AgencyFilter }
type AgencyPlace ¶
type AgencyPlace struct { CityName *string `json:"city_name,omitempty"` Adm0Name *string `json:"adm0_name,omitempty"` Adm1Name *string `json:"adm1_name,omitempty"` Adm0Iso *string `json:"adm0_iso,omitempty"` Adm1Iso *string `json:"adm1_iso,omitempty"` Rank *float64 `json:"rank,omitempty"` AgencyID int `json:"-"` }
type AgencyPlaceFilter ¶
type AgencyPlaceFilter struct {
MinRank *float64 `json:"min_rank,omitempty"`
}
type AgencyPlaceParam ¶
type AgencyPlaceParam struct { AgencyID int Limit *int Where *AgencyPlaceFilter }
type Alert ¶
type Alert struct { ActivePeriod []*RTTimeRange `json:"active_period,omitempty"` Cause *string `json:"cause,omitempty"` Effect *string `json:"effect,omitempty"` HeaderText []*RTTranslation `json:"header_text"` DescriptionText []*RTTranslation `json:"description_text"` TtsHeaderText []*RTTranslation `json:"tts_header_text,omitempty"` TtsDescriptionText []*RTTranslation `json:"tts_description_text,omitempty"` URL []*RTTranslation `json:"url,omitempty"` SeverityLevel *string `json:"severity_level,omitempty"` }
Alert(https://gtfs.org/reference/realtime/v2/#message-alert) message, also called a service alert, provided by a source GTFS Realtime feed.
type BoundingBox ¶
type CalendarDate ¶
type CalendarDate struct {
tl.CalendarDate
}
type CalendarDateFilter ¶
type CalendarDateParam ¶
type CalendarDateParam struct { ServiceID int Limit *int Where *CalendarDateFilter }
type CensusGeography ¶
type CensusGeography struct { ID int `json:"id"` LayerName string `json:"layer_name"` Geoid *string `json:"geoid,omitempty"` Name *string `json:"name,omitempty"` Aland *float64 `json:"aland,omitempty"` Awater *float64 `json:"awater,omitempty"` Geometry *tt.Polygon `json:"geometry,omitempty"` Values []*CensusValue `json:"values"` MatchEntityID int `json:"-"` }
type CensusGeographyParam ¶
type CensusTable ¶
type CensusTableParam ¶
type CensusTableParam struct {
Limit *int
}
type CensusValue ¶
type CensusValue struct { Table *CensusTable `json:"table"` Values tt.Map `json:"values"` GeographyID int `json:"-"` TableID int `json:"-"` }
type CensusValueParam ¶
type Checker ¶
type Checker interface { authz.CheckerServer }
type Config ¶
type Config struct { Finder Finder RTFinder RTFinder GbfsFinder GbfsFinder Checker Checker JobQueue jobs.JobQueue Clock clock.Clock Secrets []tl.Secret ValidateLargeFiles bool DisableImage bool RestPrefix string Storage string RTStorage string }
func ForContext ¶
type Cursor ¶
func (Cursor) MarshalGQL ¶
MarshalGQL implements the graphql.Marshaler interface
func (*Cursor) MarshalJSON ¶
MarshalJSON implements the json.marshaler interface.
func (*Cursor) UnmarshalGQL ¶
UnmarshalGQL implements the graphql.Unmarshaler interface
func (*Cursor) UnmarshalJSON ¶
UnmarshalJSON implements json.Marshaler interface.
type DirectionRequest ¶
type DirectionRequest struct { To *WaypointInput `json:"to"` From *WaypointInput `json:"from"` Mode StepMode `json:"mode"` DepartAt *time.Time `json:"depart_at,omitempty"` }
type Directions ¶
type Directions struct { Success bool `json:"success"` Exception *string `json:"exception,omitempty"` DataSource *string `json:"data_source,omitempty"` Origin *Waypoint `json:"origin,omitempty"` Destination *Waypoint `json:"destination,omitempty"` Duration *Duration `json:"duration,omitempty"` Distance *Distance `json:"distance,omitempty"` StartTime *time.Time `json:"start_time,omitempty"` EndTime *time.Time `json:"end_time,omitempty"` Itineraries []*Itinerary `json:"itineraries,omitempty"` }
type Distance ¶
type Distance struct { Distance float64 `json:"distance"` Units DistanceUnit `json:"units"` }
type DistanceUnit ¶
type DistanceUnit string
const ( DistanceUnitKilometers DistanceUnit = "KILOMETERS" DistanceUnitMiles DistanceUnit = "MILES" )
func (DistanceUnit) IsValid ¶
func (e DistanceUnit) IsValid() bool
func (DistanceUnit) MarshalGQL ¶
func (e DistanceUnit) MarshalGQL(w io.Writer)
func (DistanceUnit) String ¶
func (e DistanceUnit) String() string
func (*DistanceUnit) UnmarshalGQL ¶
func (e *DistanceUnit) UnmarshalGQL(v interface{}) error
type Duration ¶
type Duration struct { Duration float64 `json:"duration"` Units DurationUnit `json:"units"` }
type DurationUnit ¶
type DurationUnit string
const (
DurationUnitSeconds DurationUnit = "SECONDS"
)
func (DurationUnit) IsValid ¶
func (e DurationUnit) IsValid() bool
func (DurationUnit) MarshalGQL ¶
func (e DurationUnit) MarshalGQL(w io.Writer)
func (DurationUnit) String ¶
func (e DurationUnit) String() string
func (*DurationUnit) UnmarshalGQL ¶
func (e *DurationUnit) UnmarshalGQL(v interface{}) error
type EntityDeleteResult ¶
type EntityDeleteResult struct {
ID int `json:"id"`
}
type EntityFinder ¶
type EntityFinder interface { FindAgencies(context.Context, *int, *Cursor, []int, *AgencyFilter) ([]*Agency, error) FindRoutes(context.Context, *int, *Cursor, []int, *RouteFilter) ([]*Route, error) FindStops(context.Context, *int, *Cursor, []int, *StopFilter) ([]*Stop, error) FindTrips(context.Context, *int, *Cursor, []int, *TripFilter) ([]*Trip, error) FindFeedVersions(context.Context, *int, *Cursor, []int, *FeedVersionFilter) ([]*FeedVersion, error) FindFeeds(context.Context, *int, *Cursor, []int, *FeedFilter) ([]*Feed, error) FindOperators(context.Context, *int, *Cursor, []int, *OperatorFilter) ([]*Operator, error) FindPlaces(context.Context, *int, *Cursor, []int, *PlaceAggregationLevel, *PlaceFilter) ([]*Place, error) RouteStopBuffer(context.Context, *RouteStopBufferParam) ([]*RouteStopBuffer, error) FindFeedVersionServiceWindow(context.Context, int) (time.Time, time.Time, time.Time, error) DBX() sqlx.Ext // escape hatch, for now }
Finder handles basic queries
type EntityLoader ¶
type EntityLoader interface { // Simple ID loaders TripsByID(context.Context, []int) ([]*Trip, []error) LevelsByID(context.Context, []int) ([]*Level, []error) PathwaysByID(context.Context, []int) ([]*Pathway, []error) CalendarsByID(context.Context, []int) ([]*Calendar, []error) ShapesByID(context.Context, []int) ([]*Shape, []error) FeedVersionsByID(context.Context, []int) ([]*FeedVersion, []error) FeedsByID(context.Context, []int) ([]*Feed, []error) AgenciesByID(context.Context, []int) ([]*Agency, []error) StopsByID(context.Context, []int) ([]*Stop, []error) RoutesByID(context.Context, []int) ([]*Route, []error) LevelsByParentStationID(context.Context, []LevelParam) ([][]*Level, []error) StopExternalReferencesByStopID(context.Context, []int) ([]*StopExternalReference, []error) StopObservationsByStopID(context.Context, []StopObservationParam) ([][]*StopObservation, []error) TargetStopsByStopID(context.Context, []int) ([]*Stop, []error) RouteAttributesByRouteID(context.Context, []int) ([]*RouteAttribute, []error) CensusTableByID(context.Context, []int) ([]*CensusTable, []error) FeedVersionGeometryByID(context.Context, []int) ([]*tt.Polygon, []error) // Segments SegmentPatternsByRouteID(context.Context, []SegmentPatternParam) ([][]*SegmentPattern, []error) SegmentPatternsBySegmentID(context.Context, []SegmentPatternParam) ([][]*SegmentPattern, []error) SegmentsByID(context.Context, []int) ([]*Segment, []error) SegmentsByRouteID(context.Context, []SegmentPatternParam) ([][]*Segment, []error) // Other loaders FeedVersionGtfsImportsByFeedVersionID(context.Context, []int) ([]*FeedVersionGtfsImport, []error) FeedStatesByFeedID(context.Context, []int) ([]*FeedState, []error) OperatorsByFeedID(context.Context, []OperatorParam) ([][]*Operator, []error) OperatorsByCOIF(context.Context, []int) ([]*Operator, []error) OperatorsByAgencyID(context.Context, []int) ([]*Operator, []error) StopPlacesByStopID(context.Context, []StopPlaceParam) ([]*StopPlace, []error) // Param loaders FeedFetchesByFeedID(context.Context, []FeedFetchParam) ([][]*FeedFetch, []error) FeedsByOperatorOnestopID(context.Context, []FeedParam) ([][]*Feed, []error) FrequenciesByTripID(context.Context, []FrequencyParam) ([][]*Frequency, []error) StopTimesByTripID(context.Context, []TripStopTimeParam) ([][]*StopTime, []error) StopTimesByStopID(context.Context, []StopTimeParam) ([][]*StopTime, []error) RouteStopsByStopID(context.Context, []RouteStopParam) ([][]*RouteStop, []error) StopsByRouteID(context.Context, []StopParam) ([][]*Stop, []error) RouteStopsByRouteID(context.Context, []RouteStopParam) ([][]*RouteStop, []error) RouteHeadwaysByRouteID(context.Context, []RouteHeadwayParam) ([][]*RouteHeadway, []error) RouteStopPatternsByRouteID(context.Context, []RouteStopPatternParam) ([][]*RouteStopPattern, []error) FeedVersionFileInfosByFeedVersionID(context.Context, []FeedVersionFileInfoParam) ([][]*FeedVersionFileInfo, []error) StopsByParentStopID(context.Context, []StopParam) ([][]*Stop, []error) FeedVersionsByFeedID(context.Context, []FeedVersionParam) ([][]*FeedVersion, []error) AgencyPlacesByAgencyID(context.Context, []AgencyPlaceParam) ([][]*AgencyPlace, []error) RouteGeometriesByRouteID(context.Context, []RouteGeometryParam) ([][]*RouteGeometry, []error) TripsByRouteID(context.Context, []TripParam) ([][]*Trip, []error) RoutesByAgencyID(context.Context, []RouteParam) ([][]*Route, []error) AgenciesByFeedVersionID(context.Context, []AgencyParam) ([][]*Agency, []error) AgenciesByOnestopID(context.Context, []AgencyParam) ([][]*Agency, []error) StopsByFeedVersionID(context.Context, []StopParam) ([][]*Stop, []error) StopsByLevelID(context.Context, []StopParam) ([][]*Stop, []error) TripsByFeedVersionID(context.Context, []TripParam) ([][]*Trip, []error) FeedInfosByFeedVersionID(context.Context, []FeedInfoParam) ([][]*FeedInfo, []error) RoutesByFeedVersionID(context.Context, []RouteParam) ([][]*Route, []error) FeedVersionServiceLevelsByFeedVersionID(context.Context, []FeedVersionServiceLevelParam) ([][]*FeedVersionServiceLevel, []error) PathwaysByFromStopID(context.Context, []PathwayParam) ([][]*Pathway, []error) PathwaysByToStopID(context.Context, []PathwayParam) ([][]*Pathway, []error) CalendarDatesByServiceID(context.Context, []CalendarDateParam) ([][]*CalendarDate, []error) CensusGeographiesByEntityID(context.Context, []CensusGeographyParam) ([][]*CensusGeography, []error) CensusValuesByGeographyID(context.Context, []CensusValueParam) ([][]*CensusValue, []error) // Validation reports ValidationReportsByFeedVersionID(context.Context, []ValidationReportParam) ([][]*ValidationReport, []error) ValidationReportErrorGroupsByValidationReportID(context.Context, []ValidationReportErrorGroupParam) ([][]*ValidationReportErrorGroup, []error) ValidationReportErrorExemplarsByValidationReportErrorGroupID(context.Context, []ValidationReportErrorExemplarParam) ([][]*ValidationReportError, []error) }
EntityLoader methods must return items in the same order as the input parameters
type EntityMutator ¶
type EntityMutator interface { FeedVersionUnimport(ctx context.Context, fvid int) (*FeedVersionUnimportResult, error) FeedVersionImport(ctx context.Context, fvid int) (*FeedVersionImportResult, error) FeedVersionUpdate(ctx context.Context, values FeedVersionSetInput) (int, error) FeedVersionDelete(ctx context.Context, fvid int) (*FeedVersionDeleteResult, error) StopCreate(ctx context.Context, input StopSetInput) (int, error) StopUpdate(ctx context.Context, input StopSetInput) (int, error) StopDelete(ctx context.Context, id int) error PathwayCreate(ctx context.Context, input PathwaySetInput) (int, error) PathwayUpdate(ctx context.Context, input PathwaySetInput) (int, error) PathwayDelete(ctx context.Context, id int) error LevelCreate(ctx context.Context, input LevelSetInput) (int, error) LevelUpdate(ctx context.Context, input LevelSetInput) (int, error) LevelDelete(ctx context.Context, id int) error }
type FeedAuthorization ¶
type FeedAuthorization struct {
tl.FeedAuthorization
}
type FeedFetchFilter ¶
type FeedFetchFilter struct {
Success *bool `json:"success,omitempty"`
}
type FeedFetchParam ¶
type FeedFetchParam struct { FeedID int Limit *int Where *FeedFetchFilter }
type FeedFilter ¶
type FeedFilter struct { // Search for feed with a specific Onestop ID OnestopID *string `json:"onestop_id,omitempty"` // Search for feeds of certain data types Spec []FeedSpecTypes `json:"spec,omitempty"` // Search for feeds with or without a fetch error FetchError *bool `json:"fetch_error,omitempty"` // Search for feeds by their import status ImportStatus *ImportStatus `json:"import_status,omitempty"` // Full text search Search *string `json:"search,omitempty"` // Search for feeds with a tag Tags *tt.Tags `json:"tags,omitempty"` // Search for feeds by their source URLs SourceURL *FeedSourceURL `json:"source_url,omitempty"` License *LicenseFilter `json:"license,omitempty"` Bbox *BoundingBox `json:"bbox,omitempty"` Within *tt.Polygon `json:"within,omitempty"` Near *PointRadius `json:"near,omitempty"` }
type FeedInfoParam ¶
type FeedLicense ¶
type FeedLicense struct {
tl.FeedLicense
}
type FeedParam ¶
type FeedParam struct { OperatorOnestopID string Limit *int Where *FeedFilter }
type FeedSourceURL ¶
type FeedSourceURL struct { URL *string `json:"url,omitempty"` Type *FeedSourceURLTypes `json:"type,omitempty"` CaseSensitive *bool `json:"case_sensitive,omitempty"` }
type FeedSourceURLTypes ¶
type FeedSourceURLTypes string
const ( FeedSourceURLTypesStaticCurrent FeedSourceURLTypes = "static_current" FeedSourceURLTypesStaticHistoric FeedSourceURLTypes = "static_historic" FeedSourceURLTypesStaticPlanned FeedSourceURLTypes = "static_planned" FeedSourceURLTypesStaticHypothetical FeedSourceURLTypes = "static_hypothetical" FeedSourceURLTypesRealtimeVehiclePositions FeedSourceURLTypes = "realtime_vehicle_positions" FeedSourceURLTypesRealtimeTripUpdates FeedSourceURLTypes = "realtime_trip_updates" FeedSourceURLTypesRealtimeAlerts FeedSourceURLTypes = "realtime_alerts" FeedSourceURLTypesGbfsAutoDiscovery FeedSourceURLTypes = "gbfs_auto_discovery" FeedSourceURLTypesMdsProvider FeedSourceURLTypes = "mds_provider" )
func (FeedSourceURLTypes) IsValid ¶
func (e FeedSourceURLTypes) IsValid() bool
func (FeedSourceURLTypes) MarshalGQL ¶
func (e FeedSourceURLTypes) MarshalGQL(w io.Writer)
func (FeedSourceURLTypes) String ¶
func (e FeedSourceURLTypes) String() string
func (*FeedSourceURLTypes) UnmarshalGQL ¶
func (e *FeedSourceURLTypes) UnmarshalGQL(v interface{}) error
type FeedSpecTypes ¶
type FeedSpecTypes string
Type of data contained in a source feed
const ( FeedSpecTypesGtfs FeedSpecTypes = "GTFS" FeedSpecTypesGtfsRt FeedSpecTypes = "GTFS_RT" FeedSpecTypesGbfs FeedSpecTypes = "GBFS" FeedSpecTypesMds FeedSpecTypes = "MDS" )
func (FeedSpecTypes) FromDBString ¶
func (f FeedSpecTypes) FromDBString(s string) *FeedSpecTypes
func (FeedSpecTypes) IsValid ¶
func (e FeedSpecTypes) IsValid() bool
func (FeedSpecTypes) MarshalGQL ¶
func (e FeedSpecTypes) MarshalGQL(w io.Writer)
func (FeedSpecTypes) String ¶
func (e FeedSpecTypes) String() string
func (FeedSpecTypes) ToDBString ¶
func (f FeedSpecTypes) ToDBString() string
func (*FeedSpecTypes) UnmarshalGQL ¶
func (e *FeedSpecTypes) UnmarshalGQL(v interface{}) error
type FeedVersion ¶
type FeedVersion struct { SHA1Dir tl.String `json:"sha1_dir"` tl.FeedVersion }
type FeedVersionDeleteResult ¶
type FeedVersionDeleteResult struct {
Success bool `json:"success"`
}
type FeedVersionFetchResult ¶
type FeedVersionFetchResult struct { FeedVersion *FeedVersion `json:"feed_version,omitempty"` FetchError *string `json:"fetch_error,omitempty"` FoundSha1 bool `json:"found_sha1"` FoundDirSha1 bool `json:"found_dir_sha1"` }
type FeedVersionFileInfo ¶
type FeedVersionFileInfo struct {
dmfr.FeedVersionFileInfo
}
type FeedVersionFilter ¶
type FeedVersionFilter struct { ImportStatus *ImportStatus `json:"import_status,omitempty"` FeedOnestopID *string `json:"feed_onestop_id,omitempty"` Sha1 *string `json:"sha1,omitempty"` File *string `json:"file,omitempty"` FeedIds []int `json:"feed_ids,omitempty"` Covers *ServiceCoversFilter `json:"covers,omitempty"` Bbox *BoundingBox `json:"bbox,omitempty"` Within *tt.Polygon `json:"within,omitempty"` Near *PointRadius `json:"near,omitempty"` }
type FeedVersionGtfsImport ¶
type FeedVersionGtfsImport struct { WarningCount *json.RawMessage `json:"warning_count"` EntityCount *json.RawMessage `json:"entity_count"` SkipEntityErrorCount *json.RawMessage `json:"skip_entity_error_count"` SkipEntityReferenceCount *json.RawMessage `json:"skip_entity_reference_count"` SkipEntityFilterCount *json.RawMessage `json:"skip_entity_filter_count"` SkipEntityMarkedCount *json.RawMessage `json:"skip_entity_marked_count"` dmfr.FeedVersionImport }
type FeedVersionImportResult ¶
type FeedVersionImportResult struct {
Success bool `json:"success"`
}
type FeedVersionInput ¶
type FeedVersionInput struct {
ID *int `json:"id,omitempty"`
}
type FeedVersionParam ¶
type FeedVersionParam struct { FeedID int Limit *int Where *FeedVersionFilter }
type FeedVersionServiceLevel ¶
type FeedVersionServiceLevel struct {
dmfr.FeedVersionServiceLevel
}
type FeedVersionServiceLevelParam ¶
type FeedVersionServiceLevelParam struct { FeedVersionID int Limit *int Where *FeedVersionServiceLevelFilter }
type FeedVersionSetInput ¶
type FeedVersionUnimportResult ¶
type FeedVersionUnimportResult struct {
Success bool `json:"success"`
}
type Finder ¶
type Finder interface { PermFinder EntityFinder EntityLoader EntityMutator }
Finder provides all necessary database methods
type FrequencyParam ¶
type GbfsAlertTime ¶
type GbfsBikeRequest ¶
type GbfsBikeRequest struct {
Near *PointRadius `json:"near,omitempty"`
}
type GbfsBrandAsset ¶
type GbfsBrandAsset struct {
*gbfs.BrandAsset
}
type GbfsDockRequest ¶
type GbfsDockRequest struct {
Near *PointRadius `json:"near,omitempty"`
}
type GbfsFeed ¶
func (*GbfsFeed) Alerts ¶
func (g *GbfsFeed) Alerts() []*GbfsSystemAlert
func (*GbfsFeed) Calendars ¶
func (g *GbfsFeed) Calendars() []*GbfsSystemCalendar
func (*GbfsFeed) RentalHours ¶
func (g *GbfsFeed) RentalHours() []*GbfsSystemHour
func (*GbfsFeed) StationInformation ¶
func (g *GbfsFeed) StationInformation() []*GbfsStationInformation
func (*GbfsFeed) SystemInformation ¶
func (g *GbfsFeed) SystemInformation() *GbfsSystemInformation
type GbfsFinder ¶
type GbfsFinder interface { AddData(context.Context, string, gbfs.GbfsFeed) error FindBikes(context.Context, *int, *GbfsBikeRequest) ([]*GbfsFreeBikeStatus, error) FindDocks(context.Context, *int, *GbfsDockRequest) ([]*GbfsStationInformation, error) }
GBFSFinder manages and looks up GBFS data
type GbfsFreeBikeStatus ¶
type GbfsFreeBikeStatus struct { Feed *GbfsFeed *gbfs.FreeBikeStatus }
func (*GbfsFreeBikeStatus) HomeStation ¶
func (g *GbfsFreeBikeStatus) HomeStation() *GbfsStationInformation
func (*GbfsFreeBikeStatus) PricingPlan ¶
func (g *GbfsFreeBikeStatus) PricingPlan() *GbfsSystemPricingPlan
func (*GbfsFreeBikeStatus) RentalUris ¶
func (g *GbfsFreeBikeStatus) RentalUris() *GbfsRentalUris
func (*GbfsFreeBikeStatus) Station ¶
func (g *GbfsFreeBikeStatus) Station() *GbfsStationInformation
func (*GbfsFreeBikeStatus) VehicleType ¶
func (g *GbfsFreeBikeStatus) VehicleType() *GbfsVehicleType
type GbfsGeofenceFeature ¶
type GbfsGeofenceFeature struct {
*gbfs.GeofenceFeature
}
func (*GbfsGeofenceFeature) Properties ¶
func (g *GbfsGeofenceFeature) Properties() []*GbfsGeofenceProperty
type GbfsGeofenceProperty ¶
type GbfsGeofenceProperty struct {
*gbfs.GeofenceProperty
}
func (*GbfsGeofenceProperty) Rules ¶
func (g *GbfsGeofenceProperty) Rules() []*GbfsGeofenceRule
type GbfsGeofenceRule ¶
type GbfsGeofenceRule struct {
*gbfs.GeofenceRule
}
func (*GbfsGeofenceRule) VehicleType ¶
func (g *GbfsGeofenceRule) VehicleType() *GbfsVehicleType
type GbfsGeofenceZone ¶
type GbfsGeofenceZone struct {
*gbfs.GeofenceZone
}
func (*GbfsGeofenceZone) Features ¶
func (g *GbfsGeofenceZone) Features() []*GbfsGeofenceFeature
type GbfsPlanPrice ¶
type GbfsRentalApp ¶
type GbfsRentalApps ¶
type GbfsRentalApps struct {
*gbfs.RentalApps
}
func (*GbfsRentalApps) Android ¶
func (g *GbfsRentalApps) Android() *GbfsRentalApp
func (*GbfsRentalApps) Ios ¶
func (g *GbfsRentalApps) Ios() *GbfsRentalApp
type GbfsRentalUris ¶
type GbfsRentalUris struct {
*gbfs.RentalURIs
}
type GbfsStationInformation ¶
type GbfsStationInformation struct { Feed *GbfsFeed *gbfs.StationInformation }
func (*GbfsStationInformation) Region ¶
func (g *GbfsStationInformation) Region() *GbfsSystemRegion
func (*GbfsStationInformation) Status ¶
func (g *GbfsStationInformation) Status() *GbfsStationStatus
type GbfsStationStatus ¶
type GbfsStationStatus struct { Feed *GbfsFeed *gbfs.StationStatus }
func (*GbfsStationStatus) VehicleDocksAvailable ¶
func (g *GbfsStationStatus) VehicleDocksAvailable() []*GbfsVehicleDockAvailable
func (*GbfsStationStatus) VehicleTypesAvailable ¶
func (g *GbfsStationStatus) VehicleTypesAvailable() []*GbfsVehicleTypeAvailable
type GbfsSystemAlert ¶
type GbfsSystemAlert struct {
*gbfs.SystemAlert
}
func (*GbfsSystemAlert) Times ¶
func (g *GbfsSystemAlert) Times() []*GbfsAlertTime
type GbfsSystemCalendar ¶
type GbfsSystemCalendar struct {
*gbfs.SystemCalendar
}
type GbfsSystemHour ¶
type GbfsSystemHour struct {
*gbfs.SystemHour
}
type GbfsSystemInformation ¶
type GbfsSystemInformation struct { Feed *GbfsFeed *gbfs.SystemInformation }
func (*GbfsSystemInformation) BrandAssets ¶
func (g *GbfsSystemInformation) BrandAssets() *GbfsBrandAsset
func (*GbfsSystemInformation) RentalApps ¶
func (g *GbfsSystemInformation) RentalApps() *GbfsRentalApps
type GbfsSystemPricingPlan ¶
type GbfsSystemPricingPlan struct {
*gbfs.SystemPricingPlan
}
func (*GbfsSystemPricingPlan) PerKmPricing ¶
func (g *GbfsSystemPricingPlan) PerKmPricing() []*GbfsPlanPrice
func (*GbfsSystemPricingPlan) PerMinPricing ¶
func (g *GbfsSystemPricingPlan) PerMinPricing() []*GbfsPlanPrice
type GbfsSystemRegion ¶
type GbfsSystemRegion struct {
*gbfs.SystemRegion
}
type GbfsSystemVersion ¶
type GbfsSystemVersion struct {
*gbfs.SystemVersion
}
type GbfsVehicleAssets ¶
type GbfsVehicleAssets struct {
*gbfs.VehicleAssets
}
type GbfsVehicleDockAvailable ¶
type GbfsVehicleDockAvailable struct { Feed *GbfsFeed *gbfs.VehicleDockAvailable }
func (*GbfsVehicleDockAvailable) VehicleTypes ¶
func (g *GbfsVehicleDockAvailable) VehicleTypes() []*GbfsVehicleType
type GbfsVehicleType ¶
type GbfsVehicleType struct { Feed *GbfsFeed *gbfs.VehicleType }
func (*GbfsVehicleType) DefaultPricingPlan ¶
func (g *GbfsVehicleType) DefaultPricingPlan() *GbfsSystemPricingPlan
func (*GbfsVehicleType) PricingPlans ¶
func (g *GbfsVehicleType) PricingPlans() []*GbfsSystemPricingPlan
func (*GbfsVehicleType) RentalUris ¶
func (g *GbfsVehicleType) RentalUris() *GbfsRentalUris
func (*GbfsVehicleType) VehicleAssets ¶
func (g *GbfsVehicleType) VehicleAssets() *GbfsVehicleAssets
type GbfsVehicleTypeAvailable ¶
type GbfsVehicleTypeAvailable struct { Feed *GbfsFeed *gbfs.VehicleTypeAvailable }
func (*GbfsVehicleTypeAvailable) VehicleType ¶
func (g *GbfsVehicleTypeAvailable) VehicleType() *GbfsVehicleType
type ImportStatus ¶
type ImportStatus string
const ( ImportStatusSuccess ImportStatus = "SUCCESS" ImportStatusError ImportStatus = "ERROR" ImportStatusInProgress ImportStatus = "IN_PROGRESS" )
func (ImportStatus) IsValid ¶
func (e ImportStatus) IsValid() bool
func (ImportStatus) MarshalGQL ¶
func (e ImportStatus) MarshalGQL(w io.Writer)
func (ImportStatus) String ¶
func (e ImportStatus) String() string
func (*ImportStatus) UnmarshalGQL ¶
func (e *ImportStatus) UnmarshalGQL(v interface{}) error
type Leg ¶
type Leg struct { Duration *Duration `json:"duration"` Distance *Distance `json:"distance"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` From *Waypoint `json:"from,omitempty"` To *Waypoint `json:"to,omitempty"` Steps []*Step `json:"steps,omitempty"` Geometry tt.LineString `json:"geometry"` }
type LevelParam ¶
type LevelSetInput ¶
type LevelSetInput struct { ID *int `json:"id,omitempty"` FeedVersion *FeedVersionInput `json:"feed_version,omitempty"` LevelID *string `json:"level_id,omitempty"` LevelName *string `json:"level_name,omitempty"` LevelIndex *float64 `json:"level_index,omitempty"` Geometry *tt.Polygon `json:"geometry,omitempty"` Parent *StopSetInput `json:"parent,omitempty"` }
type LicenseFilter ¶
type LicenseFilter struct { CreateDerivedProduct *LicenseValue `json:"create_derived_product,omitempty"` CommercialUseAllowed *LicenseValue `json:"commercial_use_allowed,omitempty"` UseWithoutAttribution *LicenseValue `json:"use_without_attribution,omitempty"` RedistributionAllowed *LicenseValue `json:"redistribution_allowed,omitempty"` }
type LicenseValue ¶
type LicenseValue string
const ( LicenseValueYes LicenseValue = "YES" LicenseValueNo LicenseValue = "NO" LicenseValueExcludeNo LicenseValue = "EXCLUDE_NO" LicenseValueUnknown LicenseValue = "UNKNOWN" )
func (LicenseValue) IsValid ¶
func (e LicenseValue) IsValid() bool
func (LicenseValue) MarshalGQL ¶
func (e LicenseValue) MarshalGQL(w io.Writer)
func (LicenseValue) String ¶
func (e LicenseValue) String() string
func (*LicenseValue) UnmarshalGQL ¶
func (e *LicenseValue) UnmarshalGQL(v interface{}) error
type OperatorFilter ¶
type OperatorFilter struct { Merged *bool `json:"merged,omitempty"` OnestopID *string `json:"onestop_id,omitempty"` FeedOnestopID *string `json:"feed_onestop_id,omitempty"` AgencyID *string `json:"agency_id,omitempty"` Search *string `json:"search,omitempty"` Tags *tt.Tags `json:"tags,omitempty"` CityName *string `json:"city_name,omitempty"` Adm0Name *string `json:"adm0_name,omitempty"` Adm1Name *string `json:"adm1_name,omitempty"` Adm0Iso *string `json:"adm0_iso,omitempty"` Adm1Iso *string `json:"adm1_iso,omitempty"` License *LicenseFilter `json:"license,omitempty"` Bbox *BoundingBox `json:"bbox,omitempty"` Within *tt.Polygon `json:"within,omitempty"` Near *PointRadius `json:"near,omitempty"` }
type OperatorParam ¶
type OperatorParam struct { FeedID int Limit *int Where *OperatorFilter }
type PathwayFilter ¶
type PathwayFilter struct {
PathwayMode *int `json:"pathway_mode,omitempty"`
}
type PathwayParam ¶
type PathwayParam struct { FeedVersionID int FromStopID int ToStopID int Limit *int Where *PathwayFilter }
type PathwaySetInput ¶
type PathwaySetInput struct { ID *int `json:"id,omitempty"` FeedVersion *FeedVersionInput `json:"feed_version,omitempty"` PathwayID *string `json:"pathway_id,omitempty"` PathwayMode *int `json:"pathway_mode,omitempty"` IsBidirectional *int `json:"is_bidirectional,omitempty"` Length *float64 `json:"length,omitempty"` TraversalTime *int `json:"traversal_time,omitempty"` StairCount *int `json:"stair_count,omitempty"` MaxSlope *float64 `json:"max_slope,omitempty"` MinWidth *float64 `json:"min_width,omitempty"` SignpostedAs *string `json:"signposted_as,omitempty"` ReverseSignpostedAs *string `json:"reverse_signposted_as,omitempty"` FromStop *StopSetInput `json:"from_stop,omitempty"` ToStop *StopSetInput `json:"to_stop,omitempty"` }
type PermFilter ¶
func (*PermFilter) GetAllowedFeedVersions ¶
func (pf *PermFilter) GetAllowedFeedVersions() []int
func (*PermFilter) GetAllowedFeeds ¶
func (pf *PermFilter) GetAllowedFeeds() []int
type PermFinder ¶
type PermFinder interface {
PermFilter(context.Context) *PermFilter
}
type PlaceAggregationLevel ¶
type PlaceAggregationLevel string
const ( PlaceAggregationLevelAdm0 PlaceAggregationLevel = "ADM0" PlaceAggregationLevelAdm0Adm1 PlaceAggregationLevel = "ADM0_ADM1" PlaceAggregationLevelAdm0Adm1City PlaceAggregationLevel = "ADM0_ADM1_CITY" PlaceAggregationLevelAdm0City PlaceAggregationLevel = "ADM0_CITY" PlaceAggregationLevelAdm1City PlaceAggregationLevel = "ADM1_CITY" PlaceAggregationLevelCity PlaceAggregationLevel = "CITY" )
func (PlaceAggregationLevel) IsValid ¶
func (e PlaceAggregationLevel) IsValid() bool
func (PlaceAggregationLevel) MarshalGQL ¶
func (e PlaceAggregationLevel) MarshalGQL(w io.Writer)
func (PlaceAggregationLevel) String ¶
func (e PlaceAggregationLevel) String() string
func (*PlaceAggregationLevel) UnmarshalGQL ¶
func (e *PlaceAggregationLevel) UnmarshalGQL(v interface{}) error
type PlaceFilter ¶
type PointRadius ¶
type RTFinder ¶
type RTFinder interface { AddData(string, []byte) error FindTrip(t *Trip) *pb.TripUpdate MakeTrip(t *Trip) (*Trip, error) FindAlertsForTrip(*Trip, *int, *bool) []*Alert FindAlertsForStop(*Stop, *int, *bool) []*Alert FindAlertsForRoute(*Route, *int, *bool) []*Alert FindAlertsForAgency(*Agency, *int, *bool) []*Alert GetAddedTripsForStop(*Stop) []*pb.TripUpdate FindStopTimeUpdate(*Trip, *StopTime) (*pb.TripUpdate_StopTimeUpdate, bool) // lookup cache methods StopTimezone(int, string) (*time.Location, bool) GetGtfsTripID(int) (string, bool) }
RTFinder manages and looks up RT data
type RTTranslation ¶
type RTTranslation struct { Text string `json:"text"` Language *string `json:"language,omitempty"` }
See https://gtfs.org/reference/realtime/v2/#message-translatedstring
type RTTripDescriptor ¶
type RTTripDescriptor struct { TripID *string `json:"trip_id,omitempty"` RouteID *string `json:"route_id,omitempty"` DirectionID *int `json:"direction_id,omitempty"` StartTime *tt.WideTime `json:"start_time,omitempty"` StartDate *tt.Date `json:"start_date,omitempty"` ScheduleRelationship *string `json:"schedule_relationship,omitempty"` }
See https://gtfs.org/reference/realtime/v2/#message-tripdescriptor
type RTVehicleDescriptor ¶
type RTVehicleDescriptor struct { ID *string `json:"id,omitempty"` Label *string `json:"label,omitempty"` LicensePlate *string `json:"license_plate,omitempty"` }
See https://gtfs.org/reference/realtime/v2/#message-vehicledescriptor
type RouteAttribute ¶
type RouteAttribute struct { Category *int `json:"category,omitempty"` Subcategory *int `json:"subcategory,omitempty"` RunningWay *int `json:"running_way,omitempty"` RouteID int `json:"-"` }
MTC GTFS+ Extension: route_attributes.txt
type RouteFilter ¶
type RouteFilter struct { OnestopID *string `json:"onestop_id,omitempty"` OnestopIds []string `json:"onestop_ids,omitempty"` AllowPreviousOnestopIds *bool `json:"allow_previous_onestop_ids,omitempty"` FeedVersionSha1 *string `json:"feed_version_sha1,omitempty"` FeedOnestopID *string `json:"feed_onestop_id,omitempty"` RouteID *string `json:"route_id,omitempty"` RouteType *int `json:"route_type,omitempty"` Serviced *bool `json:"serviced,omitempty"` Bbox *BoundingBox `json:"bbox,omitempty"` Within *tt.Polygon `json:"within,omitempty"` Near *PointRadius `json:"near,omitempty"` Search *string `json:"search,omitempty"` OperatorOnestopID *string `json:"operator_onestop_id,omitempty"` License *LicenseFilter `json:"license,omitempty"` AgencyIds []int `json:"agency_ids,omitempty"` }
type RouteGeometry ¶
type RouteGeometry struct { // If true, the source GTFS feed provides no shapes. This route geometry is based on straight lines between stop points. Generated bool `json:"generated"` Geometry *tt.LineString `json:"geometry,omitempty"` CombinedGeometry *tt.Geometry `json:"combined_geometry,omitempty"` Length *float64 `json:"length,omitempty"` MaxSegmentLength *float64 `json:"max_segment_length,omitempty"` FirstPointMaxDistance *float64 `json:"first_point_max_distance,omitempty"` RouteID int `json:"-"` }
type RouteGeometryParam ¶
type RouteHeadway ¶
type RouteHeadway struct { Stop *Stop `json:"stop"` DowCategory *int `json:"dow_category,omitempty"` DirectionID *int `json:"direction_id,omitempty"` HeadwaySecs *int `json:"headway_secs,omitempty"` ServiceDate *tt.Date `json:"service_date,omitempty"` StopTripCount *int `json:"stop_trip_count,omitempty"` DeparturesUnused []*tt.WideTime `json:"departures,omitempty"` DepartureInts tt.Ints `db:"departures"` RouteID int `json:"-"` SelectedStopID int `json:"-"` }
type RouteHeadwayParam ¶
type RouteParam ¶
type RouteParam struct { AgencyID int FeedVersionID int Limit *int Where *RouteFilter }
type RouteStopBuffer ¶
type RouteStopBufferParam ¶
type RouteStopParam ¶
type RouteStopPattern ¶
type RouteStopPatternParam ¶
type RouteStopPatternParam struct {
RouteID int
}
type ScheduleRelationship ¶
type ScheduleRelationship string
const ( ScheduleRelationshipScheduled ScheduleRelationship = "SCHEDULED" ScheduleRelationshipAdded ScheduleRelationship = "ADDED" ScheduleRelationshipUnscheduled ScheduleRelationship = "UNSCHEDULED" ScheduleRelationshipCanceled ScheduleRelationship = "CANCELED" )
func (ScheduleRelationship) IsValid ¶
func (e ScheduleRelationship) IsValid() bool
func (ScheduleRelationship) MarshalGQL ¶
func (e ScheduleRelationship) MarshalGQL(w io.Writer)
func (ScheduleRelationship) String ¶
func (e ScheduleRelationship) String() string
func (*ScheduleRelationship) UnmarshalGQL ¶
func (e *ScheduleRelationship) UnmarshalGQL(v interface{}) error
type Segment ¶
type Segment struct { ID int `json:"id"` WayID int `json:"way_id"` Geometry tt.LineString `json:"geometry"` SegmentPatterns []*SegmentPattern `json:"segment_patterns,omitempty"` }
type SegmentPattern ¶
type SegmentPatternParam ¶
type ServiceCoversFilter ¶
type ServiceCoversFilter struct { FetchedAfter *time.Time `json:"fetched_after,omitempty"` FetchedBefore *time.Time `json:"fetched_before,omitempty"` // Search using only feed_info.txt values FeedStartDate *tt.Date `json:"feed_start_date,omitempty"` // Search using only feed_info.txt values FeedEndDate *tt.Date `json:"feed_end_date,omitempty"` // Search using feed_info.txt values or calendar maximum service extent StartDate *tt.Date `json:"start_date,omitempty"` // Search using feed_info.txt values or calendar maximum service extent EndDate *tt.Date `json:"end_date,omitempty"` // Search using calendar maximum service extent EarliestCalendarDate *tt.Date `json:"earliest_calendar_date,omitempty"` // Search using calendar maximum service extent LatestCalendarDate *tt.Date `json:"latest_calendar_date,omitempty"` }
type Step ¶
type Step struct { Duration *Duration `json:"duration"` Distance *Distance `json:"distance"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` To *Waypoint `json:"to,omitempty"` Mode StepMode `json:"mode"` Instruction string `json:"instruction"` GeometryOffset int `json:"geometry_offset"` }
type StopExternalReference ¶
type StopFilter ¶
type StopFilter struct { OnestopID *string `json:"onestop_id,omitempty"` OnestopIds []string `json:"onestop_ids,omitempty"` AllowPreviousOnestopIds *bool `json:"allow_previous_onestop_ids,omitempty"` FeedVersionSha1 *string `json:"feed_version_sha1,omitempty"` FeedOnestopID *string `json:"feed_onestop_id,omitempty"` StopID *string `json:"stop_id,omitempty"` StopCode *string `json:"stop_code,omitempty"` LocationType *int `json:"location_type,omitempty"` Serviced *bool `json:"serviced,omitempty"` Bbox *BoundingBox `json:"bbox,omitempty"` Within *tt.Polygon `json:"within,omitempty"` Near *PointRadius `json:"near,omitempty"` Search *string `json:"search,omitempty"` License *LicenseFilter `json:"license,omitempty"` ServedByOnestopIds []string `json:"served_by_onestop_ids,omitempty"` ServedByRouteType *int `json:"served_by_route_type,omitempty"` AgencyIds []int `json:"agency_ids,omitempty"` }
type StopObservation ¶
type StopObservation struct { ScheduleRelationship *string `json:"schedule_relationship,omitempty"` TripStartDate *tt.Date `json:"trip_start_date,omitempty"` TripStartTime *tt.WideTime `json:"trip_start_time,omitempty"` FromStopID *string `json:"from_stop_id,omitempty"` ToStopID *string `json:"to_stop_id,omitempty"` AgencyID *string `json:"agency_id,omitempty"` RouteID *string `json:"route_id,omitempty"` TripID *string `json:"trip_id,omitempty"` StopSequence *int `json:"stop_sequence,omitempty"` Source *string `json:"source,omitempty"` ScheduledArrivalTime *tt.WideTime `json:"scheduled_arrival_time,omitempty"` ScheduledDepartureTime *tt.WideTime `json:"scheduled_departure_time,omitempty"` ObservedArrivalTime *tt.WideTime `json:"observed_arrival_time,omitempty"` ObservedDepartureTime *tt.WideTime `json:"observed_departure_time,omitempty"` }
type StopObservationFilter ¶
type StopObservationParam ¶
type StopObservationParam struct { StopID int Limit *int Where *StopObservationFilter }
type StopPlaceParam ¶
type StopSetInput ¶
type StopSetInput struct { ID *int `json:"id,omitempty"` FeedVersion *FeedVersionInput `json:"feed_version,omitempty"` LocationType *int `json:"location_type,omitempty"` StopCode *string `json:"stop_code,omitempty"` StopDesc *string `json:"stop_desc,omitempty"` StopID *string `json:"stop_id,omitempty"` StopName *string `json:"stop_name,omitempty"` StopTimezone *string `json:"stop_timezone,omitempty"` StopURL *string `json:"stop_url,omitempty"` WheelchairBoarding *int `json:"wheelchair_boarding,omitempty"` ZoneID *string `json:"zone_id,omitempty"` PlatformCode *string `json:"platform_code,omitempty"` TtsStopName *string `json:"tts_stop_name,omitempty"` Geometry *tt.Point `json:"geometry,omitempty"` Parent *StopSetInput `json:"parent,omitempty"` Level *LevelSetInput `json:"level,omitempty"` }
type StopTimeEvent ¶
type StopTimeEvent struct { StopTimezone string `json:"stop_timezone"` Scheduled *tt.WideTime `json:"scheduled,omitempty"` Estimated *tt.WideTime `json:"estimated,omitempty"` EstimatedUtc *time.Time `json:"estimated_utc,omitempty"` Delay *int `json:"delay,omitempty"` Uncertainty *int `json:"uncertainty,omitempty"` }
type StopTimeFilter ¶
type StopTimeFilter struct { ServiceDate *tt.Date `json:"service_date,omitempty"` UseServiceWindow *bool `json:"use_service_window,omitempty"` StartTime *int `json:"start_time,omitempty"` EndTime *int `json:"end_time,omitempty"` Start *tt.WideTime `json:"start,omitempty"` End *tt.WideTime `json:"end,omitempty"` Next *int `json:"next,omitempty"` RouteOnestopIds []string `json:"route_onestop_ids,omitempty"` AllowPreviousRouteOnestopIds *bool `json:"allow_previous_route_onestop_ids,omitempty"` ExcludeFirst *bool `json:"exclude_first,omitempty"` ExcludeLast *bool `json:"exclude_last,omitempty"` }
type StopTimeParam ¶
type StopTimeParam struct { TripID int StopID int FeedVersionID int Limit *int Where *StopTimeFilter }
type TripFilter ¶
type TripFilter struct { ServiceDate *tt.Date `json:"service_date,omitempty"` TripID *string `json:"trip_id,omitempty"` StopPatternID *int `json:"stop_pattern_id,omitempty"` License *LicenseFilter `json:"license,omitempty"` RouteIds []int `json:"route_ids,omitempty"` RouteOnestopIds []string `json:"route_onestop_ids,omitempty"` FeedVersionSha1 *string `json:"feed_version_sha1,omitempty"` FeedOnestopID *string `json:"feed_onestop_id,omitempty"` }
type TripParam ¶
type TripParam struct { FeedVersionID int RouteID int Limit *int Where *TripFilter }
type TripStopTimeFilter ¶
type TripStopTimeParam ¶
type ValidationReport ¶
type ValidationReport struct { ID int `json:"id"` ReportedAt *time.Time `json:"reported_at,omitempty"` ReportedAtLocal *time.Time `json:"reported_at_local,omitempty"` ReportedAtLocalTimezone *string `json:"reported_at_local_timezone,omitempty"` Success bool `json:"success"` FailureReason *string `json:"failure_reason,omitempty"` IncludesStatic *bool `json:"includes_static,omitempty"` IncludesRt *bool `json:"includes_rt,omitempty"` Validator *string `json:"validator,omitempty"` ValidatorVersion *string `json:"validator_version,omitempty"` Errors []*ValidationReportErrorGroup `json:"errors"` Warnings []*ValidationReportErrorGroup `json:"warnings"` Details *ValidationReportDetails `json:"details,omitempty"` FeedVersionID int `json:"-"` }
type ValidationReportDetails ¶
type ValidationReportDetails struct { Sha1 string `json:"sha1"` EarliestCalendarDate *tt.Date `json:"earliest_calendar_date,omitempty"` LatestCalendarDate *tt.Date `json:"latest_calendar_date,omitempty"` Files []*FeedVersionFileInfo `json:"files"` ServiceLevels []*FeedVersionServiceLevel `json:"service_levels"` Agencies []*Agency `json:"agencies"` Routes []*Route `json:"routes"` Stops []*Stop `json:"stops"` FeedInfos []*FeedInfo `json:"feed_infos"` Realtime []*ValidationRealtimeResult `json:"realtime,omitempty"` }
type ValidationReportError ¶
type ValidationReportError struct { Filename string `json:"filename"` ErrorType string `json:"error_type"` ErrorCode string `json:"error_code"` GroupKey string `json:"group_key"` EntityID string `json:"entity_id"` Field string `json:"field"` Line int `json:"line"` Value string `json:"value"` Message string `json:"message"` Geometry *tt.Geometry `json:"geometry,omitempty"` EntityJSON tt.Map `json:"entity_json"` ID int `json:"-"` ValidationReportErrorGroupID int `json:"-"` }
type ValidationReportErrorGroup ¶
type ValidationReportErrorGroup struct { Filename string `json:"filename"` ErrorType string `json:"error_type"` ErrorCode string `json:"error_code"` GroupKey string `json:"group_key"` Field string `json:"field"` Count int `json:"count"` Errors []*ValidationReportError `json:"errors"` ID int `json:"-"` ValidationReportID int `json:"-"` }
type ValidationReportFilter ¶
type ValidationReportFilter struct { ReportIds []int `json:"report_ids,omitempty"` Success *bool `json:"success,omitempty"` Validator *string `json:"validator,omitempty"` ValidatorVersion *string `json:"validator_version,omitempty"` IncludesRt *bool `json:"includes_rt,omitempty"` IncludesStatic *bool `json:"includes_static,omitempty"` }
type ValidationReportParam ¶
type ValidationReportParam struct { FeedVersionID int Limit *int Where *ValidationReportFilter }
type VehiclePosition ¶
type VehiclePosition struct { Vehicle *RTVehicleDescriptor `json:"vehicle,omitempty"` Position *tt.Point `json:"position,omitempty"` CurrentStopSequence *int `json:"current_stop_sequence,omitempty"` StopID *Stop `json:"stop_id,omitempty"` CurrentStatus *string `json:"current_status,omitempty"` Timestamp *time.Time `json:"timestamp,omitempty"` CongestionLevel *string `json:"congestion_level,omitempty"` }
[Vehicle Position](https://gtfs.org/reference/realtime/v2/#message-vehicleposition) message provided by a source GTFS Realtime feed.