Documentation
¶
Index ¶
- Variables
- func MustOpenDB(url string) canBeginx
- func Sqrl(db sqlx.Ext) sq.StatementBuilderType
- func Tx(cb func(sqlx.Ext) error) error
- type Agency
- type AgencyFilter
- type AgencyParam
- type AgencyPlace
- type AgencyPlaceFilter
- type AgencyPlaceParam
- type Calendar
- type CalendarDate
- type CalendarDateFilter
- type CalendarDateParam
- type CensusGeography
- type CensusGeographyParam
- type CensusTable
- type CensusTableParam
- type CensusValue
- type CensusValueParam
- type Feed
- type FeedAuthorization
- type FeedFilter
- type FeedInfo
- type FeedInfoParam
- type FeedLicense
- type FeedState
- type FeedUrls
- type FeedVersion
- type FeedVersionDeleteResult
- type FeedVersionFetchResult
- type FeedVersionFileInfo
- type FeedVersionFileInfoParam
- type FeedVersionFilter
- type FeedVersionGtfsImport
- type FeedVersionImportResult
- type FeedVersionParam
- type FeedVersionServiceLevel
- type FeedVersionServiceLevelFilter
- type FeedVersionServiceLevelParam
- type FeedVersionSetInput
- type FeedVersionUnimportResult
- type Frequency
- type FrequencyParam
- type ImportStatus
- type Level
- type Operator
- type OperatorFilter
- type OperatorParam
- type Pathway
- type PathwayFilter
- type PathwayParam
- type PointRadius
- type Role
- type Route
- type RouteFilter
- type RouteGeometry
- type RouteGeometryParam
- type RouteHeadway
- type RouteHeadwayParam
- type RouteParam
- type RouteStop
- type RouteStopBuffer
- type RouteStopBufferParam
- type RouteStopParam
- type Shape
- type Stop
- type StopFilter
- type StopParam
- type StopTime
- type StopTimeFilter
- type StopTimeParam
- type Trip
- type TripFilter
- type TripParam
- type ValidationResult
- type ValidationResultError
- type ValidationResultErrorGroup
- type ValueMap
Constants ¶
This section is empty.
Variables ¶
View Source
var AllImportStatus = []ImportStatus{ ImportStatusSuccess, ImportStatusError, ImportStatusInProgress, }
View Source
var AllRole = []Role{ RoleAnon, RoleAdmin, RoleUser, }
View Source
var DB canBeginx
TODO: replace with middleware or configuration
Functions ¶
func MustOpenDB ¶
func MustOpenDB(url string) canBeginx
Types ¶
type AgencyFilter ¶
type AgencyFilter struct {
OnestopID *string `json:"onestop_id"`
FeedVersionSha1 *string `json:"feed_version_sha1"`
FeedOnestopID *string `json:"feed_onestop_id"`
AgencyID *string `json:"agency_id"`
AgencyName *string `json:"agency_name"`
Within *tl.Polygon `json:"within"`
Near *PointRadius `json:"near"`
Search *string `json:"search"`
}
type AgencyParam ¶
type AgencyParam struct {
FeedVersionID int
Limit *int
Where *AgencyFilter
}
type AgencyPlace ¶
type AgencyPlaceFilter ¶
type AgencyPlaceParam ¶
type AgencyPlaceParam struct {
AgencyID int
Limit *int
Where *AgencyPlaceFilter
}
type CalendarDate ¶
type CalendarDate struct {
tl.CalendarDate
}
type CalendarDateFilter ¶
type CalendarDateParam ¶
type CalendarDateParam struct {
ServiceID int
Limit *int
Where *CalendarDateFilter
}
type CensusGeography ¶
type CensusGeography struct {
ID int `json:"id"`
LayerName string `json:"layer_name"`
Geoid *string `json:"geoid"`
Name *string `json:"name"`
Aland *float64 `json:"aland"`
Awater *float64 `json:"awater"`
Geometry *tl.Polygon `json:"geometry"`
MatchEntityID int // for matching to a stop, route, agency in query
}
type CensusGeographyParam ¶
type CensusTable ¶
type CensusTableParam ¶
type CensusTableParam struct {
Limit *int
}
type CensusValue ¶
type CensusValueParam ¶
type FeedAuthorization ¶
type FeedAuthorization struct {
tl.FeedAuthorization
}
type FeedFilter ¶
type FeedFilter struct {
OnestopID *string `json:"onestop_id"`
Spec []string `json:"spec"`
FetchError *bool `json:"fetch_error"`
ImportStatus *ImportStatus `json:"import_status"`
Search *string `json:"search"`
}
type FeedInfoParam ¶
type FeedLicense ¶
type FeedLicense struct {
tl.FeedLicense
}
type FeedVersion ¶
type FeedVersion struct {
tl.FeedVersion
}
type FeedVersionDeleteResult ¶
type FeedVersionDeleteResult struct {
Success bool `json:"success"`
}
type FeedVersionFetchResult ¶
type FeedVersionFetchResult struct {
FeedVersion *FeedVersion
FetchError *string
FoundSHA1 bool
FoundDirSHA1 bool
}
type FeedVersionFileInfo ¶
type FeedVersionFileInfo struct {
dmfr.FeedVersionFileInfo
}
type FeedVersionFilter ¶
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
}
type FeedVersionParam ¶
type FeedVersionParam struct {
FeedID int
Limit *int
Where *FeedVersionFilter
}
type FeedVersionServiceLevel ¶
type FeedVersionServiceLevel struct {
dmfr.FeedVersionServiceLevel
}
type FeedVersionServiceLevelParam ¶
type FeedVersionServiceLevelParam struct {
FeedVersionID int
Limit *int
Where *FeedVersionServiceLevelFilter
}
type FeedVersionSetInput ¶
type FeedVersionUnimportResult ¶
type FeedVersionUnimportResult struct {
Success bool `json:"success"`
}
type FrequencyParam ¶
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 Operator ¶
type Operator struct {
ID int
AgencyID *int `json:"agency_id"`
AgencyName *string `json:"agency_name"`
AgencyOnestopID *string `json:"agency_onestop_id"`
FeedID *int `json:"feed_id"`
FeedVersionID *int `json:"feed_version_id"`
FeedVersionSha1 *string `json:"feed_version_sha1"`
FeedOnestopID *string `json:"feed_onestop_id"`
FeedNamespaceID *string `json:"feed_namespace_id"`
CityName *string `json:"city_name"`
Adm1name *string `json:"adm1name"`
Adm0name *string `json:"adm0name"`
OnestopID *string `json:"onestop_id"`
OperatorID *int `json:"operator_id"`
OperatorOnestopID *string `json:"operator_onestop_id"`
OperatorName *string `json:"operator_name"`
OperatorShortName *string `json:"operator_short_name"`
OperatorTags *json.RawMessage `json:"operator_tags"` // json map[string]string
OperatorAssociatedFeeds *json.RawMessage `json:"operator_associated_feeds"`
PlacesCache *pq.StringArray `json:"places_cache"`
SearchRank *string
}
type OperatorFilter ¶
type OperatorParam ¶
type OperatorParam struct {
FeedID int
Limit *int
Where *OperatorFilter
}
type PathwayFilter ¶
type PathwayFilter struct {
PathwayMode *int `json:"pathway_mode"`
}
type PathwayParam ¶
type PathwayParam struct {
FeedVersionID int
FromStopID int
ToStopID int
Limit *int
Where *PathwayFilter
}
type PointRadius ¶
type RouteFilter ¶
type RouteFilter struct {
OnestopID *string `json:"onestop_id"`
FeedVersionSha1 *string `json:"feed_version_sha1"`
FeedOnestopID *string `json:"feed_onestop_id"`
RouteID *string `json:"route_id"`
RouteType *int `json:"route_type"`
OperatorOnestopID *string `json:"operator_onestop_id"`
Within *tl.Polygon `json:"within"`
Near *PointRadius `json:"near"`
Search *string `json:"search"`
AgencyIds []int `json:"agency_ids"`
}
type RouteGeometry ¶
type RouteGeometry struct {
RouteID int `json:"route_id"`
DirectionID int `json:"direction_id"`
Generated bool `json:"generated"`
Geometry tl.LineString `json:"geometry"`
}
type RouteGeometryParam ¶
type RouteHeadway ¶
type RouteHeadway struct {
ID int `json:"id"`
RouteID int `json:"route_id"`
SelectedStopID int `json:"selected_stop_id"`
DirectionID int `json:"direction_id"`
HeadwaySecs *int `json:"headway_secs"`
DowCategory *int `json:"dow_category"`
ServiceDate tl.ODate `json:"service_date"`
ServiceSeconds *int `json:"service_seconds"`
StopTripCount *int `json:"stop_trip_count"`
HeadwaySecondsMorningCount *int `json:"headway_seconds_morning_count"`
HeadwaySecondsMorningMin *int `json:"headway_seconds_morning_min"`
HeadwaySecondsMorningMid *int `json:"headway_seconds_morning_mid"`
HeadwaySecondsMorningMax *int `json:"headway_seconds_morning_max"`
HeadwaySecondsMiddayCount *int `json:"headway_seconds_midday_count"`
HeadwaySecondsMiddayMin *int `json:"headway_seconds_midday_min"`
HeadwaySecondsMiddayMid *int `json:"headway_seconds_midday_mid"`
HeadwaySecondsMiddayMax *int `json:"headway_seconds_midday_max"`
HeadwaySecondsAfternoonCount *int `json:"headway_seconds_afternoon_count"`
HeadwaySecondsAfternoonMin *int `json:"headway_seconds_afternoon_min"`
HeadwaySecondsAfternoonMid *int `json:"headway_seconds_afternoon_mid"`
HeadwaySecondsAfternoonMax *int `json:"headway_seconds_afternoon_max"`
HeadwaySecondsNightCount *int `json:"headway_seconds_night_count"`
HeadwaySecondsNightMin *int `json:"headway_seconds_night_min"`
HeadwaySecondsNightMid *int `json:"headway_seconds_night_mid"`
HeadwaySecondsNightMax *int `json:"headway_seconds_night_max"`
}
type RouteHeadwayParam ¶
type RouteParam ¶
type RouteParam struct {
AgencyID int
FeedVersionID int
Limit *int
Where *RouteFilter
}
type RouteStopBuffer ¶
type RouteStopBufferParam ¶
type RouteStopParam ¶
type StopFilter ¶
type StopFilter struct {
OnestopID *string `json:"onestop_id"`
FeedVersionSha1 *string `json:"feed_version_sha1"`
FeedOnestopID *string `json:"feed_onestop_id"`
StopID *string `json:"stop_id"`
AgencyIds []int `json:"agency_ids"`
Within *tl.Polygon `json:"within"`
Near *PointRadius `json:"near"`
Search *string `json:"search"`
}
type StopParam ¶
type StopParam struct {
FeedVersionID int
ParentStopID int
AgencyID int
Limit *int
Where *StopFilter
}
type StopTimeFilter ¶
type StopTimeParam ¶
type StopTimeParam struct {
TripID int
StopID int
Limit *int
Where *StopTimeFilter
}
type TripFilter ¶
type TripParam ¶
type TripParam struct {
FeedVersionID int
RouteID int
Limit *int
Where *TripFilter
}
type ValidationResult ¶
type ValidationResult struct {
Success bool `json:"success"`
FailureReason string `json:"failure_reason"`
Errors []ValidationResultErrorGroup `json:"errors"`
Warnings []ValidationResultErrorGroup `json:"warnings"`
Sha1 string `json:"sha1"`
EarliestCalendarDate tl.ODate `json:"earliest_calendar_date"`
LatestCalendarDate tl.ODate `json:"latest_calendar_date"`
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"`
}
ValidationResult .
type ValidationResultError ¶
type ValidationResultErrorGroup ¶
type ValidationResultErrorGroup struct {
Filename string `json:"filename"`
ErrorType string `json:"error_type"`
Count int `json:"count"`
Limit int `json:"limit"`
Errors []*ValidationResultError `json:"errors"`
}
Click to show internal directories.
Click to hide internal directories.