model

package
v0.0.0-...-3f38b23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllDurationUnit = []DurationUnit{
	DurationUnitSeconds,
}

Functions

func AddConfig

func AddConfig(cfg Config) func(http.Handler) http.Handler

func WithConfig

func WithConfig(ctx context.Context, cfg Config) context.Context

Types

type Agency

type Agency struct {
	OnestopID       string      `json:"onestop_id"`
	FeedOnestopID   string      `json:"feed_onestop_id"`
	FeedVersionSHA1 string      `json:"feed_version_sha1"`
	Geometry        *tl.Polygon `json:"geometry"`
	SearchRank      *string
	CoifID          *int
	tl.Agency
}

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 BoundingBox struct {
	MinLon float64 `json:"min_lon"`
	MinLat float64 `json:"min_lat"`
	MaxLon float64 `json:"max_lon"`
	MaxLat float64 `json:"max_lat"`
}

type Calendar

type Calendar struct {
	tl.Calendar
}

type CalendarDate

type CalendarDate struct {
	tl.CalendarDate
}

type CalendarDateFilter

type CalendarDateFilter struct {
	Date          *tt.Date `json:"date,omitempty"`
	ExceptionType *int     `json:"exception_type,omitempty"`
}

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 CensusGeographyParam struct {
	Radius     *float64
	LayerName  string
	EntityType string
	EntityID   int
	Limit      *int
}

type CensusTable

type CensusTable struct {
	ID         int    `json:"id"`
	TableName  string `json:"table_name"`
	TableTitle string `json:"table_title"`
	TableGroup string `json:"table_group"`
}

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 CensusValueParam struct {
	GeographyID int
	TableNames  string // these have to be comma joined for now, []string cant be used as map key
	Limit       *int
}

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

func ForContext(ctx context.Context) Config

type Cursor

type Cursor struct {
	FeedVersionID int
	ID            int
	Valid         bool
}

func NewCursor

func NewCursor(fvid int, id int) Cursor

func (Cursor) MarshalGQL

func (r Cursor) MarshalGQL(w io.Writer)

MarshalGQL implements the graphql.Marshaler interface

func (*Cursor) MarshalJSON

func (r *Cursor) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.marshaler interface.

func (*Cursor) Scan

