Documentation
¶
Index ¶
- Constants
- func IsLocationTypeValid(locationType *string) bool
- func StringIsNilOrEmpty(id *string) bool
- type Agency
- type AgencyIdRecommendedForRouteNotice
- type AgencyIdRequiredForRouteWhenMultipleAgenciesNotice
- type CalendarDate
- type CalendarItem
- type CsvEntity
- type FareAttributes
- type FareRule
- type FieldIsNotUniqueNotice
- type FieldRequiredForStopLocationTypeNotice
- type FieldType
- type ForeignKeyViolationNotice
- type Frequency
- type GtfsCsvReader
- type GtfsEntity
- type InvalidBikesAllowedNotice
- type InvalidCalendarDayNotice
- type InvalidCalendarExceptionNotice
- type InvalidCharacterNotice
- type InvalidColorNotice
- type InvalidContinuousDropOffNotice
- type InvalidContinuousPickupNotice
- type InvalidCurrencyAmountNotice
- type InvalidCurrencyCodeNotice
- type InvalidDateNotice
- type InvalidDirectionIdNotice
- type InvalidDropOffTypeNotice
- type InvalidEmailNotice
- type InvalidFloatNotice
- type InvalidIntegerNotice
- type InvalidLanguageCodeNotice
- type InvalidLatitudeNotice
- type InvalidLocationTypeNotice
- type InvalidLongitudeNotice
- type InvalidPhoneNumberNotice
- type InvalidPickupTypeNotice
- type InvalidRouteTypeNotice
- type InvalidTimeNotice
- type InvalidTimepointNotice
- type InvalidTimezoneNotice
- type InvalidURLNotice
- type InvalidWheelchairAccessibleNotice
- type InvalidWheelchairBoardingValueNotice
- type Level
- type MissingRequiredFieldNotice
- type MissingRouteLongNameWhenShortNameIsNotPresentNotice
- type MissingRouteShortNameWhenLongNameIsNotPresentNotice
- type Pathway
- type Route
- type RouteDescriptionDuplicatesNameNotice
- type Shape
- type SingleAgencyRecommendedNotice
- type SingleLineNotice
- type Stop
- type StopExtensions
- type StopTime
- type TooFewShapePointsNotice
- type TooLongRouteShortNameNotice
- type Transfer
- type Trip
- type ValidAgencyIdRequiredWhenMultipleAgenciesNotice
- type ValidationNotice
- func ValidateAgencies(agencies []*Agency) []ValidationNotice
- func ValidateAgency(a Agency) []ValidationNotice
- func ValidateCalendarDate(cd CalendarDate) []ValidationNotice
- func ValidateCalendarDates(calendarDates []*CalendarDate, calendarItems []*CalendarItem) []ValidationNotice
- func ValidateCalendarItem(c CalendarItem) []ValidationNotice
- func ValidateCalendarItems(calendarItems []*CalendarItem) []ValidationNotice
- func ValidateRoute(r Route) []ValidationNotice
- func ValidateRoutes(routes []*Route, agencies []*Agency) []ValidationNotice
- func ValidateShape(s Shape) []ValidationNotice
- func ValidateShapes(shapes []*Shape) []ValidationNotice
- func ValidateStop(s Stop) []ValidationNotice
- func ValidateStopTime(st StopTime) []ValidationNotice
- func ValidateStopTimes(stopTimes []*StopTime, stops []*Stop) []ValidationNotice
- func ValidateStops(stops []*Stop) []ValidationNotice
- func ValidateTrip(t Trip) []ValidationNotice
- func ValidateTrips(trips []*Trip, routes []*Route, calendarItems []*CalendarItem, shapes []*Shape) []ValidationNotice
- type ValidationNoticeSeverity
Constants ¶
View Source
const ( FileNameAgency = "agency.txt" FileNameCalendar = "calendar.txt" FileNameCalendarDate = "calendar_dates.txt" FileNameRoutes = "routes.txt" FileNameShapes = "shapes.txt" FileNameStops = "stops.txt" FileNameStopTimes = "stop_times.txt" FileNameTrips = "trips.txt" )
Variables ¶
This section is empty.
Functions ¶
func IsLocationTypeValid ¶
func StringIsNilOrEmpty ¶
Types ¶
type Agency ¶
type Agency struct { Id *string // agency_id (conditionally required) Name *string // agency_name (required) URL *string // agency_url (required) Timezone *string // agency_timezone (required) Lang *string // agency_lang (optional) Phone *string // agency_phone (optional) FareURL *string // agency_fare_url (optional) Email *string // agency_email (optional) LineNumber int }
func LoadAgencies ¶
func LoadAgencies(reader *GtfsCsvReader) ([]*Agency, []error)
type AgencyIdRecommendedForRouteNotice ¶
type AgencyIdRecommendedForRouteNotice struct {
SingleLineNotice
}
func (AgencyIdRecommendedForRouteNotice) AsText ¶
func (n AgencyIdRecommendedForRouteNotice) AsText() string
func (AgencyIdRecommendedForRouteNotice) Code ¶
func (n AgencyIdRecommendedForRouteNotice) Code() string
func (AgencyIdRecommendedForRouteNotice) Severity ¶
func (n AgencyIdRecommendedForRouteNotice) Severity() ValidationNoticeSeverity
type AgencyIdRequiredForRouteWhenMultipleAgenciesNotice ¶
type AgencyIdRequiredForRouteWhenMultipleAgenciesNotice struct {
SingleLineNotice
}
func (AgencyIdRequiredForRouteWhenMultipleAgenciesNotice) AsText ¶
func (n AgencyIdRequiredForRouteWhenMultipleAgenciesNotice) AsText() string
func (AgencyIdRequiredForRouteWhenMultipleAgenciesNotice) Code ¶
func (n AgencyIdRequiredForRouteWhenMultipleAgenciesNotice) Code() string
func (AgencyIdRequiredForRouteWhenMultipleAgenciesNotice) Severity ¶
func (n AgencyIdRequiredForRouteWhenMultipleAgenciesNotice) Severity() ValidationNoticeSeverity
type CalendarDate ¶
type CalendarDate struct { ServiceId *string // service_id (required) Date *string // date (required) ExceptionType *string // exception_type (required) LineNumber int }
func CreateCalendarDate ¶
func CreateCalendarDate(row []string, headers map[string]int, lineNumber int) *CalendarDate
func LoadCalendarDates ¶
func LoadCalendarDates(reader *GtfsCsvReader) ([]*CalendarDate, []error)
type CalendarItem ¶
type CalendarItem struct { ServiceId *string // service_id (required) Monday *string // monday (required) Tuesday *string // tuesday (required) Wednesday *string // wednesday (required) Thursday *string // thursday (required) Friday *string // friday (required) Saturday *string // saturday (required) Sunday *string // sunday (required) StartDate *string // start_date (required) EndDate *string // end_date (required) LineNumber int }
func CreateCalendarItem ¶
func CreateCalendarItem(row []string, headers map[string]int, lineNumber int) *CalendarItem
func LoadCalendar ¶
func LoadCalendar(reader *GtfsCsvReader) ([]*CalendarItem, []error)
type FareAttributes ¶
type FieldIsNotUniqueNotice ¶
type FieldIsNotUniqueNotice struct {
SingleLineNotice
}
func (FieldIsNotUniqueNotice) AsText ¶
func (n FieldIsNotUniqueNotice) AsText() string
func (FieldIsNotUniqueNotice) Code ¶
func (n FieldIsNotUniqueNotice) Code() string
func (FieldIsNotUniqueNotice) Severity ¶
func (n FieldIsNotUniqueNotice) Severity() ValidationNoticeSeverity
type FieldRequiredForStopLocationTypeNotice ¶
type FieldRequiredForStopLocationTypeNotice struct { RequiredField string LocationType string FileName string Line int }
func (FieldRequiredForStopLocationTypeNotice) AsText ¶
func (n FieldRequiredForStopLocationTypeNotice) AsText() string
func (FieldRequiredForStopLocationTypeNotice) Code ¶
func (n FieldRequiredForStopLocationTypeNotice) Code() string
func (FieldRequiredForStopLocationTypeNotice) Severity ¶
func (n FieldRequiredForStopLocationTypeNotice) Severity() ValidationNoticeSeverity
type FieldType ¶
type FieldType string
const ( FieldTypeColor FieldType = "Color" FieldTypeCurrencyCode FieldType = "CurrencyCode" FieldTypeCurrencyAmount FieldType = "CurrencyAmount" FieldTypeDate FieldType = "Date" FieldTypeEmail FieldType = "Email" FieldTypeID FieldType = "ID" FieldTypeLanguageCode FieldType = "LanguageCode" FieldTypeLatitude FieldType = "Latitude" FieldTypeLongitude FieldType = "Longitude" FieldTypeFloat FieldType = "Float" FieldTypeInteger FieldType = "Integer" FieldTypePhoneNumber FieldType = "PhoneNumber" FieldTypeTime FieldType = "Time" FieldTypeText FieldType = "Text" FieldTypeTimezone FieldType = "Timezone" FieldTypeURL FieldType = "URL" FieldTypeCalendarDay FieldType = "CalendarDay" FieldTypeCalendarException FieldType = "CalendarException" FieldTypeRouteType FieldType = "RouteType" FieldTypeContinuousPickup FieldType = "ContinuousPickup" FieldTypeContinuousDropOff FieldType = "ContinuousDropOff" FieldTypeLocationType FieldType = "LocationType" FieldTypeWheelchairBoarding FieldType = "WheelchairBoarding" FieldTypePickupType FieldType = "PickupType" FieldTypeDropOffType FieldType = "DropOffType" FieldTypeTimepoint FieldType = "Timepoint" FieldTypeDirectionId FieldType = "DirectionId" FieldTypeWheelchairAccessible FieldType = "WheelchairAccessible" FieldTypeBikesAllowed FieldType = "BikesAllowed" )
type ForeignKeyViolationNotice ¶
type ForeignKeyViolationNotice struct { ReferencingFileName string ReferencingFieldName string ReferencedFieldName string ReferencedFileName string OffendingValue string ReferencedAtRow int }
func (ForeignKeyViolationNotice) AsText ¶
func (n ForeignKeyViolationNotice) AsText() string
func (ForeignKeyViolationNotice) Code ¶
func (n ForeignKeyViolationNotice) Code() string
func (ForeignKeyViolationNotice) Severity ¶
func (n ForeignKeyViolationNotice) Severity() ValidationNoticeSeverity
type GtfsCsvReader ¶
type GtfsCsvReader struct { FailOnHeaderErrors bool SkipRowsWithErrors bool // contains filtered or unexported fields }
func NewReader ¶
func NewReader(r *csv.Reader) *GtfsCsvReader
type GtfsEntity ¶
type GtfsEntity interface { *Shape | *Stop | *Agency | *CalendarItem | *CalendarDate | *Route | *StopTime | *Trip | any }
type InvalidBikesAllowedNotice ¶
type InvalidBikesAllowedNotice struct {
SingleLineNotice
}
func (InvalidBikesAllowedNotice) AsText ¶
func (n InvalidBikesAllowedNotice) AsText() string
func (InvalidBikesAllowedNotice) Code ¶
func (n InvalidBikesAllowedNotice) Code() string
func (InvalidBikesAllowedNotice) Severity ¶
func (n InvalidBikesAllowedNotice) Severity() ValidationNoticeSeverity
type InvalidCalendarDayNotice ¶
type InvalidCalendarDayNotice struct {
SingleLineNotice
}
func (InvalidCalendarDayNotice) AsText ¶
func (n InvalidCalendarDayNotice) AsText() string
func (InvalidCalendarDayNotice) Code ¶
func (n InvalidCalendarDayNotice) Code() string
func (InvalidCalendarDayNotice) Severity ¶
func (n InvalidCalendarDayNotice) Severity() ValidationNoticeSeverity
type InvalidCalendarExceptionNotice ¶
type InvalidCalendarExceptionNotice struct {
SingleLineNotice
}
func (InvalidCalendarExceptionNotice) AsText ¶
func (n InvalidCalendarExceptionNotice) AsText() string
func (InvalidCalendarExceptionNotice) Code ¶
func (n InvalidCalendarExceptionNotice) Code() string
func (InvalidCalendarExceptionNotice) Severity ¶
func (n InvalidCalendarExceptionNotice) Severity() ValidationNoticeSeverity
type InvalidCharacterNotice ¶
type InvalidCharacterNotice struct {
SingleLineNotice
}
func (InvalidCharacterNotice) AsText ¶
func (n InvalidCharacterNotice) AsText() string
func (InvalidCharacterNotice) Code ¶
func (n InvalidCharacterNotice) Code() string
func (InvalidCharacterNotice) Severity ¶
func (n InvalidCharacterNotice) Severity() ValidationNoticeSeverity
type InvalidColorNotice ¶
type InvalidColorNotice struct {
SingleLineNotice
}
func (InvalidColorNotice) AsText ¶
func (n InvalidColorNotice) AsText() string
func (InvalidColorNotice) Code ¶
func (n InvalidColorNotice) Code() string
func (InvalidColorNotice) Severity ¶
func (n InvalidColorNotice) Severity() ValidationNoticeSeverity
type InvalidContinuousDropOffNotice ¶
type InvalidContinuousDropOffNotice struct {
SingleLineNotice
}
func (InvalidContinuousDropOffNotice) AsText ¶
func (n InvalidContinuousDropOffNotice) AsText() string
func (InvalidContinuousDropOffNotice) Code ¶
func (n InvalidContinuousDropOffNotice) Code() string
func (InvalidContinuousDropOffNotice) Severity ¶
func (n InvalidContinuousDropOffNotice) Severity() ValidationNoticeSeverity
type InvalidContinuousPickupNotice ¶
type InvalidContinuousPickupNotice struct {
SingleLineNotice
}
func (InvalidContinuousPickupNotice) AsText ¶
func (n InvalidContinuousPickupNotice) AsText() string
func (InvalidContinuousPickupNotice) Code ¶
func (n InvalidContinuousPickupNotice) Code() string
func (InvalidContinuousPickupNotice) Severity ¶
func (n InvalidContinuousPickupNotice) Severity() ValidationNoticeSeverity
type InvalidCurrencyAmountNotice ¶
type InvalidCurrencyAmountNotice struct {
SingleLineNotice
}
func (InvalidCurrencyAmountNotice) AsText ¶
func (n InvalidCurrencyAmountNotice) AsText() string
func (InvalidCurrencyAmountNotice) Code ¶
func (n InvalidCurrencyAmountNotice) Code() string
func (InvalidCurrencyAmountNotice) Severity ¶
func (n InvalidCurrencyAmountNotice) Severity() ValidationNoticeSeverity
type InvalidCurrencyCodeNotice ¶
type InvalidCurrencyCodeNotice struct {
SingleLineNotice
}
func (InvalidCurrencyCodeNotice) AsText ¶
func (n InvalidCurrencyCodeNotice) AsText() string
func (InvalidCurrencyCodeNotice) Code ¶
func (n InvalidCurrencyCodeNotice) Code() string
func (InvalidCurrencyCodeNotice) Severity ¶
func (n InvalidCurrencyCodeNotice) Severity() ValidationNoticeSeverity
type InvalidDateNotice ¶
type InvalidDateNotice struct {
SingleLineNotice
}
func (InvalidDateNotice) AsText ¶
func (n InvalidDateNotice) AsText() string
func (InvalidDateNotice) Code ¶
func (n InvalidDateNotice) Code() string
func (InvalidDateNotice) Severity ¶
func (n InvalidDateNotice) Severity() ValidationNoticeSeverity
type InvalidDirectionIdNotice ¶
type InvalidDirectionIdNotice struct {
SingleLineNotice
}
func (InvalidDirectionIdNotice) AsText ¶
func (n InvalidDirectionIdNotice) AsText() string
func (InvalidDirectionIdNotice) Code ¶
func (n InvalidDirectionIdNotice) Code() string
func (InvalidDirectionIdNotice) Severity ¶
func (n InvalidDirectionIdNotice) Severity() ValidationNoticeSeverity
type InvalidDropOffTypeNotice ¶
type InvalidDropOffTypeNotice struct {
SingleLineNotice
}
func (InvalidDropOffTypeNotice) AsText ¶
func (n InvalidDropOffTypeNotice) AsText() string
func (InvalidDropOffTypeNotice) Code ¶
func (n InvalidDropOffTypeNotice) Code() string
func (InvalidDropOffTypeNotice) Severity ¶
func (n InvalidDropOffTypeNotice) Severity() ValidationNoticeSeverity
type InvalidEmailNotice ¶
type InvalidEmailNotice struct {
SingleLineNotice
}
func (InvalidEmailNotice) AsText ¶
func (n InvalidEmailNotice) AsText() string
func (InvalidEmailNotice) Code ¶
func (n InvalidEmailNotice) Code() string
func (InvalidEmailNotice) Severity ¶
func (n InvalidEmailNotice) Severity() ValidationNoticeSeverity
type InvalidFloatNotice ¶
type InvalidFloatNotice struct {
SingleLineNotice
}
func (InvalidFloatNotice) AsText ¶
func (n InvalidFloatNotice) AsText() string
func (InvalidFloatNotice) Code ¶
func (n InvalidFloatNotice) Code() string
func (InvalidFloatNotice) Severity ¶
func (n InvalidFloatNotice) Severity() ValidationNoticeSeverity
type InvalidIntegerNotice ¶
type InvalidIntegerNotice struct {
SingleLineNotice
}
func (InvalidIntegerNotice) AsText ¶
func (n InvalidIntegerNotice) AsText() string
func (InvalidIntegerNotice) Code ¶
func (n InvalidIntegerNotice) Code() string
func (InvalidIntegerNotice) Severity ¶
func (n InvalidIntegerNotice) Severity() ValidationNoticeSeverity
type InvalidLanguageCodeNotice ¶
type InvalidLanguageCodeNotice struct {
SingleLineNotice
}
func (InvalidLanguageCodeNotice) AsText ¶
func (n InvalidLanguageCodeNotice) AsText() string
func (InvalidLanguageCodeNotice) Code ¶
func (n InvalidLanguageCodeNotice) Code() string
func (InvalidLanguageCodeNotice) Severity ¶
func (n InvalidLanguageCodeNotice) Severity() ValidationNoticeSeverity
type InvalidLatitudeNotice ¶
type InvalidLatitudeNotice struct {
SingleLineNotice
}
func (InvalidLatitudeNotice) AsText ¶
func (n InvalidLatitudeNotice) AsText() string
func (InvalidLatitudeNotice) Code ¶
func (n InvalidLatitudeNotice) Code() string
func (InvalidLatitudeNotice) Severity ¶
func (n InvalidLatitudeNotice) Severity() ValidationNoticeSeverity
type InvalidLocationTypeNotice ¶
type InvalidLocationTypeNotice struct {
SingleLineNotice
}
func (InvalidLocationTypeNotice) AsText ¶
func (n InvalidLocationTypeNotice) AsText() string
func (InvalidLocationTypeNotice) Code ¶
func (n InvalidLocationTypeNotice) Code() string
func (InvalidLocationTypeNotice) Severity ¶
func (n InvalidLocationTypeNotice) Severity() ValidationNoticeSeverity
type InvalidLongitudeNotice ¶
type InvalidLongitudeNotice struct {
SingleLineNotice
}
func (InvalidLongitudeNotice) AsText ¶
func (n InvalidLongitudeNotice) AsText() string
func (InvalidLongitudeNotice) Code ¶
func (n InvalidLongitudeNotice) Code() string
func (InvalidLongitudeNotice) Severity ¶
func (n InvalidLongitudeNotice) Severity() ValidationNoticeSeverity
type InvalidPhoneNumberNotice ¶
type InvalidPhoneNumberNotice struct {
SingleLineNotice
}
func (InvalidPhoneNumberNotice) AsText ¶
func (n InvalidPhoneNumberNotice) AsText() string
func (InvalidPhoneNumberNotice) Code ¶
func (n InvalidPhoneNumberNotice) Code() string
func (InvalidPhoneNumberNotice) Severity ¶
func (n InvalidPhoneNumberNotice) Severity() ValidationNoticeSeverity
type InvalidPickupTypeNotice ¶
type InvalidPickupTypeNotice struct {
SingleLineNotice
}
func (InvalidPickupTypeNotice) AsText ¶
func (n InvalidPickupTypeNotice) AsText() string
func (InvalidPickupTypeNotice) Code ¶
func (n InvalidPickupTypeNotice) Code() string
func (InvalidPickupTypeNotice) Severity ¶
func (n InvalidPickupTypeNotice) Severity() ValidationNoticeSeverity
type InvalidRouteTypeNotice ¶
type InvalidRouteTypeNotice struct {
SingleLineNotice
}
func (InvalidRouteTypeNotice) AsText ¶
func (n InvalidRouteTypeNotice) AsText() string
func (InvalidRouteTypeNotice) Code ¶
func (n InvalidRouteTypeNotice) Code() string
func (InvalidRouteTypeNotice) Severity ¶
func (n InvalidRouteTypeNotice) Severity() ValidationNoticeSeverity
type InvalidTimeNotice ¶
type InvalidTimeNotice struct {
SingleLineNotice
}
func (InvalidTimeNotice) AsText ¶
func (n InvalidTimeNotice) AsText() string
func (InvalidTimeNotice) Code ¶
func (n InvalidTimeNotice) Code() string
func (InvalidTimeNotice) Severity ¶
func (n InvalidTimeNotice) Severity() ValidationNoticeSeverity
type InvalidTimepointNotice ¶
type InvalidTimepointNotice struct {
SingleLineNotice
}
func (InvalidTimepointNotice) AsText ¶
func (n InvalidTimepointNotice) AsText() string
func (InvalidTimepointNotice) Code ¶
func (n InvalidTimepointNotice) Code() string
func (InvalidTimepointNotice) Severity ¶
func (n InvalidTimepointNotice) Severity() ValidationNoticeSeverity
type InvalidTimezoneNotice ¶
type InvalidTimezoneNotice struct {
SingleLineNotice
}
func (InvalidTimezoneNotice) AsText ¶
func (n InvalidTimezoneNotice) AsText() string
func (InvalidTimezoneNotice) Code ¶
func (n InvalidTimezoneNotice) Code() string
func (InvalidTimezoneNotice) Severity ¶
func (n InvalidTimezoneNotice) Severity() ValidationNoticeSeverity
type InvalidURLNotice ¶
type InvalidURLNotice struct {
SingleLineNotice
}
func (InvalidURLNotice) AsText ¶
func (n InvalidURLNotice) AsText() string
func (InvalidURLNotice) Code ¶
func (n InvalidURLNotice) Code() string
func (InvalidURLNotice) Severity ¶
func (n InvalidURLNotice) Severity() ValidationNoticeSeverity
type InvalidWheelchairAccessibleNotice ¶
type InvalidWheelchairAccessibleNotice struct {
SingleLineNotice
}
func (InvalidWheelchairAccessibleNotice) AsText ¶
func (n InvalidWheelchairAccessibleNotice) AsText() string
func (InvalidWheelchairAccessibleNotice) Code ¶
func (n InvalidWheelchairAccessibleNotice) Code() string
func (InvalidWheelchairAccessibleNotice) Severity ¶
func (n InvalidWheelchairAccessibleNotice) Severity() ValidationNoticeSeverity
type InvalidWheelchairBoardingValueNotice ¶
type InvalidWheelchairBoardingValueNotice struct {
SingleLineNotice
}
func (InvalidWheelchairBoardingValueNotice) AsText ¶
func (n InvalidWheelchairBoardingValueNotice) AsText() string
func (InvalidWheelchairBoardingValueNotice) Code ¶
func (n InvalidWheelchairBoardingValueNotice) Code() string
func (InvalidWheelchairBoardingValueNotice) Severity ¶
func (n InvalidWheelchairBoardingValueNotice) Severity() ValidationNoticeSeverity
type MissingRequiredFieldNotice ¶
type MissingRequiredFieldNotice struct {
SingleLineNotice
}
func (MissingRequiredFieldNotice) AsText ¶
func (n MissingRequiredFieldNotice) AsText() string
func (MissingRequiredFieldNotice) Code ¶
func (n MissingRequiredFieldNotice) Code() string
func (MissingRequiredFieldNotice) Severity ¶
func (n MissingRequiredFieldNotice) Severity() ValidationNoticeSeverity
type MissingRouteLongNameWhenShortNameIsNotPresentNotice ¶
type MissingRouteLongNameWhenShortNameIsNotPresentNotice struct {
SingleLineNotice
}
func (MissingRouteLongNameWhenShortNameIsNotPresentNotice) AsText ¶
func (n MissingRouteLongNameWhenShortNameIsNotPresentNotice) AsText() string
func (MissingRouteLongNameWhenShortNameIsNotPresentNotice) Code ¶
func (n MissingRouteLongNameWhenShortNameIsNotPresentNotice) Code() string
func (MissingRouteLongNameWhenShortNameIsNotPresentNotice) Severity ¶
func (n MissingRouteLongNameWhenShortNameIsNotPresentNotice) Severity() ValidationNoticeSeverity
type MissingRouteShortNameWhenLongNameIsNotPresentNotice ¶
type MissingRouteShortNameWhenLongNameIsNotPresentNotice struct {
SingleLineNotice
}
func (MissingRouteShortNameWhenLongNameIsNotPresentNotice) AsText ¶
func (n MissingRouteShortNameWhenLongNameIsNotPresentNotice) AsText() string
func (MissingRouteShortNameWhenLongNameIsNotPresentNotice) Code ¶
func (n MissingRouteShortNameWhenLongNameIsNotPresentNotice) Code() string
func (MissingRouteShortNameWhenLongNameIsNotPresentNotice) Severity ¶
func (n MissingRouteShortNameWhenLongNameIsNotPresentNotice) Severity() ValidationNoticeSeverity
type Route ¶
type Route struct { Id *string // route_id (required, unique) AgencyId *string // agency_id (conditionally required) ShortName *string // route_short_name (conditionally required) LongName *string // route_long_name (conditionally required) Desc *string // route_desc (optional) Type *string // route_type (required) URL *string // route_url (optional) Color *string // route_color (optional) TextColor *string // route_text_color (optional) SortOrder *string // route_sort_order (optional) ContinuousPickup *string // continuous_pickup (conditionally forbidden) ContinuousDropOff *string // continuous_drop_off (conditionally forbidden) NetworkId *string // network_id (conditionally forbidden) LineNumber int }
func LoadRoutes ¶
func LoadRoutes(reader *GtfsCsvReader) ([]*Route, []error)
type RouteDescriptionDuplicatesNameNotice ¶
type RouteDescriptionDuplicatesNameNotice struct { SingleLineNotice DuplicatingField string }
func (RouteDescriptionDuplicatesNameNotice) AsText ¶
func (n RouteDescriptionDuplicatesNameNotice) AsText() string
func (RouteDescriptionDuplicatesNameNotice) Code ¶
func (n RouteDescriptionDuplicatesNameNotice) Code() string
func (RouteDescriptionDuplicatesNameNotice) Severity ¶
func (n RouteDescriptionDuplicatesNameNotice) Severity() ValidationNoticeSeverity
type Shape ¶
type Shape struct { Id *string // shape_id (required) PtLat *string // shape_pt_lat (required) PtLon *string // shape_pt_lon (required) PtSequence *string // shape_pt_sequence (required) DistTraveled *string // shape_dist_traveled (optional) LineNumber int }
func LoadShapes ¶
func LoadShapes(reader *GtfsCsvReader) ([]*Shape, []error)
type SingleAgencyRecommendedNotice ¶
type SingleAgencyRecommendedNotice struct {
FileName string
}
func (SingleAgencyRecommendedNotice) AsText ¶
func (n SingleAgencyRecommendedNotice) AsText() string
func (SingleAgencyRecommendedNotice) Code ¶
func (n SingleAgencyRecommendedNotice) Code() string
func (SingleAgencyRecommendedNotice) Severity ¶
func (n SingleAgencyRecommendedNotice) Severity() ValidationNoticeSeverity
type SingleLineNotice ¶
type Stop ¶
type Stop struct { Id *string // stop_id (required) Code *string // stop_code (optional) Name *string // stop_name (conditionally required) TTSName *string // tts_stop_name (optional) Desc *string // stop_desc (optional) Lat *string // stop_lat (conditionally required) Lon *string // stop_lon (conditionally required) ZoneId *string // zone_id (optional) URL *string // stop_url (optional) LocationType *string // location_type (optional) ParentStation *string // parent_station (conditionally required) Timezone *string // stop_timezone (optional) WheelchairBoarding *string // wheelchair_boarding (optional) PlatformCode *string // platform_code (optional) LevelId *string // level_id (optional) Extensions *StopExtensions LineNumber int }
func LoadStops ¶
func LoadStops(reader *GtfsCsvReader) ([]*Stop, []error)
type StopExtensions ¶
type StopExtensions struct {
MunicipalityId *string // municipality_id (optional)
}
type StopTime ¶
type StopTime struct { TripId *string // trip_id (required) ArrivalTime *string // arrival_time (conditionally required) DepartureTime *string // departure_time (conditionally required) StopId *string // stop_id (conditionally required) LocationGroupId *string // location_group_id (conditionally forbidden) LocationId *string // location_id (conditionally forbidden) StopSequence *string // stop_sequence (required) StopHeadSign *string // stop_headsign (optional) StartPickupDropOffWindow *string // start_pickup_drop_off_window (conditionally required) EndPickupDropOffWindow *string // end_pickup_drop_off_window (conditionally required) PickupType *string // pickup_type (conditionally required) DropOffType *string // drop_off_type (conditionally required) ContinuousPickup *string // continuous_pickup (conditionally required) ContinuousDropOff *string // continuous_drop_off (conditionally required) ShapeDistTraveled *string // shape_dist_traveled (optional) Timepoint *string // timepoint (optional) PickupBookingRuleId *string // pickup_booking_rule_id (optional) DropOffBookingRuleId *string // drop_off_booking_rule_id (optional) LineNumber int }
func CreateStopTime ¶
func LoadStopTimes ¶
func LoadStopTimes(reader *GtfsCsvReader) ([]*StopTime, []error)
type TooFewShapePointsNotice ¶
func (TooFewShapePointsNotice) AsText ¶
func (n TooFewShapePointsNotice) AsText() string
func (TooFewShapePointsNotice) Code ¶
func (n TooFewShapePointsNotice) Code() string
func (TooFewShapePointsNotice) Severity ¶
func (n TooFewShapePointsNotice) Severity() ValidationNoticeSeverity
type TooLongRouteShortNameNotice ¶
type TooLongRouteShortNameNotice struct {
SingleLineNotice
}
func (TooLongRouteShortNameNotice) AsText ¶
func (n TooLongRouteShortNameNotice) AsText() string
func (TooLongRouteShortNameNotice) Code ¶
func (n TooLongRouteShortNameNotice) Code() string
func (TooLongRouteShortNameNotice) Severity ¶
func (n TooLongRouteShortNameNotice) Severity() ValidationNoticeSeverity
type Trip ¶
type Trip struct { RouteId *string // route_id (required) ServiceId *string // service_id (required) Id *string // trip_id (required) HeadSign *string // trip_headsign (optional) ShortName *string // trip_short_name (optional) DirectionId *string // direction_id (optional) BlockId *string // block_id (optional) ShapeId *string // shape_id (conditionally required) WheelchairAccessible *string // wheelchair_accessible (optional) BikesAllowed *string // bikes_allowed (optional) LineNumber int }
func LoadTrips ¶
func LoadTrips(reader *GtfsCsvReader) ([]*Trip, []error)
type ValidAgencyIdRequiredWhenMultipleAgenciesNotice ¶
func (ValidAgencyIdRequiredWhenMultipleAgenciesNotice) AsText ¶
func (n ValidAgencyIdRequiredWhenMultipleAgenciesNotice) AsText() string
func (ValidAgencyIdRequiredWhenMultipleAgenciesNotice) Code ¶
func (n ValidAgencyIdRequiredWhenMultipleAgenciesNotice) Code() string
func (ValidAgencyIdRequiredWhenMultipleAgenciesNotice) Severity ¶
func (n ValidAgencyIdRequiredWhenMultipleAgenciesNotice) Severity() ValidationNoticeSeverity
type ValidationNotice ¶
type ValidationNotice interface { Code() string Severity() ValidationNoticeSeverity AsText() string }
func ValidateAgencies ¶
func ValidateAgencies(agencies []*Agency) []ValidationNotice
func ValidateAgency ¶
func ValidateAgency(a Agency) []ValidationNotice
func ValidateCalendarDate ¶
func ValidateCalendarDate(cd CalendarDate) []ValidationNotice
func ValidateCalendarDates ¶
func ValidateCalendarDates(calendarDates []*CalendarDate, calendarItems []*CalendarItem) []ValidationNotice
func ValidateCalendarItem ¶
func ValidateCalendarItem(c CalendarItem) []ValidationNotice
func ValidateCalendarItems ¶
func ValidateCalendarItems(calendarItems []*CalendarItem) []ValidationNotice
func ValidateRoute ¶
func ValidateRoute(r Route) []ValidationNotice
func ValidateRoutes ¶
func ValidateRoutes(routes []*Route, agencies []*Agency) []ValidationNotice
func ValidateShape ¶
func ValidateShape(s Shape) []ValidationNotice
func ValidateShapes ¶
func ValidateShapes(shapes []*Shape) []ValidationNotice
func ValidateStop ¶
func ValidateStop(s Stop) []ValidationNotice
func ValidateStopTime ¶
func ValidateStopTime(st StopTime) []ValidationNotice
func ValidateStopTimes ¶
func ValidateStopTimes(stopTimes []*StopTime, stops []*Stop) []ValidationNotice
func ValidateStops ¶
func ValidateStops(stops []*Stop) []ValidationNotice
func ValidateTrip ¶
func ValidateTrip(t Trip) []ValidationNotice
func ValidateTrips ¶
func ValidateTrips(trips []*Trip, routes []*Route, calendarItems []*CalendarItem, shapes []*Shape) []ValidationNotice
type ValidationNoticeSeverity ¶
type ValidationNoticeSeverity int
const ( SeverityInfo ValidationNoticeSeverity = 1 SeverityRecommendation ValidationNoticeSeverity = 2 SeverityViolation ValidationNoticeSeverity = 3 )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.