Documentation
¶
Index ¶
- type Agency
- type Area
- type Attribution
- type Calendar
- type CalendarDate
- type FareAttribute
- type FareLegRule
- type FareMedia
- type FareProduct
- func (ent *FareProduct) ConditionalErrors() (errs []error)
- func (ent *FareProduct) DuplicateKey() string
- func (ent *FareProduct) EntityID() string
- func (ent *FareProduct) Filename() string
- func (ent *FareProduct) GetValue(key string) (any, bool)
- func (ent *FareProduct) GroupKey() (string, string)
- func (ent *FareProduct) TableName() string
- type FareRule
- type FareTransferRule
- type FeedInfo
- type Frequency
- type Level
- type Network
- type Pathway
- type Reader
- type RiderCategory
- type Route
- type RouteNetwork
- type Shape
- type Stop
- func (ent *Stop) ConditionalErrors() []error
- func (ent *Stop) Coordinates() [2]float64
- func (ent *Stop) EntityID() string
- func (ent *Stop) EntityKey() string
- func (ent *Stop) Filename() string
- func (ent *Stop) SetCoordinates(p [2]float64)
- func (ent *Stop) TableName() string
- func (ent *Stop) ToPoint() tlxy.Point
- type StopArea
- type StopTime
- type Timeframe
- type Transfer
- type Translation
- type Trip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agency ¶
type Agency struct { AgencyID tt.String AgencyName tt.String `csv:",required"` AgencyURL tt.Url `csv:",required"` AgencyTimezone tt.Timezone `csv:",required"` AgencyLang tt.Language AgencyPhone tt.String AgencyFareURL tt.Url AgencyEmail tt.Email tt.BaseEntity }
Agency agency.txt
type Area ¶
type Area struct { AreaID tt.String `csv:",required"` AreaName tt.String AgencyIDs tt.Strings `csv:"-" db:"agency_ids"` // interline ext Geometry tt.Polygon `csv:"-"` // interline ext tt.BaseEntity }
Area fare_areas.txt
type Attribution ¶
type Attribution struct { OrganizationName tt.String `csv:",required"` AgencyID tt.Key `target:"agency.txt"` RouteID tt.Key `target:"routes.txt"` TripID tt.Key `target:"trips.txt"` IsProducer tt.Int `enum:"0,1"` IsOperator tt.Int `enum:"0,1"` IsAuthority tt.Int `enum:"0,1"` AttributionID tt.String AttributionURL tt.Url AttributionEmail tt.Email AttributionPhone tt.String tt.BaseEntity }
func (*Attribution) ConditionalErrors ¶
func (ent *Attribution) ConditionalErrors() (errs []error)
Errors for this Entity.
func (*Attribution) Filename ¶
func (ent *Attribution) Filename() string
func (*Attribution) TableName ¶
func (ent *Attribution) TableName() string
type Calendar ¶
type Calendar struct { ServiceID tt.String `csv:",required"` Monday tt.Int `csv:",required" enum:"0,1"` Tuesday tt.Int `csv:",required" enum:"0,1"` Wednesday tt.Int `csv:",required" enum:"0,1"` Thursday tt.Int `csv:",required" enum:"0,1"` Friday tt.Int `csv:",required" enum:"0,1"` Saturday tt.Int `csv:",required" enum:"0,1"` Sunday tt.Int `csv:",required" enum:"0,1"` StartDate tt.Date `csv:",required"` EndDate tt.Date `csv:",required"` Generated tt.Bool `csv:"-" db:"generated"` CalendarDates []CalendarDate `csv:"-" db:"-"` // for validation tt.BaseEntity }
Calendar calendar.txt
func (*Calendar) ConditionalErrors ¶
Errors for this Entity.
type CalendarDate ¶
type CalendarDate struct { ServiceID tt.Key `csv:",required" target:"calendar.txt"` Date tt.Date `csv:",required"` ExceptionType tt.Int `csv:",required" enum:"1,2"` tt.BaseEntity }
CalendarDate calendar_dates.txt
func (*CalendarDate) Filename ¶
func (ent *CalendarDate) Filename() string
Filename calendar_dates.txt
func (*CalendarDate) TableName ¶
func (ent *CalendarDate) TableName() string
TableName gtfs_calendar_dates
type FareAttribute ¶
type FareAttribute struct { FareID tt.String `csv:",required"` Price tt.Float `csv:",required" range:"0,"` CurrencyType tt.Currency `csv:",required"` PaymentMethod tt.Int `csv:",required" enum:"0,1"` Transfers tt.Int `enum:"0,1,2"` // note! null is distinct from 0 AgencyID tt.Key `target:"agency.txt"` TransferDuration tt.Int `range:"0,"` tt.BaseEntity }
FareAttribute fare_attributes.txt
func (*FareAttribute) EntityID ¶
func (ent *FareAttribute) EntityID() string
EntityID returns the ID or FareID.
func (*FareAttribute) EntityKey ¶
func (ent *FareAttribute) EntityKey() string
EntityKey returns the GTFS identifier.
func (*FareAttribute) Filename ¶
func (ent *FareAttribute) Filename() string
Filename fare_attributes.txt
func (*FareAttribute) TableName ¶
func (ent *FareAttribute) TableName() string
TableName gtfs_fare_attributes
type FareLegRule ¶
type FareLegRule struct { LegGroupID tt.String FromAreaID tt.String `target:"areas.txt"` ToAreaID tt.String `target:"areas.txt"` NetworkID tt.String `target:"networks.txt"` FareProductID tt.String `csv:",required" target:"fare_products.txt:fare_product_id"` FromTimeframeGroupID tt.String `target:"timeframes.txt:timeframe_group_id"` ToTimeframeGroupID tt.String `target:"timeframes.txt:timeframe_group_id"` RulePriority tt.Int `range:"0,"` TransferOnly tt.Int `enum:"0,1"` // interline ext tt.BaseEntity }
FareLegRule fare_leg_rules.txt
func (*FareLegRule) DuplicateKey ¶ added in v1.0.0
func (ent *FareLegRule) DuplicateKey() string
func (*FareLegRule) EntityID ¶
func (ent *FareLegRule) EntityID() string
func (*FareLegRule) Filename ¶
func (ent *FareLegRule) Filename() string
func (*FareLegRule) GroupKey ¶ added in v1.0.0
func (ent *FareLegRule) GroupKey() (string, string)
func (*FareLegRule) TableName ¶
func (ent *FareLegRule) TableName() string
type FareMedia ¶
type FareMedia struct { FareMediaID tt.String `csv:",required"` FareMediaName tt.String `csv:",required"` FareMediaType tt.Int `csv:",required" enum:"0,1,2,3,4"` tt.BaseEntity }
FareMedia fare_media.txt
type FareProduct ¶
type FareProduct struct { FareProductID tt.String `csv:",required" ` FareProductName tt.String Amount tt.CurrencyAmount `csv:",required"` Currency tt.Currency `csv:",required"` DurationStart tt.Int `enum:"0,1"` // proposed extension DurationAmount tt.Float `range:"0,"` // proposed extension DurationUnit tt.Int `enum:"0,1,2,3,4,5,6"` // proposed extension DurationType tt.Int `enum:"1,2"` // proposed extension RiderCategoryID tt.Key `target:"rider_categories.txt:rider_category_id"` // proposed extension FareMediaID tt.Key `target:"fare_media.txt"` // proposed extension tt.BaseEntity }
FareProduct fare_products.txt
func (*FareProduct) ConditionalErrors ¶
func (ent *FareProduct) ConditionalErrors() (errs []error)
func (*FareProduct) DuplicateKey ¶ added in v1.0.0
func (ent *FareProduct) DuplicateKey() string
func (*FareProduct) EntityID ¶
func (ent *FareProduct) EntityID() string
func (*FareProduct) Filename ¶
func (ent *FareProduct) Filename() string
func (*FareProduct) GroupKey ¶ added in v1.0.0
func (ent *FareProduct) GroupKey() (string, string)
func (*FareProduct) TableName ¶
func (ent *FareProduct) TableName() string
type FareRule ¶
type FareRule struct { FareID tt.String `csv:",required" target:"fare_attributes.txt"` RouteID tt.Key `target:"routes.txt"` OriginID tt.String DestinationID tt.String ContainsID tt.String tt.BaseEntity }
FareRule fare_rules.txt
func (*FareRule) DuplicateKey ¶ added in v1.0.0
type FareTransferRule ¶
type FareTransferRule struct { FromLegGroupID tt.String `target:"fare_leg_rules.txt:leg_group_id"` ToLegGroupID tt.String `target:"fare_leg_rules.txt:leg_group_id"` TransferCount tt.Int `range:"-1,"` DurationLimit tt.Int `range:"0,"` DurationLimitType tt.Int `enum:"0,1,2,3"` FareTransferType tt.Int `csv:",required" enum:"0,1,2"` FareProductID tt.String `target:"fare_products.txt:fare_product_id"` FilterFareProductID tt.String `target:"fare_products.txt:fare_product_id"` // proposed extension tt.BaseEntity }
FareTransferRule fare_transfer_rules.txt
func (*FareTransferRule) ConditionalErrors ¶
func (ent *FareTransferRule) ConditionalErrors() (errs []error)
func (*FareTransferRule) DuplicateKey ¶ added in v1.0.0
func (ent *FareTransferRule) DuplicateKey() string
func (*FareTransferRule) Filename ¶
func (ent *FareTransferRule) Filename() string
func (*FareTransferRule) TableName ¶
func (ent *FareTransferRule) TableName() string
type FeedInfo ¶
type FeedInfo struct { FeedPublisherName tt.String `csv:",required"` FeedPublisherURL tt.Url `csv:",required"` FeedLang tt.Language `csv:",required"` FeedVersion tt.String `db:"feed_version_name"` FeedStartDate tt.Date FeedEndDate tt.Date DefaultLang tt.Language FeedContactEmail tt.Email FeedContactURL tt.Url tt.BaseEntity }
FeedInfo feed_info.txt
func (*FeedInfo) ConditionalErrors ¶
Errors for this Entity.
type Frequency ¶
type Frequency struct { TripID tt.String `csv:",required" target:"trips.txt"` HeadwaySecs tt.Int `csv:",required" range:"1,"` StartTime tt.Seconds `csv:",required"` EndTime tt.Seconds `csv:",required"` ExactTimes tt.Int `enum:"0,1"` tt.BaseEntity }
Frequency frequencies.txt
func (*Frequency) ConditionalErrors ¶
Errors for this Entity.
func (*Frequency) RepeatCount ¶
RepeatCount returns the number of times this trip will be repeated.
type Level ¶
type Level struct { LevelID tt.String `csv:",required"` LevelIndex tt.Float `csv:",required"` LevelName tt.String tt.BaseEntity }
Level levels.txt
type Pathway ¶
type Pathway struct { PathwayID tt.String `csv:",required"` FromStopID tt.String `csv:",required" target:"stops.txt"` ToStopID tt.String `csv:",required" target:"stops.txt"` PathwayMode tt.Int `csv:",required"` IsBidirectional tt.Int `csv:",required"` Length tt.Float TraversalTime tt.Int StairCount tt.Int MaxSlope tt.Float MinWidth tt.Float SignpostedAs tt.String ReverseSignpostedAs tt.String tt.BaseEntity }
Pathway pathways.txt
type Reader ¶ added in v1.0.0
type Reader interface { Stops() chan Stop StopTimes() chan StopTime Agencies() chan Agency Calendars() chan Calendar CalendarDates() chan CalendarDate FareAttributes() chan FareAttribute FareRules() chan FareRule FeedInfos() chan FeedInfo Frequencies() chan Frequency Routes() chan Route Shapes() chan Shape Transfers() chan Transfer Pathways() chan Pathway Levels() chan Level Trips() chan Trip Translations() chan Translation Attributions() chan Attribution Areas() chan Area StopAreas() chan StopArea FareLegRules() chan FareLegRule FareTransferRules() chan FareTransferRule FareProducts() chan FareProduct RiderCategories() chan RiderCategory FareMedia() chan FareMedia Timeframes() chan Timeframe Networks() chan Network RouteNetworks() chan RouteNetwork }
type RiderCategory ¶
type RiderCategory struct { RiderCategoryID tt.String `csv:",required"` RiderCategoryName tt.String `csv:",required"` MinAge tt.Int `range:"0,"` MaxAge tt.Int `range:"0,"` EligibilityURL tt.Url tt.BaseEntity }
RiderCategory rider_categories.txt
func (*RiderCategory) ConditionalErrors ¶
func (ent *RiderCategory) ConditionalErrors() (errs []error)
func (*RiderCategory) Filename ¶
func (ent *RiderCategory) Filename() string
func (*RiderCategory) GroupKey ¶ added in v1.0.0
func (ent *RiderCategory) GroupKey() (string, string)
func (*RiderCategory) TableName ¶
func (ent *RiderCategory) TableName() string
type Route ¶
type Route struct { RouteID tt.String `csv:",required"` AgencyID tt.Key `target:"agency.txt"` RouteShortName tt.String RouteLongName tt.String RouteDesc tt.String RouteType tt.Int `csv:",required"` RouteURL tt.Url RouteColor tt.Color RouteTextColor tt.Color RouteSortOrder tt.Int `range:"0,"` ContinuousPickup tt.Int `enum:"0,1,2,3"` ContinuousDropOff tt.Int `enum:"0,1,2,3"` NetworkID tt.String AsRoute tt.Int Geometry tt.Geometry `csv:"-" db:"-"` tt.BaseEntity }
Route routes.txt
func (*Route) ConditionalErrors ¶
type RouteNetwork ¶ added in v1.0.0
type RouteNetwork struct { NetworkID tt.Key `target:"networks.txt"` RouteID tt.Key `target:"routes.txt"` tt.BaseEntity }
func (*RouteNetwork) DuplicateKey ¶ added in v1.0.0
func (ent *RouteNetwork) DuplicateKey() string
func (*RouteNetwork) Filename ¶ added in v1.0.0
func (ent *RouteNetwork) Filename() string
func (*RouteNetwork) TableName ¶ added in v1.0.0
func (ent *RouteNetwork) TableName() string
type Shape ¶
type Shape struct { ShapeID tt.String `csv:",required"` ShapePtLat tt.Float `db:"-" csv:",required" range:"-90,90"` ShapePtLon tt.Float `db:"-" csv:",required" range:"-180,180"` ShapePtSequence tt.Int `db:"-" csv:",required" range:"0,"` ShapeDistTraveled tt.Float `db:"-" range:"0,"` tt.BaseEntity }
Shape shapes.txt
type Stop ¶
type Stop struct { StopID tt.String `csv:",required" required:"true"` StopName tt.String StopCode tt.String StopDesc tt.String StopLat tt.Float `db:"-" range:"-90,90"` // csv load to Geometry StopLon tt.Float `db:"-" range:"-180,180"` ZoneID tt.String StopURL tt.Url TtsStopName tt.String PlatformCode tt.String LocationType tt.Int `enum:"0,1,2,3,4"` ParentStation tt.Key `target:"stops.txt"` StopTimezone tt.Timezone WheelchairBoarding tt.Int `enum:"0,1,2"` LevelID tt.Key `target:"levels.txt"` Geometry tt.Point `csv:"-" db:"geometry"` tt.BaseEntity }
Stop stops.txt
func (*Stop) ConditionalErrors ¶
func (*Stop) Coordinates ¶
Coordinates returns the stop lon,lat as a [2]float64
func (*Stop) SetCoordinates ¶
SetCoordinates takes a [2]float64 and sets the Stop's lon,lat
type StopArea ¶
type StopArea struct { AreaID tt.Key `csv:",required" target:"areas.txt"` StopID tt.Key `csv:",required" target:"stops.txt"` tt.BaseEntity }
StopArea stop_areas.txt
type StopTime ¶
type StopTime struct { TripID tt.String `csv:",required" target:"trips.txt"` StopID tt.String `csv:",required" target:"stops.txt"` StopSequence tt.Int `csv:",required"` StopHeadsign tt.String ArrivalTime tt.Seconds DepartureTime tt.Seconds PickupType tt.Int DropOffType tt.Int ContinuousPickup tt.Int ContinuousDropOff tt.Int ShapeDistTraveled tt.Float Timepoint tt.Int Interpolated tt.Int `csv:"-"` // interpolated times: 0 for provided, 1 interpolated // TODO: 1 for shape, 2 for straight-line tt.MinEntity tt.ErrorEntity tt.ExtraEntity tt.FeedVersionEntity }
StopTime stop_times.txt
type Timeframe ¶ added in v1.0.0
type Transfer ¶
type Transfer struct { FromStopID tt.Key `target:"stops.txt"` ToStopID tt.Key `target:"stops.txt"` FromRouteID tt.Key `target:"routes.txt"` ToRouteID tt.Key `target:"routes.txt"` FromTripID tt.Key `target:"trips.txt"` ToTripID tt.Key `target:"trips.txt"` TransferType tt.Int `enum:"0,1,2,3,4,5"` MinTransferTime tt.Int `range:"0,"` tt.BaseEntity }
Transfer transfers.txt
func (*Transfer) ConditionalErrors ¶
Errors for this Entity.
type Translation ¶
type Translation struct { // "TableNameValue" because TableName is a required interface method TableNameValue tt.String `db:"table_name" csv:"table_name,required"` FieldName tt.String `csv:",required"` Language tt.Language `csv:",required"` Translation tt.String `csv:",required"` RecordID tt.String RecordSubID tt.String FieldValue tt.String tt.BaseEntity }
func (*Translation) ConditionalErrors ¶
func (ent *Translation) ConditionalErrors() (errs []error)
Errors for this Entity.
func (*Translation) Filename ¶
func (ent *Translation) Filename() string
func (*Translation) TableName ¶
func (ent *Translation) TableName() string
type Trip ¶
type Trip struct { RouteID tt.Key `csv:",required" target:"routes.txt"` ServiceID tt.Key `csv:",required" target:"calendar.txt"` TripID tt.String `csv:",required"` TripHeadsign tt.String TripShortName tt.String DirectionID tt.Int `enum:"0,1"` BlockID tt.String ShapeID tt.Key `target:"shapes.txt"` WheelchairAccessible tt.Int `enum:"0,1,2"` BikesAllowed tt.Int `enum:"0,1,2"` JourneyPatternID tt.String `csv:"-"` JourneyPatternOffset tt.Int `csv:"-"` StopPatternID tt.Int `csv:"-"` StopTimes []StopTime `csv:"-" db:"-"` // for validation tt.BaseEntity }
Trip trips.txt
Source Files
¶
- agency.go
- area.go
- attribution.go
- calendar.go
- calendar_date.go
- fare_attribute.go
- fare_leg_rule.go
- fare_media.go
- fare_product.go
- fare_rule.go
- fare_transfer_rule.go
- feed_info.go
- frequency.go
- gtfs.go
- level.go
- network.go
- pathway.go
- rider_category.go
- route.go
- route_network.go
- shape.go
- stop.go
- stop_area.go
- stop_time.go
- timeframe.go
- transfer.go
- translation.go
- trip.go