Documentation
¶
Index ¶
- Constants
- type Alert
- type Container
- func (c *Container) AsGTFS() *gtfs.FeedMessage
- func (c *Container) DumpGTFS(w io.Writer, humanReadable bool) error
- func (c *Container) DumpGTFSFile(path string, humanReadable bool) error
- func (c *Container) DumpJSON(w io.Writer, humanReadable bool) error
- func (c *Container) DumpJSONFile(path string, humanReadable bool) error
- func (c *Container) TotalFacts() int
- type StopTimeUpdate
- type TripSelector
- type TripUpdate
Constants ¶
View Source
const ( Binary = false HumanReadable = true )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct {
ID string `json:"id"`
Title string `json:"title"`
Message string `json:"message"`
Trips []TripSelector `json:"trips"`
}
func (*Alert) AsGTFS ¶
func (a *Alert) AsGTFS() *gtfs.FeedEntity
type Container ¶
type Container struct {
Schema string `json:"$schema,omitempty"`
Timestamp time.Time `json:"timestamp"`
Alerts []*Alert `json:"alerts,omitempty"`
TripUpdates []*TripUpdate `json:"trip_updates,omitempty"`
}
func (*Container) AsGTFS ¶
func (c *Container) AsGTFS() *gtfs.FeedMessage
func (*Container) DumpGTFSFile ¶
func (*Container) DumpJSONFile ¶
func (*Container) TotalFacts ¶
type StopTimeUpdate ¶
type StopTimeUpdate struct {
Sequence int `json:"stop_sequence"`
StopID string `json:"stop_id,omitempty"`
Arrival time.Time `json:"arrival,omitzero"`
Departure time.Time `json:"departure,omitzero"`
Cancelled bool `json:"cancelled,omitempty"`
Confirmed bool `json:"confirmed,omitempty"`
Platform string `json:"platform,omitempty"`
Track string `json:"track,omitempty"`
}
func (*StopTimeUpdate) AsGTFS ¶
func (s *StopTimeUpdate) AsGTFS() *gtfs.TripUpdate_StopTimeUpdate
type TripSelector ¶
type TripSelector struct {
TripID string `json:"trip_id"`
GTFSStartDate time2.Date `json:"start_date"`
}
func (TripSelector) AsGTFS ¶
func (s TripSelector) AsGTFS() *gtfs.TripDescriptor
type TripUpdate ¶
type TripUpdate struct {
ID string `json:"id"`
TripSelector
AgencyID string `json:"agency_id,omitempty"`
Numbers []string `json:"numbers,omitempty"`
StopTimes []*StopTimeUpdate `json:"stop_times,omitempty"`
Cancelled bool `json:"cancelled,omitempty"`
Detour bool `json:"detour,omitempty"`
}
func (*TripUpdate) AsGTFS ¶
func (t *TripUpdate) AsGTFS() *gtfs.FeedEntity
func (*TripUpdate) IsEmpty ¶
func (t *TripUpdate) IsEmpty() bool
Click to show internal directories.
Click to hide internal directories.