tflarrivals

package
v0.0.0-...-73876c2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TfLAppKey string

Functions

func RegisterCLI

func RegisterCLI() *cli.Command

Types

type ArrivalPrediction

type ArrivalPrediction struct {
	ID            string `json:"id"`
	OperationType int    `json:"operationType"`
	VehicleID     string `json:"vehicleId"`

	NaptanID    string `json:"naptanId"`
	StationName string `json:"stationName"`

	LineID   string `json:"lineId"`
	LineName string `json:"lineName"`

	PlatformName string `json:"platformName"`
	Direction    string `json:"direction"`
	Bearing      string `json:"bearing"`

	DestinationNaptanID string `json:"destinationNaptanId"`
	DestinationName     string `json:"destinationName"`

	TimeToStation int `json:"timeToStation"`

	CurrentLocation string `json:"currentLocation"`
	Towards         string `json:"towards"`

	ExpectedArrival string `json:"expectedArrival"`

	ModeName string `json:"modeName"`
}

type LineArrivalTracker

type LineArrivalTracker struct {
	Line        *TfLLine
	RefreshRate time.Duration

	OrderedLineRoutes []OrderedLineRoute
}

func (*LineArrivalTracker) GetLatestArrivals

func (l *LineArrivalTracker) GetLatestArrivals() []ArrivalPrediction

func (*LineArrivalTracker) GetTfLRouteSequences

func (l *LineArrivalTracker) GetTfLRouteSequences()

func (*LineArrivalTracker) ParseArrivals

func (l *LineArrivalTracker) ParseArrivals(lineArrivals []ArrivalPrediction)

func (*LineArrivalTracker) Run

func (l *LineArrivalTracker) Run()

type ModeDisruptionTracker

type ModeDisruptionTracker struct {
	Mode        *TfLMode
	RefreshRate time.Duration
	Service     *ctdf.Service
}

func (*ModeDisruptionTracker) GetDisruptions

func (d *ModeDisruptionTracker) GetDisruptions()

func (*ModeDisruptionTracker) GetLineStatuses

func (d *ModeDisruptionTracker) GetLineStatuses()

func (*ModeDisruptionTracker) Run

func (d *ModeDisruptionTracker) Run()

type OrderedLineRoute

type OrderedLineRoute struct {
	Name      string   `json:"name"`
	NaptanIDs []string `json:"naptanIds"`
}

type RouteSequenceResponse

type RouteSequenceResponse struct {
	LineStrings       []string           `json:"lineStrings"`
	OrderedLineRoutes []OrderedLineRoute `json:"orderedLineRoutes"`
}

type TfLLine

type TfLLine struct {
	LineID        string
	LineName      string
	TransportType ctdf.TransportType

	Service *ctdf.Service
}

func (*TfLLine) GetService

func (l *TfLLine) GetService()

type TfLMode

type TfLMode struct {
	ModeID        string
	TransportType ctdf.TransportType

	Lines []*TfLLine

	TrackArrivals    bool
	TrackDisruptions bool

	ArrivalRefreshRate    time.Duration
	DisruptionRefreshRate time.Duration
}

func (*TfLMode) GetLines

func (m *TfLMode) GetLines()

type TrackerManager

type TrackerManager struct {
	Modes []*TfLMode
}

func (TrackerManager) Run

func (t TrackerManager) Run()

Jump to

Keyboard shortcuts

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