darwin

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: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetryRecords

func RetryRecords(queue *railutils.BatchProcessingQueue)

Types

type Formation

type Formation struct {
	FID string `xml:"fid,attr"`

	Coaches []FormationCoach `xml:"coaches>coach"`
}

type FormationCoach

type FormationCoach struct {
	Number string `xml:"coachNumber,attr"`
	Class  string `xml:"coachClass,attr"`

	Toilets []FormationCoachToilet `xml:"toilet"`
}

type FormationCoachToilet

type FormationCoachToilet struct {
	Status string `xml:"coachNumber,attr"`
	Type   string `xml:",chardata"`
}

type FormationLoading

type FormationLoading struct {
	FID string `xml:"fid,attr"`
	RID string `xml:"rid,attr"`
	TPL string `xml:"tpl,attr"`
	WTA string `xml:"wta,attr"`
	WTD string `xml:"wtd,attr"`
	PTA string `xml:"pta,attr"`
	PTD string `xml:"ptd,attr"`

	Loading []FormationLoadingLoading `xml:"loading"`
}

type FormationLoadingLoading

type FormationLoadingLoading struct {
	CoachNumber       string `xml:"coachNumber,attr"`
	LoadingPercentage string `xml:",chardata"`
}

type PushPortData

type PushPortData struct {
	TrainStatuses      []TrainStatus
	Schedules          []Schedule
	FormationLoadings  []FormationLoading
	StationMessages    []StationMessage
	TrainAlerts        []TrainAlert
	ScheduleFormations []ScheduleFormations
}

func ParseXMLFile

func ParseXMLFile(reader io.Reader) (PushPortData, error)

func (*PushPortData) UpdateRealtimeJourneys

func (p *PushPortData) UpdateRealtimeJourneys(queue *railutils.BatchProcessingQueue)

type Schedule

type Schedule struct {
	RID string `xml:"rid,attr"`
	UID string `xml:"uid,attr"`
	SSD string `xml:"ssd,attr"`
	TOC string `xml:"toc,attr"`

	CancelReason string `xml:"cancelReason"`

	Origin       ScheduleStop   `xml:"OR"`
	Intermediate []ScheduleStop `xml:"IP"`
	Destination  ScheduleStop   `xml:"DT"`

	InnerXML string `xml:",innerxml"`
}

type ScheduleFormations

type ScheduleFormations struct {
	RID string `xml:"rid,attr"`

	Formations []Formation `xml:"formation"`
}

type ScheduleStop

type ScheduleStop struct {
	Tiploc   string `xml:"tpl,attr"`
	Activity string `xml:"act,attr"`

	PublicDeparture  string `xml:"ptd,attr"`
	WorkingDeparture string `xml:"wtd,attr"`

	PublicArrival  string `xml:"pta,attr"`
	WorkingArrival string `xml:"wta,attr"`

	Cancelled string `xml:"can,attr"`
}

type StationMessage

type StationMessage struct {
	ID       string `xml:"id,attr"`
	Category string `xml:"cat,attr"`
	Severity string `xml:"sev,attr"`

	Stations []StationMessageStation `xml:"Station"`
	Message  StationMessageMessage   `xml:"Msg"`
}

type StationMessageMessage

type StationMessageMessage struct {
	InnerXML string `xml:",innerxml"`
}

type StationMessageStation

type StationMessageStation struct {
	CRS string `xml:"crs,attr"`
}

type StompClient

type StompClient struct {
	Address   string
	Username  string
	Password  string
	QueueName string
}

func (*StompClient) Run

func (s *StompClient) Run()

type TrainAlert

type TrainAlert struct {
	AlertID string

	SendAlertBySMS     bool
	SendAlertByEmail   bool
	SendAlertByTwitter bool

	AlertServices []TrainAlertServices `xml:"AlertServices>AlertService"`

	Source string

	AlertText string

	Audience  string
	AlertType string
}

type TrainAlertServices

type TrainAlertServices struct {
	RID string `xml:",attr"`
	UID string `xml:",attr"`
	SSD string `xml:",attr"`

	Locations []string `xml:"Location"`
}

type TrainStatus

type TrainStatus struct {
	RID string `xml:"rid,attr"`
	UID string `xml:"uid,attr"`
	SSD string `xml:"ssd,attr"`

	LateReason string

	Locations []TrainStatusLocation `xml:"Location"`
}

type TrainStatusLocation

type TrainStatusLocation struct {
	TPL string `xml:"tpl,attr"`
	WTD string `xml:"wtd,attr"`
	PTD string `xml:"ptd,attr"`

	Departure *TrainStatusTiming   `xml:"dep"`
	Arrival   *TrainStatusTiming   `xml:"arr"`
	Pass      *TrainStatusTiming   `xml:"pass"`
	Platform  *TrainStatusPlatform `xml:"plat"`
}

type TrainStatusPlatform

type TrainStatusPlatform struct {
	PLATSRC    string `xml:"platsrc"`
	PLATSUP    string `xml:"platsup"`
	CISPLATSUP string `xml:"cisPlatsup"`
	CONF       string `xml:"conf"`

	Name string `xml:",chardata"`
}

type TrainStatusTiming

type TrainStatusTiming struct {
	AT    string `xml:"at,attr"`
	ATMIN string `xml:"atmin,attr"`

	ET    string `xml:"et,attr"`
	ETMIN string `xml:"etmin,attr"`

	SRC     string `xml:"src,attr"`
	SRCINST string `xml:"srcInst,attr"`

	Delayed string `xml:"delayed,attr"`
}

func (*TrainStatusTiming) GetTiming

func (t *TrainStatusTiming) GetTiming() (time.Time, error)

Jump to

Keyboard shortcuts

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