func (r *Cursor) Scan(value interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface

func (*Cursor) UnmarshalGQL

func (r *Cursor) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements the graphql.Unmarshaler interface

func (*Cursor) UnmarshalJSON

func (r *Cursor) UnmarshalJSON(v []byte) error

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 Feed

type Feed struct {
	SearchRank *string
	tl.Feed
}

type FeedAuthorization

type FeedAuthorization struct {
	tl.FeedAuthorization
}

type FeedFetch

type FeedFetch struct {
	ResponseSha1 tl.String // confusing but easier than alternative fixes
	dmfr.FeedFetch
}

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 FeedInfo

type FeedInfo struct {
	tl.FeedInfo
}

type FeedInfoParam

type FeedInfoParam struct {
	FeedVersionID int
	Limit         *int
}

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 FeedState

type FeedState struct {
	dmfr.FeedState
}

type FeedUrls

type FeedUrls struct {
	tl.FeedUrls
}

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 FeedVersionFileInfoParam

type FeedVersionFileInfoParam struct {
	FeedVersionID int
	Limit         *int
}

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 FeedVersionServiceLevelFilter

type FeedVersionServiceLevelFilter struct {
	StartDate *tt.Date `json:"start_date,omitempty"`
	EndDate   *tt.Date `json:"end_date,omitempty"`
}

type FeedVersionServiceLevelParam

type FeedVersionServiceLevelParam struct {
	FeedVersionID int
	Limit         *int
	Where         *FeedVersionServiceLevelFilter
}

type FeedVersionSetInput

type FeedVersionSetInput struct {
	ID          *int    `json:"id,omitempty"`
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
}

type FeedVersionUnimportResult

type FeedVersionUnimportResult struct {
	Success bool `json:"success"`
}

type Finder

Finder provides all necessary database methods

type Frequency

type Frequency struct {
	tl.Frequency
}

type FrequencyParam

type FrequencyParam struct {
	TripID int
	Limit  *int
}

type GbfsAlertTime

type GbfsAlertTime struct {
	*gbfs.AlertTime
}

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

type GbfsFeed struct {
	*gbfs.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 (*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 GbfsPlanPrice struct {
	*gbfs.PlanPrice
}

type GbfsRentalApp

type GbfsRentalApp struct {
	*gbfs.RentalApp
}

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 (*GbfsStationInformation) Status

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 Itinerary

type Itinerary 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"`
	To        *Waypoint `json:"to"`
	Legs      []*Leg    `json:"legs,omitempty"`
}

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 Level

type Level struct {
	Geometry      tl.Polygon
	ParentStation tt.Key
	tl.Level
}

type LevelParam

type LevelParam struct {
	ParentStationID int
	Limit           *int
}

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 {
	ShareAlikeOptional    *LicenseValue `json:"share_alike_optional,omitempty"`
	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 Me

type Me struct {
	ID           string   `json:"id"`
	Name         *string  `json:"name,omitempty"`
	Email        *string  `json:"email,omitempty"`
	Roles        []string `json:"roles,omitempty"`
	ExternalData tt.Map   `json:"external_data"`
}

type Mutation

type Mutation struct {
}

type Operator

type Operator struct {
	ID            int
	Generated     bool
	FeedID        int
	FeedOnestopID *string
	SearchRank    *string // internal
	AgencyID      int     // internal
	tl.Operator
}

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 Pathway

type Pathway struct {
	tl.Pathway
}

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

type PermFilter struct {
	AllowedFeeds        []int
	AllowedFeedVersions []int
}

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 Place

type Place struct {
	Adm0Name  *string     `json:"adm0_name,omitempty"`
	Adm1Name  *string     `json:"adm1_name,omitempty"`
	CityName  *string     `json:"city_name,omitempty"`
	Count     int         `json:"count"`
	Operators []*Operator `json:"operators,omitempty"`
	AgencyIDs tt.Ints     `db:"agency_ids"`
}

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 PlaceFilter struct {
	MinRank  *float64 `json:"min_rank,omitempty"`
	Adm0Name *string  `json:"adm0_name,omitempty"`
	Adm1Name *string  `json:"adm1_name,omitempty"`
	CityName *string  `json:"city_name,omitempty"`
}

type PointRadius

type PointRadius struct {
	Lat    float64 `json:"lat"`
	Lon    float64 `json:"lon"`
	Radius float64 `json:"radius"`
}

type Query

type Query struct {
}

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 RTTimeRange

type RTTimeRange struct {
	Start *int `json:"start,omitempty"`
	End   *int `json:"end,omitempty"`
}

See https://gtfs.org/reference/realtime/v2/#message-timerange

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 Route

type Route struct {
	FeedOnestopID                string
	FeedVersionSHA1              string
	OnestopID                    *string
	HeadwaySecondsWeekdayMorning *int
	SearchRank                   *string
	tl.Route
}

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 RouteGeometryParam struct {
	RouteID int
	Limit   *int
}

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 RouteHeadwayParam struct {
	RouteID int
	Limit   *int
}

type RouteParam

type RouteParam struct {
	AgencyID      int
	FeedVersionID int
	Limit         *int
	Where         *RouteFilter
}

type RouteStop

type RouteStop struct {
	ID       int     `json:"id"`
	StopID   int     `json:"stop_id"`
	RouteID  int     `json:"route_id"`
	AgencyID int     `json:"agency_id"`
	Route    *Route  `json:"route"`
	Stop     *Stop   `json:"stop"`
	Agency   *Agency `json:"agency"`
}

type RouteStopBuffer

type RouteStopBuffer struct {
	StopPoints     *tt.Geometry `json:"stop_points,omitempty"`
	StopBuffer     *tt.Geometry `json:"stop_buffer,omitempty"`
	StopConvexhull *tt.Polygon  `json:"stop_convexhull,omitempty"`
}

type RouteStopBufferParam

type RouteStopBufferParam struct {
	EntityID int
	Radius   *float64
	Limit    *int
}

type RouteStopParam

type RouteStopParam struct {
	RouteID int
	StopID  int
	Limit   *int
}

type RouteStopPattern

type RouteStopPattern struct {
	StopPatternID int     `json:"stop_pattern_id"`
	DirectionID   int     `json:"direction_id"`
	Count         int     `json:"count"`
	Trips         []*Trip `json:"trips,omitempty"`
	RouteID       int     `json:"-"`
}

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 SegmentPattern struct {
	ID            int      `json:"id"`
	StopPatternID int      `json:"stop_pattern_id"`
	Segment       *Segment `json:"segment"`
	RouteID       int      `json:"-"`
	SegmentID     int      `json:"-"`
}

type SegmentPatternParam

type SegmentPatternParam struct {
	SegmentID int
	RouteID   int
	Layer     string
	Limit     *int
}

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 Shape

type Shape struct {
	tl.Shape
}

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 StepMode

type StepMode string
const (
	StepModeWalk    StepMode = "WALK"
	StepModeAuto    StepMode = "AUTO"
	StepModeBicycle StepMode = "BICYCLE"
	StepModeTransit StepMode = "TRANSIT"
	StepModeLine    StepMode = "LINE"
)

func (StepMode) IsValid

func (e StepMode) IsValid() bool

func (StepMode) MarshalGQL

func (e StepMode) MarshalGQL(w io.Writer)

func (StepMode) String

func (e StepMode) String() string

func (*StepMode) UnmarshalGQL

func (e *StepMode) UnmarshalGQL(v interface{}) error

type Stop

type Stop struct {
	FeedOnestopID   string
	FeedVersionSHA1 string
	OnestopID       *string
	SearchRank      *string
	tl.Stop
}

type StopExternalReference

type StopExternalReference struct {
	ID                  int     `json:"id"`
	TargetFeedOnestopID *string `json:"target_feed_onestop_id,omitempty"`
	TargetStopID        *string `json:"target_stop_id,omitempty"`
	Inactive            *bool   `json:"inactive,omitempty"`
	TargetActiveStop    *Stop   `json:"target_active_stop,omitempty"`
}

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 StopObservationFilter struct {
	Source        string  `json:"source"`
	FeedVersionID int     `json:"feed_version_id"`
	TripStartDate tt.Date `json:"trip_start_date"`
}

type StopObservationParam

type StopObservationParam struct {
	StopID int
	Limit  *int
	Where  *StopObservationFilter
}

type StopParam

type StopParam struct {
	FeedVersionID int
	ParentStopID  int
	AgencyID      int
	LevelID       int
	Limit         *int
	Where         *StopFilter
	RouteID       int
}

type StopPlace

type StopPlace struct {
	Adm1Name *string `json:"adm1_name,omitempty"`
	Adm0Name *string `json:"adm0_name,omitempty"`
	Adm0Iso  *string `json:"adm0_iso,omitempty"`
	Adm1Iso  *string `json:"adm1_iso,omitempty"`
}

type StopPlaceParam

type StopPlaceParam struct {
	ID    int
	Point xy.Point
}

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 StopTime

type StopTime struct {
	ServiceDate      tl.Date
	RTTripID         string                        // internal: for ADDED trips
	RTStopTimeUpdate *pb.TripUpdate_StopTimeUpdate // internal
	tl.StopTime
}

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 Trip

type Trip struct {
	RTTripID string // internal: for ADDED trips
	tl.Trip
}

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 TripStopTimeFilter struct {
	Start *tt.WideTime `json:"start,omitempty"`
	End   *tt.WideTime `json:"end,omitempty"`
}

type TripStopTimeParam

type TripStopTimeParam struct {
	TripID        int
	FeedVersionID int
	Limit         *int
	StartTime     *int
	EndTime       *int
	Where         *TripStopTimeFilter
}

type ValidationRealtimeResult

type ValidationRealtimeResult struct {
	URL  string `json:"url"`
	JSON tt.Map `json:"json"`
}

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 ValidationReportErrorExemplarParam

type ValidationReportErrorExemplarParam struct {
	ValidationReportGroupID int
	Limit                   *int
}

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 ValidationReportErrorGroupParam

type ValidationReportErrorGroupParam struct {
	ValidationReportID int
	Limit              *int
}

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.

type Waypoint

type Waypoint struct {
	Lon  float64 `json:"lon"`
	Lat  float64 `json:"lat"`
	Name *string `json:"name,omitempty"`
}

type WaypointInput

type WaypointInput struct {
	Lon  float64 `json:"lon"`
	Lat  float64 `json:"lat"`
	Name *string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL