Documentation
¶
Overview ¶
Done
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done ¶
Done
Index ¶
- type Agency
- type Attribution
- type AttributionIsAuthority
- type AttributionIsOperator
- type AttributionIsProducer
- type Calendar
- func (c *Calendar) ParseEndDate(value string) (err error)
- func (c *Calendar) ParseFriday(value string) (err error)
- func (c *Calendar) ParseMonday(value string) (err error)
- func (c *Calendar) ParseSaturday(value string) (err error)
- func (c *Calendar) ParseStartDate(value string) (err error)
- func (c *Calendar) ParseSunday(value string) (err error)
- func (c *Calendar) ParseThursday(value string) (err error)
- func (c *Calendar) ParseTuesday(value string) (err error)
- func (c *Calendar) ParseWednesday(value string) (err error)
- func (c Calendar) TableFileName() string
- type CalendarDate
- type CalendarDateException
- type CalendarService
- type FareAttribute
- type FareAttributePaymentMethod
- type FareAttributeTransfers
- type FareRule
- type FeedInfo
- type Frequency
- type FrequencyExactTimes
- type GTFSTime
- type Level
- type Modelable
- type Pathway
- type PathwayIsBidirectional
- type PathwayPathwayMode
- type Route
- type RouteContinuousDropOff
- type RouteContinuousPickup
- type RouteRouteType
- type Shape
- type Stop
- type StopLocationType
- type StopTime
- func (s *StopTime) ParseArrivalTime(value string) (err error)
- func (s *StopTime) ParseContinuousDropOff(value string) (err error)
- func (s *StopTime) ParseContinuousPickup(value string) (err error)
- func (s *StopTime) ParseDepartureTime(value string) (err error)
- func (s *StopTime) ParseDropOffType(value string) (err error)
- func (s *StopTime) ParsePickupType(value string) (err error)
- func (s *StopTime) ParseShapeDistTraveled(value string) (err error)
- func (s *StopTime) ParseTimepoint(value string) (err error)
- func (s StopTime) TableFileName() string
- type StopTimeContinuousDropOff
- type StopTimeContinuousPickup
- type StopTimeDropOffType
- type StopTimePickupType
- type StopTimeTimepoint
- type StopWheelchairBoarding
- type Transfer
- type TransferTransferType
- type Translation
- type Trip
- type TripBikesAllowed
- type TripDirectionID
- type TripWheelchairAccessible
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agency ¶
type Agency struct {
AgencyID string `csv:"agency_id"`
AgencyName string `csv:"agency_name"`
AgencyURL string `csv:"agency_url"`
AgencyTimezone string `csv:"agency_timezone"`
AgencyLang string `csv:"agency_lang"`
AgencyPhone string `csv:"agency_phone"`
AgencyFareURL string `csv:"agency_fare_url"`
AgencyEmail string `csv:"agency_email"`
}
func (Agency) TableFileName ¶
type Attribution ¶
type Attribution struct {
AttributionID string `csv:"attribution_id"`
AgencyID string `csv:"agency_id"`
RouteID string `csv:"route_id"`
TripID string `csv:"trip_id"`
OrganizationName string `csv:"organization_name"`
IsProducer AttributionIsProducer `csv:"is_producer,ParseIsProducer"`
IsOperator AttributionIsOperator `csv:"is_operator,ParseIsOperator"`
IsAuthority AttributionIsAuthority `csv:"is_authority,ParseIsAuthority"`
AttributionURL string `csv:"attribution_url"`
AttributionEmail string `csv:"attribution_email"`
AttributionPhone string `csv:"attribution_phone"`
}
func (*Attribution) ParseIsAuthority ¶
func (a *Attribution) ParseIsAuthority(value string) error
func (*Attribution) ParseIsOperator ¶
func (a *Attribution) ParseIsOperator(value string) error
func (*Attribution) ParseIsProducer ¶
func (a *Attribution) ParseIsProducer(value string) error
func (Attribution) TableFileName ¶
func (a Attribution) TableFileName() string
type AttributionIsAuthority ¶
type AttributionIsAuthority bool
const ( AttributionIsAuthorityNoRole AttributionIsAuthority = false AttributionIsAuthorityHasRole AttributionIsAuthority = true )
type AttributionIsOperator ¶
type AttributionIsOperator bool
const ( AttributionIsOperatorNoRole AttributionIsOperator = false AttributionIsOperatorHasRole AttributionIsOperator = true )
type AttributionIsProducer ¶
type AttributionIsProducer bool
const ( AttributionIsProducerNoRole AttributionIsProducer = false AttributionIsProducerHasRole AttributionIsProducer = true )
type Calendar ¶
type Calendar struct {
ServiceID string `csv:"service_id"`
Monday CalendarService `csv:"monday,ParseMonday"`
Tuesday CalendarService `csv:"tuesday,ParseTuesday"`
Wednesday CalendarService `csv:"wednesday,ParseWednesday"`
Thursday CalendarService `csv:"thursday,ParseThursday"`
Friday CalendarService `csv:"friday,ParseFriday"`
Saturday CalendarService `csv:"saturday,ParseSaturday"`
Sunday CalendarService `csv:"sunday,ParseSunday"`
StartDate time.Time `csv:"start_date,ParseStartDate"`
EndDate time.Time `csv:"end_date,ParseEndDate"`
}
func (*Calendar) ParseEndDate ¶
func (*Calendar) ParseFriday ¶
func (*Calendar) ParseMonday ¶
func (*Calendar) ParseSaturday ¶
func (*Calendar) ParseStartDate ¶
func (*Calendar) ParseSunday ¶
func (*Calendar) ParseThursday ¶
func (*Calendar) ParseTuesday ¶
func (*Calendar) ParseWednesday ¶
func (Calendar) TableFileName ¶
type CalendarDate ¶
type CalendarDate struct {
ServiceID string `csv:"service_id"`
Date time.Time `csv:"date,ParseDate"`
ExceptionType CalendarDateException `csv:"exception_type,ParseExceptionType"`
}
func (*CalendarDate) ParseDate ¶
func (c *CalendarDate) ParseDate(value string) (err error)
func (*CalendarDate) ParseExceptionType ¶
func (c *CalendarDate) ParseExceptionType(value string) error
func (CalendarDate) TableFileName ¶
func (c CalendarDate) TableFileName() string
type CalendarDateException ¶
type CalendarDateException byte
const ( CalendarDateExceptionAdded CalendarDateException = 1 CalendarDateExceptionRemoved CalendarDateException = 2 )
type CalendarService ¶
type CalendarService bool
const ( CalendarServiceNotAvailable CalendarService = false CalendarServiceAvailable CalendarService = true )
type FareAttribute ¶
type FareAttribute struct {
FareID string `csv:"fare_id"`
Price float64 `csv:"price"`
CurrencyType string `csv:"currency_type"`
PaymentMethod FareAttributePaymentMethod `csv:"payment_method,ParsePaymentMethod"`
Transfers FareAttributeTransfers `csv:"transfers,ParseTransfers"`
AgencyID string `csv:"agency_id"`
TransferDuration uint `csv:"transfer_duration"`
}
func (*FareAttribute) ParsePaymentMethod ¶
func (f *FareAttribute) ParsePaymentMethod(value string) error
func (*FareAttribute) ParseTransfers ¶
func (f *FareAttribute) ParseTransfers(value string) error
func (FareAttribute) TableFileName ¶
func (f FareAttribute) TableFileName() string
type FareAttributePaymentMethod ¶
type FareAttributePaymentMethod byte
const ( FareAttributePaymentMethodOnBoard FareAttributePaymentMethod = 0 FareAttributePaymentMethodBeforeBoard FareAttributePaymentMethod = 1 )
type FareAttributeTransfers ¶
type FareAttributeTransfers int8
const ( FareAttributeTransfersNoTransfers FareAttributeTransfers = 0 FareAttributeTransfersOneTransfer FareAttributeTransfers = 1 FareAttributeTransfersTwoTransfers FareAttributeTransfers = 2 FareAttributeTransfersUnlimitedTransfers FareAttributeTransfers = -1 // TODO: Maybe convert to `string` type )
type FareRule ¶
type FareRule struct {
FareID string `csv:"fare_id"`
RouteID string `csv:"route_id"`
OriginID string `csv:"origin_id"`
DestinationID string `csv:"destination_id"`
ContainsID string `csv:"contains_id"`
}
func (FareRule) TableFileName ¶
type FeedInfo ¶
type FeedInfo struct {
FeedPublisherName string `csv:"feed_publisher_name"`
FeedPublisherURL string `csv:"feed_publisher_url"`
FeedLang string `csv:"feed_lang"`
DefaultLang string `csv:"default_lang"`
FeedStartDate time.Time `csv:"feed_start_date,ParseFeedStartDate"`
FeedEndDate time.Time `csv:"feed_end_date,ParseFeedEndDate"`
FeedVersion string `csv:"feed_version"`
FeedContactEmail string `csv:"feed_contact_email"`
FeedContactURL string `csv:"feed_contact_url"`
}
func (*FeedInfo) ParseFeedEndDate ¶
func (*FeedInfo) ParseFeedStartDate ¶
func (FeedInfo) TableFileName ¶
type Frequency ¶
type Frequency struct {
TripID string `csv:"trip_id"`
StartTime GTFSTime `csv:"start_time,ParseStartTime"`
EndTime GTFSTime `csv:"end_time,ParseEndTime"`
HeadwaySecs uint `csv:"headway_secs"`
ExactTimes FrequencyExactTimes `csv:"exact_times,ParseExactTimes"`
}
func (*Frequency) ParseEndTime ¶
func (*Frequency) ParseExactTimes ¶
func (*Frequency) ParseStartTime ¶
func (Frequency) TableFileName ¶
type FrequencyExactTimes ¶
type FrequencyExactTimes byte
const ( FrequencyExactTimesFrequencyBased FrequencyExactTimes = 0 FrequencyExactTimesScheduleBased FrequencyExactTimes = 1 )
type GTFSTime ¶
type GTFSTime int
GTFSTime is number of seconds from midnight 00:00:53 = 53 09:15:33 = 33333 (9 * 3600 + 15 * 60 + 33)
func NewEmptyGTFSTime ¶
func NewEmptyGTFSTime() GTFSTime
func NewGTFSTime ¶
type Level ¶
type Level struct {
LevelID string `csv:"level_id"`
LevelIndex float64 `csv:"level_index"`
LevelName string `csv:"level_name"`
}
func (Level) TableFileName ¶
type Pathway ¶
type Pathway struct {
PathwayID string `csv:"pathway_id"`
FromStopID string `csv:"from_stop_id"`
ToStopID string `csv:"to_stop_id"`
PathwayMode PathwayPathwayMode `csv:"pathway_mode,ParsePathwayMode"`
IsBidirectional PathwayIsBidirectional `csv:"is_bidirectional,ParseIsBidirectional"`
Length float64 `csv:"length"`
TraversalTime uint `csv:"traversal_time"`
StairCount uint `csv:"stair_count"`
MaxSlope float64 `csv:"max_slope"`
MinWidth float64 `csv:"min_width"`
SignpostedAs string `csv:"signposted_as"`
ReversedSignpostedAs string `csv:"reversed_signposted_as"`
}
func (*Pathway) ParseIsBidirectional ¶
func (*Pathway) ParsePathwayMode ¶
func (Pathway) TableFileName ¶
type PathwayIsBidirectional ¶
type PathwayIsBidirectional bool
const ( PathwayIsBidirectionalNo PathwayIsBidirectional = false PathwayIsBidirectionalYes PathwayIsBidirectional = true )
type PathwayPathwayMode ¶
type PathwayPathwayMode byte
const ( PathwayPathwayModeWalkway PathwayPathwayMode = 1 PathwayPathwayModeStairs PathwayPathwayMode = 2 PathwayPathwayModeTravelator PathwayPathwayMode = 3 PathwayPathwayModeEscalator PathwayPathwayMode = 4 PathwayPathwayModeElevator PathwayPathwayMode = 5 PathwayPathwayModeFareGate PathwayPathwayMode = 6 PathwayPathwayModeExitGate PathwayPathwayMode = 7 )
type Route ¶
type Route struct {
RouteID string `csv:"route_id"`
AgencyID string `csv:"agency_id"`
RouteShortName string `csv:"route_short_name"`
RouteLongName string `csv:"route_long_name"`
RouteDesc string `csv:"route_desc"`
RouteType RouteRouteType `csv:"route_type"`
RouteURL string `csv:"route_url"`
RouteColor string `csv:"route_color"`
RouteTextColor string `csv:"route_text_color"`
RouteSortOrder uint `csv:"route_sort_order"`
ContinuousPickup RouteContinuousPickup `csv:"continuous_pickup,ParseContinuousPickup"`
ContinuousDropOff RouteContinuousDropOff `csv:"continuous_drop_off,ParseContinuousDropOff"`
}
func (*Route) ParseContinuousDropOff ¶
func (*Route) ParseContinuousPickup ¶
func (Route) TableFileName ¶
type RouteContinuousDropOff ¶
type RouteContinuousDropOff byte
const ( RouteContinuousDropOffContinuous RouteContinuousDropOff = 0 RouteContinuousDropOffNoContinuous RouteContinuousDropOff = 1 RouteContinuousDropOffPhone RouteContinuousDropOff = 2 RouteContinuousDropOffDriver RouteContinuousDropOff = 3 )
type RouteContinuousPickup ¶
type RouteContinuousPickup byte
const ( RouteContinuousPickupContinuous RouteContinuousPickup = 0 RouteContinuousPickupNoContinuous RouteContinuousPickup = 1 RouteContinuousPickupPhone RouteContinuousPickup = 2 RouteContinuousPickupDriver RouteContinuousPickup = 3 )
type RouteRouteType ¶
type RouteRouteType int
type Shape ¶
type Shape struct {
ShapeID string `csv:"shape_id"`
ShapePtLat float64 `csv:"shape_pt_lat"`
ShapePtLon float64 `csv:"shape_pt_lon"`
ShapePtSequence uint `csv:"shape_pt_sequence"`
ShapeDistTraveled float64 `csv:"shape_dist_traveled"`
}
func (Shape) TableFileName ¶
type Stop ¶
type Stop struct {
StopID string `csv:"stop_id"`
StopCode string `csv:"stop_code"`
StopName string `csv:"stop_name"`
StopDesc string `csv:"stop_desc"`
StopLat float64 `csv:"stop_lat"`
StopLon float64 `csv:"stop_lon"`
ZoneID string `csv:"zone_id"`
StopURL string `csv:"stop_url"`
LocationType StopLocationType `csv:"location_type,ParseLocationType"`
ParentStation string `csv:"parent_station"`
StopTimezone string `csv:"stop_timezone"`
WheelchairBoarding StopWheelchairBoarding `csv:"wheelchair_boarding,ParseWheelchairBoarding"`
LevelID string `csv:"level_id"`
PlatformCode string `csv:"platform_code"`
}
func (*Stop) ParseLocationType ¶
func (*Stop) ParseWheelchairBoarding ¶
func (Stop) TableFileName ¶
type StopLocationType ¶
type StopLocationType byte
const ( StopLocationTypeStopOrPlatform StopLocationType = 0 StopLocationTypeStation StopLocationType = 1 StopLocationTypeEntranceExit StopLocationType = 2 StopLocationTypeGenericNone StopLocationType = 3 StopLocationTypeBoardingArea StopLocationType = 4 )
type StopTime ¶
type StopTime struct {
TripID string `csv:"trip_id"`
ArrivalTime GTFSTime `csv:"arrival_time,ParseArrivalTime"`
DepartureTime GTFSTime `csv:"departure_time,ParseDepartureTime"`
StopID string `csv:"stop_id"`
StopSequence uint `csv:"stop_sequence"`
StopHeadsign string `csv:"stop_headsign"`
PickupType StopTimePickupType `csv:"pickup_type,ParsePickupType"`
DropOffType StopTimeDropOffType `csv:"drop_off_type,ParseDropOffType"`
ContinuousPickup StopTimeContinuousPickup `csv:"continuous_pickup,ParseContinuousPickup"`
ContinuousDropOff StopTimeContinuousDropOff `csv:"continuous_drop_off,ParseContinuousDropOff"`
ShapeDistTraveled float64 `csv:"shape_dist_traveled,ParseShapeDistTraveled"`
Timepoint StopTimeTimepoint `csv:"timepoint,ParseTimepoint"`
}
func (*StopTime) ParseArrivalTime ¶
func (*StopTime) ParseContinuousDropOff ¶
func (*StopTime) ParseContinuousPickup ¶
func (*StopTime) ParseDepartureTime ¶
func (*StopTime) ParseDropOffType ¶
func (*StopTime) ParsePickupType ¶
func (*StopTime) ParseShapeDistTraveled ¶ added in v0.1.1
func (*StopTime) ParseTimepoint ¶
func (StopTime) TableFileName ¶
type StopTimeContinuousDropOff ¶
type StopTimeContinuousDropOff byte
const ( StopTimeContinuousDropOffContinuous StopTimeContinuousDropOff = 0 StopTimeContinuousDropOffNoContinuous StopTimeContinuousDropOff = 1 StopTimeContinuousDropOffPhone StopTimeContinuousDropOff = 2 StopTimeContinuousDropOffDriver StopTimeContinuousDropOff = 3 )
type StopTimeContinuousPickup ¶
type StopTimeContinuousPickup byte
const ( StopTimeContinuousPickupContinuous StopTimeContinuousPickup = 0 StopTimeContinuousPickupNoContinuous StopTimeContinuousPickup = 1 StopTimeContinuousPickupPhone StopTimeContinuousPickup = 2 StopTimeContinuousPickupDriver StopTimeContinuousPickup = 3 )
type StopTimeDropOffType ¶
type StopTimeDropOffType byte
const ( StopTimeDropOffTypeScheduled StopTimeDropOffType = 0 StopTimeDropOffTypeNoDropOff StopTimeDropOffType = 1 StopTimeDropOffTypeMustPhone StopTimeDropOffType = 2 StopTimeDropOffTypeDriver StopTimeDropOffType = 3 )
type StopTimePickupType ¶
type StopTimePickupType byte
const ( StopTimePickupTypeScheduled StopTimePickupType = 0 StopTimePickupTypeNoPickup StopTimePickupType = 1 StopTimePickupTypeMustPhone StopTimePickupType = 2 StopTimePickupTypeDriver StopTimePickupType = 3 )
type StopTimeTimepoint ¶
type StopTimeTimepoint byte
const ( StopTimeTimepointApproximate StopTimeTimepoint = 0 StopTimeTimepointExact StopTimeTimepoint = 1 )
type StopWheelchairBoarding ¶
type StopWheelchairBoarding byte
const ( StopWheelchairBoardingInherit StopWheelchairBoarding = 0 StopWheelchairBoardingAllowed StopWheelchairBoarding = 1 StopWheelchairBoardingNotAllowed StopWheelchairBoarding = 2 )
type Transfer ¶
type Transfer struct {
FromStopID string `csv:"from_stop_id"`
ToStopID string `csv:"to_stop_id"`
TransferType TransferTransferType `csv:"transfer_type,ParseTransferType"`
MinTransferTime uint `csv:"min_transfer_time"`
FromRouteID string `csv:"from_route_id"`
ToRouteID string `csv:"to_route_id"`
FromTripID string `csv:"from_trip_id"`
ToTripID string `csv:"to_trip_id"`
}
func (*Transfer) ParseTransferType ¶
func (Transfer) TableFileName ¶
type TransferTransferType ¶
type TransferTransferType byte
const ( TransferTransferTypeRecommended TransferTransferType = 0 TransferTransferTypeTimed TransferTransferType = 1 TransferTransferTypeRequiredMinimum TransferTransferType = 2 TransferTransferTypeNotPossible TransferTransferType = 3 )
type Translation ¶
type Translation struct {
TableName string `csv:"table_name"`
FieldName string `csv:"field_name"`
Language string `csv:"language"`
Translation string `csv:"translation"`
RecordID string `csv:"record_id"`
RecordSubID string `csv:"record_sub_id"`
FieldValue string `csv:"field_value"`
}
func (Translation) TableFileName ¶
func (t Translation) TableFileName() string
type Trip ¶
type Trip struct {
RouteID string `csv:"route_id"`
ServiceID string `csv:"service_id"`
TripID string `csv:"trip_id"`
TripHeadsign string `csv:"trip_headsign"`
TripShortName string `csv:"trip_short_name"`
DirectionID TripDirectionID `csv:"direction_id,ParseDirectionID"`
BlockID string `csv:"block_id"`
ShapeID string `csv:"shape_id"`
WheelchairAccessible TripWheelchairAccessible `csv:"wheelchair_accessible,ParseWheelchairAccessible"`
BikesAllowed TripBikesAllowed `csv:"bikes_allowed,ParseBikesAllowed"`
}
func (*Trip) ParseBikesAllowed ¶
func (*Trip) ParseDirectionID ¶
func (*Trip) ParseWheelchairAccessible ¶
func (Trip) TableFileName ¶
type TripBikesAllowed ¶
type TripBikesAllowed byte
const ( TripBikesAllowedNoInformation TripBikesAllowed = 0 TripBikesAllowedYes TripBikesAllowed = 1 TripBikesAllowedNo TripBikesAllowed = 2 )
type TripDirectionID ¶
type TripDirectionID byte
const ( TripDirectionIDOutbound TripDirectionID = 0 TripDirectionIDInbound TripDirectionID = 1 )
type TripWheelchairAccessible ¶
type TripWheelchairAccessible byte
const ( TripWheelchairAccessibleNoInformation TripWheelchairAccessible = 0 TripWheelchairAccessibleYes TripWheelchairAccessible = 1 TripWheelchairAccessibleNo TripWheelchairAccessible = 2 )
Click to show internal directories.
Click to hide internal directories.